flightlessmango / MangoHud

A Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more. Discord: https://discordapp.com/invite/Gj5YmBb
MIT License
6.28k stars 272 forks source link

mangoapp coredump on glfw 3.4 and wayland #1261

Open THMonster opened 5 months ago

THMonster commented 5 months ago

Describe the bug image

List relevant hardware/software information

To Reproduce Steps to reproduce the behavior: Just start it on glfw 3.4

Expected behavior This is a screenshot on glfw-x11 3.3.10 image

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Archlinux has merged glfw-wayland glfw-x11 into one package(glfw) after glfw 3.4

flightlessmango commented 5 months ago

I can't reproduce this on my end using arch packaged mangohud and glfw

THMonster commented 5 months ago

I can't reproduce this on my end using arch packaged mangohud and glfw

Did you try wayland?

flightlessmango commented 5 months ago

This should work fine inside gamescope, which mangoapp is designed to be run inside of. Any error caused or only happens outside gamescope is non issues basically

THMonster commented 5 months ago

This should work fine inside gamescope, which mangoapp is designed to be run inside of. Any error caused or only happens outside gamescope is non issues basically

Actually I use mangoapp inside gamescope(https://github.com/ChimeraOS/gamescope-session), and it will also crash on glfw 3.4.

flightlessmango commented 5 months ago

in the example you showed you were not using gamescope, can you show with gamescope?

THMonster commented 5 months ago

in the example you showed you were not using gamescope, can you show with gamescope?

It is the same as the first screenshot. Glfw Error 65550: X11: Platform not initialized for 4 lines. And the mangohud did not show inside gamescope with steamdeck mode steam. And nothing changed after tweaking mangohud config in steam(steamdeck mode)'s sidemenu. But after downgrade to glfw-x11 3.3.10, everything work again.

flightlessmango commented 5 months ago

I don't see any issues on my end using latest mangohud git and glfw 3.4 on x11 and @gort818 also tested the same on wayland using gamescope -- sh -c "mangoapp& vkcube" as test case

antheas commented 4 months ago

I am having the same issue. gamescope -- sh -c "mangoapp& vkcube" runs fine but mangohud is not launching on wayland or gamescope with steam using a similar script to the chimeraos session above.

antheas commented 4 months ago

The crash happens when attempting to create the atom after a failed initialization. For some reason, the initialization does not return false.

https://github.com/flightlessmango/MangoHud/blob/1baecfc493ecc32c9c2b14c025769485eb30de20/src/app/main.cpp#L290-L305

systemd-coredump[31893]: [🡕] Process 31874 (mangoapp) of user 1000 dumped core.

                                                    Stack trace of thread 31874:
                                                    #0  0x00007f78f2ba94e3 XInternAtom (libX11.so.6 + 0x2d4e3)
                                                    #1  0x00005579091f7283 n/a (mangoapp + 0x36283)
                                                    #2  0x00007f78f26f9cd0 n/a (libc.so.6 + 0x25cd0)
                                                    #3  0x00007f78f26f9d8a __libc_start_main (libc.so.6 + 0x25d8a)
                                                    #4  0x00005579091f9a15 n/a (mangoapp + 0x38a15)

Downgrading to glfw-x11 3.3.10 fixes the issue.