Skip to content

Coredump on wayland #7903

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

Open
kflak opened this issue Feb 23, 2024 · 22 comments
Open

Coredump on wayland #7903

kflak opened this issue Feb 23, 2024 · 22 comments
Assignees
Milestone

Comments

@kflak
Copy link

kflak commented Feb 23, 2024

Hi,

Stumbled on a new wayland-related issue: I'm suddenly no longer able to run any oF-apps on wayland (tried both sway and Hyprland). xorg works fine. The error I'm getting from a clean, empty default project created with the projectGenerator is:

 [ error ] ofAppGLFWWindow: 65550: X11: Platform not initialized
make: *** [../../../libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:184: run] Segmentation fault (core dumped)

If I set up the app to run as OF_FULLSCREEN, then I get an additional error:

[ error ] ofAppGLFWWindow: 65548: Wayland: The platform does not support setting the window position

Running of_v0.12.0_linux64gcc6_release on Arch Linux, and I'm using the glfw-git package as mentioned in this issue. This used to work just fine, but now no more...

@cgxeiji
Copy link

cgxeiji commented Mar 11, 2024

I am having the same issue with 0.12.0

@kflak
Copy link
Author

kflak commented Apr 28, 2024

Any news on this? It's getting a bit tedious having to switch back and forth between xorg and wayland...

@danoli3 danoli3 self-assigned this Jul 28, 2024
@danoli3 danoli3 added this to the 0.13.0 milestone Jul 28, 2024
@tobiashuttinger
Copy link

As a temporary fix, this can be circumvented by building glfw with the cmake flag DGLFW_BUILD_WAYLAND=OFF.

To do this on Arch Linux when installing the glfw-git version from AUR, edit PKGBUILD and set DGLFW_BUILD_WAYLAND from ON to OFF in Line 44 (currently).

@kflak
Copy link
Author

kflak commented Feb 11, 2025

As a temporary fix, this can be circumvented by building glfw with the cmake flag DGLFW_BUILD_WAYLAND=OFF.

To do this on Arch Linux when installing the glfw-git version from AUR, edit PKGBUILD and set DGLFW_BUILD_WAYLAND from ON to OFF in Line 44 (currently).

Just getting back into oF now after a bit of a pause, and your solution works!!!! Thank you so much :-) Let's hope it doesn't break something else on my system....

@ofTheo
Copy link
Member

ofTheo commented Feb 12, 2025

Thanks for sharing this temporary workaround!
Added this to our release checklist. #7588

I am guessing the changes needed for ofAppGLFWWindow won't be huge, as most of our calls are GLFW calls, so I would assume there might be just a few assumptions we might need to address to make it work for both.

@danoli3
Copy link
Member

danoli3 commented Feb 12, 2025

Fixed with Linux merge @ofTheo ! I'm just cleaning up cross compilers today

@kflak
Copy link
Author

kflak commented Feb 12, 2025

Fixed with Linux merge @ofTheo ! I'm just cleaning up cross compilers today

Does this mean I can download the nightly build soon and (hopefully) everything will work?

@danoli3
Copy link
Member

danoli3 commented Feb 12, 2025

Yes that is correct!

Just finishing up this arm64 (aarch64) slice for ubuntu

@kflak
Copy link
Author

kflak commented Feb 13, 2025

Fantastic! Thanks :-)

@anpin
Copy link

anpin commented Feb 24, 2025

@danoli3 for me a project compiled with your linux2025 branch still fails with

[ error ] ofAppGLFWWindow: 65548: Wayland: The platform does not support setting the window position
[ error ] ofAppGLFWWindow: 65550: X11: Platform not initialized
Segmentation fault (core dumped)

@ofTheo
Copy link
Member

ofTheo commented Feb 24, 2025

@anpin - can you try the nightly build here and see if it has been fixed?
https://github.com/openframeworks/openFrameworks/releases/tag/nightly

@ofTheo
Copy link
Member

ofTheo commented Feb 24, 2025

oops - nevermind I see that GLFW isn't included in the currently nightly OF/OF package.

Maybe try and grab the glfw packaged in one of the linux gcc versions here?:
https://github.com/openframeworks/apothecary/releases/tag/latest

it might be a matter of just including GLFW in the downloaded nightly OF/OF releases for Linux instead of having it part of the install script.

@danoli3
Copy link
Member

danoli3 commented Feb 25, 2025

Ah yes, adding support for wayland and X11 is probably the idea rather than remove wayland so it figures it out

@anpin
Copy link

anpin commented Feb 25, 2025

I was using nightly before switching to @danoli3 linux2025 branch. The error stayed the same. I'm on nixos with gnome, so I presume both wayland and x11 should work.

Maybe try and grab the glfw packaged in one of the linux gcc versions here?:
I do have glfw added to cmake flags for both include and link stages. Without doing this it won't compile or link properly, so the error mentioned above is on runtime.

Any tips on how to debug what is actually wrong?

@danoli3
Copy link
Member

danoli3 commented Feb 25, 2025

@anpin yeah try again with the latest libraries, download them again now just made some fixes

what gcc do you have

gcc --version

in bash

@anpin
Copy link

anpin commented Feb 25, 2025

what gcc do you have

gcc (GCC) 14.2.1 20241116

@anpin
Copy link

anpin commented Feb 25, 2025

@danoli3 I was already using glfw 3.4 from nixos, it comes with both GLFW_BUILD_WAYLAND=1 and GLFW_BUILD_X11=1 flags, but without GLFW_USE_HYBRID_HPG=1 and GLFW_VULKAN_STATIC=0

@anpin
Copy link

anpin commented Feb 25, 2025

looked at the ofAppGLFWWindow code and it doesn't seem to use wayland at all, only native x11 api is used from glfw

@danoli3
Copy link
Member

danoli3 commented Feb 26, 2025

Okay added Wayland support to #8255

@anpin
Copy link

anpin commented Feb 26, 2025

It works! thanks very much @danoli3

Image

@danoli3
Copy link
Member

danoli3 commented Feb 26, 2025

awesome!

@anpin
Copy link

anpin commented Feb 26, 2025

not sure if this is related, but if I run a more complex app (e.g. Mosaic) it fails with this stack trace

Thread 1 ".Mosaic-wrapped" received signal SIGSEGV, Segmentation fault.
0x000001100000010f in ?? ()
#0  0x000001100000010f in ?? ()
No symbol table info available.
#1  0x00007ffff636b1e8 in gtk_css_static_style_compute_value () from /nix/store/qbaqmm44k3dlrklaz9bml687jkqwsd6j-gtk+3-3.24.43/lib/libgtk-3.so.0
No symbol table info available.
#2  0x00007ffff63514cc in _gtk_css_lookup_resolve () from /nix/store/qbaqmm44k3dlrklaz9bml687jkqwsd6j-gtk+3-3.24.43/lib/libgtk-3.so.0
No symbol table info available.
#3  0x00007ffff636b16a in gtk_css_static_style_new_compute () from /nix/store/qbaqmm44k3dlrklaz9bml687jkqwsd6j-gtk+3-3.24.43/lib/libgtk-3.so.0
No symbol table info available.
#4  0x00007ffff6353f8d in gtk_css_node_real_update_style () from /nix/store/qbaqmm44k3dlrklaz9bml687jkqwsd6j-gtk+3-3.24.43/lib/libgtk-3.so.0
No symbol table info available.
#5  0x00007ffff6352b76 in gtk_css_node_ensure_style.part () from /nix/store/qbaqmm44k3dlrklaz9bml687jkqwsd6j-gtk+3-3.24.43/lib/libgtk-3.so.0
No symbol table info available.
#6  0x00007ffff6352b27 in gtk_css_node_ensure_style.part () from /nix/store/qbaqmm44k3dlrklaz9bml687jkqwsd6j-gtk+3-3.24.43/lib/libgtk-3.so.0
No symbol table info available.
#7  0x00007ffff6352e15 in gtk_css_node_get_style () from /nix/store/qbaqmm44k3dlrklaz9bml687jkqwsd6j-gtk+3-3.24.43/lib/libgtk-3.so.0
No symbol table info available.
--Type <RET> for more, q to quit, c to continue without paging--
#8  0x00007ffff64d0e60 in _gtk_style_context_peek_property () from /nix/store/qbaqmm44k3dlrklaz9bml687jkqwsd6j-gtk+3-3.24.43/lib/libgtk-3.so.0
No symbol table info available.
#9  0x00007ffff65867b2 in gtk_widget_update_alpha () from /nix/store/qbaqmm44k3dlrklaz9bml687jkqwsd6j-gtk+3-3.24.43/lib/libgtk-3.so.0
No symbol table info available.
#10 0x00007ffff6586af7 in gtk_widget_realize () from /nix/store/qbaqmm44k3dlrklaz9bml687jkqwsd6j-gtk+3-3.24.43/lib/libgtk-3.so.0
No symbol table info available.
#11 0x00007ffff6589f88 in gtk_widget_set_parent () from /nix/store/qbaqmm44k3dlrklaz9bml687jkqwsd6j-gtk+3-3.24.43/lib/libgtk-3.so.0
No symbol table info available.
#12 0x00007ffff63dc9f6 in _gtk_header_bar_update_window_buttons () from /nix/store/qbaqmm44k3dlrklaz9bml687jkqwsd6j-gtk+3-3.24.43/lib/libgtk-3.so.0
No symbol table info available.
#13 0x00007ffff5f87171 in _g_closure_invoke_va () from /nix/store/havggkqdmg0hab2lmgdpjljni5ms8n9q-glib-2.82.4/lib/libgobject-2.0.so.0
No symbol table info available.
#14 0x00007ffff5f9cfb9 in signal_emit_valist_unlocked () from /nix/store/havggkqdmg0hab2lmgdpjljni5ms8n9q-glib-2.82.4/lib/libgobject-2.0.so.0
No symbol table info available.
#15 0x00007ffff5fa2aa2 in g_signal_emit_valist () from /nix/store/havggkqdmg0hab2lmgdpjljni5ms8n9q-glib-2.82.4/lib/libgobject-2.0.so.0
No symbol table info available.
#16 0x00007ffff5fa2b5f in g_signal_emit () from /nix/store/havggkqdmg0hab2lmgdpjljni5ms8n9q-glib-2.82.4/lib/libgobject-2.0.so.0
No symbol table info available.
#17 0x00007ffff658696b in gtk_widget_realize () from /nix/store/qbaqmm44k3dlrklaz9bml687jkqwsd6j-gtk+3-3.24.43/lib/libgtk-3.so.0
No symbol table info available.
#18 0x00007ffff6586d28 in gtk_widget_map () from /nix/store/qbaqmm44k3dlrklaz9bml687jkqwsd6j-gtk+3-3.24.43/lib/libgtk-3.so.0
No symbol table info available.
#19 0x00007ffff659ebf0 in gtk_window_map () from /nix/store/qbaqmm44k3dlrklaz9bml687jkqwsd6j-gtk+3-3.24.43/lib/libgtk-3.so.0
No symbol table info available.
#20 0x00007ffff5f87171 in _g_closure_invoke_va () from /nix/store/havggkqdmg0hab2lmgdpjljni5ms8n9q-glib-2.82.4/lib/libgobject-2.0.so.0
No symbol table info available.
#21 0x00007ffff5f9cfb9 in signal_emit_valist_unlocked () from /nix/store/havggkqdmg0hab2lmgdpjljni5ms8n9q-glib-2.82.4/lib/libgobject-2.0.so.0
No symbol table info available.
#22 0x00007ffff5fa2aa2 in g_signal_emit_valist () from /nix/store/havggkqdmg0hab2lmgdpjljni5ms8n9q-glib-2.82.4/lib/libgobject-2.0.so.0
No symbol table info available.
#23 0x00007ffff5fa2b5f in g_signal_emit () from /nix/store/havggkqdmg0hab2lmgdpjljni5ms8n9q-glib-2.82.4/lib/libgobject-2.0.so.0
No symbol table info available.
#24 0x00007ffff6586cc6 in gtk_widget_map () from /nix/store/qbaqmm44k3dlrklaz9bml687jkqwsd6j-gtk+3-3.24.43/lib/libgtk-3.so.0
No symbol table info available.
#25 0x00007ffff644e430 in gtk_offscreen_window_show () from /nix/store/qbaqmm44k3dlrklaz9bml687jkqwsd6j-gtk+3-3.24.43/lib/libgtk-3.so.0
No symbol table info available.
#26 0x00007ffff5f86f68 in g_closure_invoke () from /nix/store/havggkqdmg0hab2lmgdpjljni5ms8n9q-glib-2.82.4/lib/libgobject-2.0.so.0
No symbol table info available.
#27 0x00007ffff5f9b637 in signal_emit_unlocked_R.isra.0 () from /nix/store/havggkqdmg0hab2lmgdpjljni5ms8n9q-glib-2.82.4/lib/libgobject-2.0.so.0
No symbol table info available.
#28 0x00007ffff5f9cec9 in signal_emit_valist_unlocked () from /nix/store/havggkqdmg0hab2lmgdpjljni5ms8n9q-glib-2.82.4/lib/libgobject-2.0.so.0
No symbol table info available.
#29 0x00007ffff5fa2aa2 in g_signal_emit_valist () from /nix/store/havggkqdmg0hab2lmgdpjljni5ms8n9q-glib-2.82.4/lib/libgobject-2.0.so.0
No symbol table info available.
#30 0x00007ffff5fa2b5f in g_signal_emit () from /nix/store/havggkqdmg0hab2lmgdpjljni5ms8n9q-glib-2.82.4/lib/libgobject-2.0.so.0
No symbol table info available.
#31 0x00007ffff65803fa in gtk_widget_show () from /nix/store/qbaqmm44k3dlrklaz9bml687jkqwsd6j-gtk+3-3.24.43/lib/libgtk-3.so.0
No symbol table info available.
#32 0x00007fffe7aebcd3 in draw_title_bar () from /nix/store/cn5ra4z9h7wmmc19v0p4b2791x8xj4x0-libdecor-0.2.2/lib/libdecor/plugins-1/libdecor-gtk.so
No symbol table info available.
#33 0x00007fffe7aec406 in draw_decoration () from /nix/store/cn5ra4z9h7wmmc19v0p4b2791x8xj4x0-libdecor-0.2.2/lib/libdecor/plugins-1/libdecor-gtk.so
No symbol table info available.
--Type <RET> for more, q to quit, c to continue without paging--
#34 0x00007fffe7aec573 in libdecor_plugin_gtk_frame_property_changed () from /nix/store/cn5ra4z9h7wmmc19v0p4b2791x8xj4x0-libdecor-0.2.2/lib/libdecor/plugins-1/libdecor-gtk.so
No symbol table info available.
#35 0x00007ffff7c60b59 in createShellObjects () from /nix/store/70qdm3j2sbi0z04xjfbvvif1ch6071ah-glfw-3.4/lib/libglfw.so.3
No symbol table info available.
#36 0x00007ffff7c48c96 in glfwShowWindow () from /nix/store/70qdm3j2sbi0z04xjfbvvif1ch6071ah-glfw-3.4/lib/libglfw.so.3
No symbol table info available.
#37 0x0000000000d853d2 in ofAppGLFWWindow::update (this=0x2cc2020) at /build/openFrameworks/libs/openFrameworks/app/ofAppGLFWWindow.cpp:487
No locals.
#38 0x0000000000d8a81f in ofMainLoop::loopOnce (this=this@entry=0x149ad40) at /build/openFrameworks/libs/openFrameworks/app/ofMainLoop.cpp:145
        i = {<std::__detail::_Node_iterator_base<std::pair<std::shared_ptr<ofAppBaseWindow> const, std::shared_ptr<ofBaseApp> >, false>> = {_M_cur = 0x2c62e80}, <No data fields>}
#39 0x0000000000d8ae17 in ofMainLoop::loop (this=0x149ad40) at /build/openFrameworks/libs/openFrameworks/app/ofMainLoop.cpp:125
No locals.
#40 0x0000000000d823c7 in ofRunMainLoop () at /build/openFrameworks/libs/openFrameworks/app/ofAppRunner.cpp:201
        ret = <optimized out>
#41 0x0000000000497bca in main (argc=<optimized out>, argv=<optimized out>) at src/main.cpp:121
        options = std::vector of length 0, capacity 0
        splashWinW = 428
        splashWinH = 280
        settings = {<ofGLWindowSettings> = {<ofWindowSettings> = {_vptr.ofWindowSettings = 0x12b76b0 <vtable for ofGLFWWindowSettings+16>, title = "", windowMode = OF_WINDOW, width = 1280, height = 720, sizeSet = true, position = {{
                  x = 0, r = 0, s = 0}, {y = 0, g = 0, t = 0}}, positionSet = true}, glVersionMajor = 4, glVersionMinor = 1}, numSamples = 4, doubleBuffering = true, redBits = 8, greenBits = 8, blueBits = 8, alphaBits = 8, 
          depthBits = 24, stencilBits = 0, stereo = false, visible = true, iconified = false, decorated = true, floating = false, resizable = true, transparent = false, mousePassThrough = false, maximized = false, monitor = 0, 
          multiMonitorFullScreen = false, shareContextWith = std::shared_ptr<ofAppBaseWindow> (empty) = {get() = 0x0}}
        mosaicWindow = std::shared_ptr<ofAppGLFWWindow> (use count 4, weak count 0) = {get() = 0x149af30}
        mosaicApp = std::shared_ptr<ofApp> (use count 2, weak count 0) = {get() = 0x2cbd0c0}
        splashSettings = {<ofGLWindowSettings> = {<ofWindowSettings> = {_vptr.ofWindowSettings = 0x12b76b0 <vtable for ofGLFWWindowSettings+16>, title = "", windowMode = OF_WINDOW, width = 428, height = 280, sizeSet = true, position = {
                {x = 1706, r = 1706, s = 1706}, {y = 940, g = 940, t = 940}}, positionSet = true}, glVersionMajor = 2, glVersionMinor = 1}, numSamples = 4, doubleBuffering = true, redBits = 8, greenBits = 8, blueBits = 8, 
          alphaBits = 8, depthBits = 24, stencilBits = 0, stereo = false, visible = true, iconified = false, decorated = false, floating = false, resizable = false, transparent = false, mousePassThrough = false, maximized = false, 
          monitor = 0, multiMonitorFullScreen = false, shareContextWith = std::shared_ptr<ofAppBaseWindow> (empty) = {get() = 0x0}}
        splashWindow = std::shared_ptr<ofAppGLFWWindow> (use count 3, weak count 1) = {get() = 0x2cc2020}
        splashApp = std::shared_ptr<SplashScreen> (use count 2, weak count 0) = {get() = 0x2e4dc90}

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

Successfully merging a pull request may close this issue.

6 participants