Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mangoapp coredump on glfw 3.4 and wayland #1261

Open
THMonster opened this issue Mar 12, 2024 · 9 comments
Open

mangoapp coredump on glfw 3.4 and wayland #1261

THMonster opened this issue Mar 12, 2024 · 9 comments

Comments

@THMonster
Copy link

THMonster commented Mar 12, 2024

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

@flightlessmango
Copy link
Owner

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

@THMonster
Copy link
Author

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

Did you try wayland?

@flightlessmango
Copy link
Owner

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
Copy link
Author

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
Copy link
Owner

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

@THMonster
Copy link
Author

THMonster commented Mar 16, 2024

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 THMonster changed the title mangoapp coredump on glfw 3.4 mangoapp coredump on glfw 3.4 and wayland Mar 16, 2024
@flightlessmango
Copy link
Owner

flightlessmango commented Mar 16, 2024

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
Copy link

antheas commented Mar 31, 2024

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
Copy link

antheas commented Mar 31, 2024

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

MangoHud/src/app/main.cpp

Lines 290 to 305 in 1baecfc

if (!glfwInit())
return 1;
const char* glsl_version = "#version 130";
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
glfwWindowHint(GLFW_RESIZABLE, 1);
glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, 1);
// Create window with graphics context
GLFWwindow* window = init(glsl_version);
Display *x11_display = glfwGetX11Display();
Window x11_window = glfwGetX11Window(window);
Atom overlay_atom = XInternAtom (x11_display, GamescopeOverlayProperty, False);

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants