In debug builds, it is possible to get an assertion failure error with the following message: "Invalid bounds arguments passed to std::clamp". This seems to depend on the screen size, so I'm attaching my ini file to help reproduce the issue.
To reproduce, start GZDoom and select the Heretic, Hexen, or Strife IWAD (for some reason this error does not appear when using a Doom IWAD). There is no need to fire up a level.
Tested in GZDoom g4.8pre-84-gaf54991c2.
Invalid bounds arguments passed to std::clamp
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
- Player701
-
- Posts: 1709
- Joined: Wed May 13, 2009 3:15 am
- Graphics Processor: nVidia with Vulkan support
- Contact:
Invalid bounds arguments passed to std::clamp
- Attachments
-
- gzdoom-Player701.ini
- (44.5 KiB) Downloaded 31 times
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49225
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Invalid bounds arguments passed to std::clamp
A stack trace would be more helpful. We got a similar report for Raze but are unable to reproduce it on any of the development systems.
- Player701
-
- Posts: 1709
- Joined: Wed May 13, 2009 3:15 am
- Graphics Processor: nVidia with Vulkan support
- Contact:
Re: Invalid bounds arguments passed to std::clamp
I've been able to successfully reproduce the issue on my laptop with the same INI file. The call stack is the following in all cases (regardless of the IWAD that is being used or whether or not -warp is specified):
However, when I was using debug builds to test my mod (which has a custom HUD) on my PC, the error happened in a different place, namely, when calling DStatusBarCore::SetClipRect. I am unable to reproduce this stack trace with a release build of the mod, and I don't have the current testing version here on my laptop. But if necessary, I can get it from my PC and test again - it will take some time though.
Code: Select all
> gzdoom.exe!std::clamp<int,std::less<void>>(const int & _Val, const int & _Min_val, const int & _Max_val, std::less<void> _Pred) Line 10170 C++
gzdoom.exe!std::clamp<int>(const int & _Val, const int & _Min_val, const int & _Max_val) Line 10190 C++
gzdoom.exe!GetConScale(F2DDrawer * drawer, int altval) Line 168 C++
gzdoom.exe!active_con_scale(F2DDrawer * drawer) Line 255 C++
gzdoom.exe!C_DrawConsole() Line 579 C++
gzdoom.exe!D_Display() Line 1086 C++
gzdoom.exe!D_DoomLoop() Line 1219 C++
gzdoom.exe!D_DoomMain_Internal() Line 3591 C++
gzdoom.exe!GameMain() Line 3616 C++
gzdoom.exe!DoMain(HINSTANCE__ * hInstance) Line 981 C++
gzdoom.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * nothing, wchar_t * cmdline, int nCmdShow) Line 1270 C++
[External Code]
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49225
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Invalid bounds arguments passed to std::clamp
It looks lilke these are ancient bugs that were silently accepted by our internal clamp function but seem to trip over the one from the STL...