MangoHud icon indicating copy to clipboard operation
MangoHud copied to clipboard

mangoapp coredump on glfw 3.4 and wayland

Open THMonster opened this issue 1 year ago • 9 comments

Describe the bug image

List relevant hardware/software information

  • Linux Distribution: ArchLinux
  • MangoHud version: 0.7.1
  • GPU: AMD 680M
  • DE: KDE Plasma6 Wayland

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

THMonster avatar Mar 12 '24 02:03 THMonster

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

flightlessmango avatar Mar 12 '24 10:03 flightlessmango

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

Did you try wayland?

THMonster avatar Mar 13 '24 01:03 THMonster

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

flightlessmango avatar Mar 16 '24 00:03 flightlessmango

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.

THMonster avatar Mar 16 '24 05:03 THMonster

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

flightlessmango avatar Mar 16 '24 06:03 flightlessmango

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.

THMonster avatar Mar 16 '24 06:03 THMonster

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

flightlessmango avatar Mar 16 '24 08:03 flightlessmango

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 avatar Mar 31 '24 22:03 antheas

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.

antheas avatar Mar 31 '24 22:03 antheas