You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let arrow_cursor = Gdk.Cursor.create `ARROW in (...)
Under their specific configuration (which I could reproduce using a Windows Insider Build, to have access to WSL2 and WSLg), this call results in a warning in the terminal, and a Gpointer.Null exception in the code:
Unable to load arrow from the cursor theme
Fatal error: exception Gpointer.Null
Strangely, the code works with other cursors, such as WATCH.
Note that this only happens when Frama-C is compiled with lablgtk3; with lablgtk2, there is no such issue.
I then investigated and found out that, among the 77 tags listed in type cursor_type, in src/gdk_tags.var, only 13 seem to work in that configuration:
All the others (such as ARROW in our case) result in an error.
I tried installing almost all Ubuntu cursor theme packages and changing them as indicated here, that is, running sudo update-alternatives --config x-cursor-theme, choosing a different set, and then rebooting the Ubuntu instance; but that didn't work.
I then tried adding GDK_BACKEND=x11 before running the Frama-C GUI, and it worked again.
So, it seems to happen in a very narrow set of circumstances: lablgtk3, under WSLg, under Ubuntu 20.04 (I couldn't try other WSL distros), and when running Wayland.
I couldn't find much documentation about possible root causes, other than the fact that gdk_cursor_new seems to be deprecated.
Anyway, I'm not even sure the issue is related to lablgtk, or if there is a way to get those cursors working under WSLg. In any case, we'll probably switch to LEFT_PTR, which seems almost identical to the ARROW we were using, and seems to be in the subset of supported cursors. I'm reporting it in case others have similar issues, or someone finds a better workaround.
The text was updated successfully, but these errors were encountered:
A user of Frama-C on WSLg with Ubuntu 20.04 just reported a crash in our GUI, and it boils down to:
Under their specific configuration (which I could reproduce using a Windows Insider Build, to have access to WSL2 and WSLg), this call results in a warning in the terminal, and a
Gpointer.Null
exception in the code:Strangely, the code works with other cursors, such as
WATCH
.Note that this only happens when Frama-C is compiled with
lablgtk3
; withlablgtk2
, there is no such issue.I then investigated and found out that, among the 77 tags listed in type
cursor_type
, insrc/gdk_tags.var
, only 13 seem to work in that configuration:All the others (such as
ARROW
in our case) result in an error.I tried installing almost all Ubuntu cursor theme packages and changing them as indicated here, that is, running
sudo update-alternatives --config x-cursor-theme
, choosing a different set, and then rebooting the Ubuntu instance; but that didn't work.I then tried adding
GDK_BACKEND=x11
before running the Frama-C GUI, and it worked again.So, it seems to happen in a very narrow set of circumstances: lablgtk3, under WSLg, under Ubuntu 20.04 (I couldn't try other WSL distros), and when running Wayland.
I couldn't find much documentation about possible root causes, other than the fact that
gdk_cursor_new
seems to be deprecated.Anyway, I'm not even sure the issue is related to lablgtk, or if there is a way to get those cursors working under WSLg. In any case, we'll probably switch to
LEFT_PTR
, which seems almost identical to theARROW
we were using, and seems to be in the subset of supported cursors. I'm reporting it in case others have similar issues, or someone finds a better workaround.The text was updated successfully, but these errors were encountered: