-
Notifications
You must be signed in to change notification settings - Fork 10
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
gdk_x11_surface_get_xid
Segmentation Fault when initializing Mousetrap
#25
Comments
This time it shouldn't be a mousetrap issue, this is with the GTK backend and something about your windowing system. I can still try to help you get it working, since the GNOME forums will assume you're using C or Vala. I can't reproduce this on my 22.04 machine, I tried Xorg and Wayland, which windowing system are you using? Could you try switching to others and see if the error persists? You can swap windowing system by choosing "log out" from the shutdown menu, then on the screen where you enter your password there's a cog in the bottom right where you can switch. |
Well, I am using X11, but I cannot easily switch the windowing system because I use an nvidia graphics card with the proprietary driver, and it does not support Wayland, so the selection of Wayland is disabled by default. |
OK, I tried with different graphic drivers. Not working: Working: Not the final solution because there is no OpenGL acceleration with the nouveau driver, but at least we know now better what works and what doesn't. |
Might this be related:
|
fwiw: I'm getting the same error as @ufechner7 on Ubuntu 23.04 with X. |
Is this new in mousetrap v0.2.0 or did you have the same issue in 0.1.0? |
I don't have access to an nvidia graphics card and unlike with an OS I can't just spin up a VM to test it, so this might be hard for me to fix. Just to isolate whether it's a mousetrap issue, can you install import libadwaita_jll
ccall((:adw_init, libadwaita_jll.libadwaita), Cint, ()) If that works, exit the Julia runtime, install import GTK4_jll
ccall((:gtk_init, GTK4_jll.libgtk4), Cint, ()) If both work, please run: import GTK4_jll, libadwaita_jll
begin
ccall((:adw_init, libadwaita_jll.libadwaita), Cvoid, ())
local window = ccall((:adw_window_new, libadwaita_jll.libadwaita), Ptr{Cvoid}, ())
local area = ccall((:gtk_gl_area_new, GTK4_jll.libgtk4), Ptr{Cvoid}, ())
ccall((:adw_window_set_content, libadwaita_jll.libadwaita), Cvoid, (Ptr{Cvoid}, Ptr{Cvoid}), window, area)
ccall((:gtk_window_present, GTK4_jll.libgtk4), Cvoid, (Ptr{Cvoid},), window)
println(ccall((:gtk_widget_get_realized, GTK4_jll.libgtk4), Cint, (Ptr{Cvoid},), area) == true)
exit()
end It should print |
First time I tried to install mousetrap. |
I tried the three tests, and all works fine, even when using the nvidia driver... But I did not try the suggestion from Tim Holy yet: https://docs.julialang.org/en/v1/devdocs/backtraces/ |
I'm sorry you're still having trouble, I'm kinda forced to make you do the debugging since I can't test it myself, I apologize. Could you try the following? import libadwaita_jll, mousetrap_linux_jll
ccall((:adw_init, libadwaita_jll.libadwaita), Cvoid, ())
ccall((:_ZN9mousetrap6detail17initialize_openglEv, mousetrap_linux_jll.mousetrap_julia_binding), Cvoid, ()) Does that still crash? If it says println(mousetrap_linux_jll.mousetrap_julia_binding) Which will return a path, for me it's Then, in your bash console, not in julia, run: nm /home/clem/.julia/artifacts/2670af70bf210b40d1e852d7b5d644c76c0e7d01/lib/libmousetrap_julia_binding.so | grep initialize_opengl` With the path you got from We're calling a mangled C++ name like a C library so we can call |
Yes, it does:
|
Ok, perfect, I know how to work on a fix for this then. I'll try to get a hotfix out soon |
Hi, please run: ENV["MOUSETRAP_DISABLE_OPENGL_COMPONENT"] = "TRUE"
import Pkg; Pkg.update("mousetrap_linux_jll")
using Mousetrap Does that still crash? |
Looks better:
But the nvidia driver should support OpenGL, shouldn't it? |
It's not disabling OpenGL, it's just turning off everything related to the The issue isn't that OpenGL isn't supported, it's that during creation of the global OpenGL state that is only used to store all the data of If you want you can unset |
gdk_x11_surface_get_xid
Segmentation Fault when initializing Mousetrap
I'll keep this open for anyone else running into this. SolutionTL;DR: Certain NVIDIA drivers are causing an error in GTK4 when trying to initialize everything needed for the 1. Set
|
I am also running into this error on Ubuntu 22.04 LTS with an Nvidia graphics card and 535 driver. I am using Moustrap version 0.3.0. Here is the entry from the manifest.
When I set Is there a way to test the OpenGL piece? How would I test that? |
UPDATE: This code worked. So a user can test whether OpenGL works with the complete example below. The code was taken from the Mousetrap test cases.
|
What I did:
a. rename .julia to .julia.bak
b. create a new project and install Mousetrap as described in the README.md
I tried mousetrap on a freshly installed virtual machine, and that worked. I could also install it successfully on Ubuntu 20.04.
Any idea how to debug this issue?
The text was updated successfully, but these errors were encountered: