MangoHud: Crashing when enabled
Just got an update for mangohud-git from the AUR, now whenever I press the keybind to enable or when no_display
is commented out, it crashed the program/game.
$ mangohud glxgears
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
/usr/include/c++/13.2.1/bits/stl_vector.h:1125: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = float; _Alloc = std::allocator<float>; reference = float&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
Aborted (core dumped)
Switching over to the non AUR package, programs/games do not crash.
List relevant hardware/software information
- OS: Arch Linux
- Mangohud Version: v0.7.1-rc1-2-g1d357e1
- GPU: AMD Radeon RX 7900 XTX (radeonsi, navi31, LLVM 18.0.0, DRM 3.54, 6.6.7-arch1-1)
- GPU Driver: 4.6 Mesa 24.0.0-devel (git-8023ede00a)
To Reproduce Steps to reproduce the behavior:
- run
mangohud glxgears
in the terminal - Enable
mangohud
with your keybind or if you haveno_display
commented out glxgears will crash.
Expected behavior For the application to not crash and for MangoHud to show the statistics I want to see in the overlay.
About this issue
- Original URL
- State: closed
- Created 6 months ago
- Comments: 36 (9 by maintainers)
That seems to have fixed the problem. Thank you.
Now they start working, seems like after x amount of time like with the crash it starts to work as normal but this time it doesn’t crash.
Got round to running
gdb
for this issue of MangoHud which only crashes on a freshly booted PC, with eitherfps_metrics=avg,0.01
orfps_metrics=avg,0.01,0.001
set. Runningmangohub vkcube
to get the crash.I’m not sure if this is the right way to use
gdb
but its how I was told in a past issue.First I ran this in the terminal:
Then I ran
mangohud vkcube
which generated a file calledcore.2738.1000.6.vkcube.1705524812
Then I wasn’t sure if this was correct but its what I did next:
Hope this helps.
EDIT: When I finished this comment I tried again with
fps_metrics=avg,0.01,0.001
set and ranmangohud vkcube
and it didn’t crash. My systems uptime is 16 mins.I haven’t been able to repro it. It would be very useful if you could compile a debug version of mangohud and get a gdb back trace of the crash
Mangohud should not be used with gamescope, it’s not supported and any crashes are unlikely to be fixed. Instead you should use mangoapp
I’m experiencing this when
fps_metrics
is enabled in config if I compile with LTO enabled with GCC. Enabling LTO with clang(16) is a compile fail. LTO disabled, everything seems to work fine with both compilers.My config
EDIT I tested this compiling 2 times with both before posting this, and then after posting, 3rd time trying with GCC LTO it worked just fine. Either I’m wrong and my results were just coincidence, and/or it’s randomly intermittent as stated above. EDIT2 Well nevermind! The GCC LTO build broke again after a reboot. I won’t be digging deeper into this for now