gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
I'm getting this error on Ubuntu 25.04/x86_64 using the yaru-dark theme.
geany --version
geany 2.0 (built on 2024-11-11 with GTK 3.24.43, GLib 2.82.2)
I ran it with valgrind to try to get some debug output using G_DEBUG=fatal-criticals valgrind --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes geany &> geany.bt.txt in case that helps figure this out:
Seems to originate from the addons plugin.
It would be useful if you could compile and install Geany plus geany-plugins and try if the problem is present also in the latest version from git master.
In addition, if you are able to reproduce the problem, try to debug Geany using gdb
gdb geany
and then then run it using
r --g-fatal-warnings
If it crashes, please post a backtrace you obtain by typing bt.
I can confirm that this issue does not crop up when building geany and geany-plugins from git master!
Whoops! It does appear when I enable the addons plugin...
This is the requested gdb backtrace:
(gdb) r --g-fatal-warnings
Starting program: /usr/local/bin/geany --g-fatal-warnings
This GDB supports auto-downloading debuginfo from the following URLs:
<https://debuginfod.ubuntu.com>
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Function(s) ^std::(move|forward|as_const|(__)?addressof) will be skipped when stepping.
Function(s) ^std::(shared|unique)_ptr<.*>::(get|operator) will be skipped when stepping.
Function(s) ^std::(basic_string|vector|array|deque|(forward_)?list|(unordered_|flat_)?(multi)?(map|set)|span)<.*>::(c?r?(begin|end)|front|back|data|size|empty) will be skipped when stepping.
Function(s) ^std::(basic_string|vector|array|deque|span)<.*>::operator.] will be skipped when stepping.
Downloading 1.57 M separate debug info for /lib/x86_64-linux-gnu/libepoxy.so.0
Downloading 134.12 K separate debug info for /lib/x86_64-linux-gnu/libXi.so.6
Downloading 1.43 M separate debug info for /lib/x86_64-linux-gnu/libX11.so.6
Downloading 39.97 K separate debug info for /lib/x86_64-linux-gnu/libXfixes.so.3
Downloading 114.24 K separate debug info for /lib/x86_64-linux-gnu/libXext.so.6
Downloading 24.27 K separate debug info for /lib/x86_64-linux-gnu/libXdamage.so.1
Downloading 24.67 K separate debug info for /lib/x86_64-linux-gnu/libXcomposite.so.1
Downloading 74.91 K separate debug info for /lib/x86_64-linux-gnu/libXrandr.so.2
Downloading 23.80 K separate debug info for /lib/x86_64-linux-gnu/libXinerama.so.1
Downloading 50.63 K separate debug info for /lib/x86_64-linux-gnu/libthai.so.0
Downloading 117.11 K separate debug info for /lib/x86_64-linux-gnu/libz.so.1
Downloading 1.34 M separate debug info for /lib/x86_64-linux-gnu/libfreetype.so.6
Downloading 141.34 K separate debug info for /lib/x86_64-linux-gnu/libXrender.so.1
Downloading 224.08 K separate debug info for /lib/x86_64-linux-gnu/libxcb.so.1
Downloading 65.77 K separate debug info for /lib/x86_64-linux-gnu/libxcb-render.so.0
Downloading 15.66 K separate debug info for /lib/x86_64-linux-gnu/libxcb-shm.so.0
Downloading 2.20 M separate debug info for /lib/x86_64-linux-gnu/libpixman-1.so.0
Downloading 602.16 K separate debug info for /lib/x86_64-linux-gnu/libmount.so.1
Downloading 471.65 K separate debug info for /lib/x86_64-linux-gnu/libgraphite2.so.3
Downloading 48.91 K separate debug info for /lib/x86_64-linux-gnu/libdatrie.so.1
Downloading 73.76 K separate debug info for /lib/x86_64-linux-gnu/libbz2.so.1.0
Downloading 19.00 K separate debug info for /lib/x86_64-linux-gnu/libXau.so.6
Downloading 548.34 K separate debug info for /lib/x86_64-linux-gnu/libblkid.so.1
[New Thread 0x7ffff53016c0 (LWP 57505)]
[New Thread 0x7ffff4b006c0 (LWP 57506)]
[New Thread 0x7fffeffff6c0 (LWP 57507)]
[New Thread 0x7fffef7fe6c0 (LWP 57508)]
[New Thread 0x7fffeeffd6c0 (LWP 57509)]
[New Thread 0x7fffee6026c0 (LWP 57510)]
(geany:57479): Gtk-CRITICAL **: 11:04:58.543: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
Thread 1 "geany" received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff7803f0f in g_logv () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
(gdb) bt
#0 0x00007ffff7803f0f in g_logv () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
geany/geany#1 0x00007ffff7804123 in g_log () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
geany/geany#2 0x00007ffff7307a17 in gtk_widget_get_scale_factor () at /lib/x86_64-linux-gnu/libgtk-3.so.0
geany/geany#3 0x00007ffff73e6cc1 in ??? () at /lib/x86_64-linux-gnu/libgtk-3.so.0
geany/geany#4 0x00007fffed8c6351 in ao_systray_init (self=0x555555e45180) at ao_systray.c:186
geany/geany#5 0x00007ffff69934b1 in g_type_create_instance () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
geany/geany#6 0x00007ffff6974522 in ??? () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
geany/geany#7 0x00007ffff69773db in g_object_new_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
geany/geany#8 0x00007ffff69777cf in g_object_new () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
geany/geany#9 0x00007fffed8c66b2 in ao_systray_new (enable=<optimized out>) at ao_systray.c:234
geany/geany#10 0x00007fffed8c1971 in plugin_addons_init (plugin=<optimized out>, pdata=<optimized out>) at addons.c:420
geany/geany#11 0x00007ffff7bea93e in plugin_load (plugin=0x555555e89460) at ../src/plugins.c:531
geany/geany#12 plugin_new
(proxy=0x7ffff7f96d20 <builtin_so_proxy_plugin>, fname=fname@entry=0x555555f15ff0 "/usr/local/lib/x86_64-linux-gnu/geany/addons.so", load_plugin=load_plugin@entry=1, add_to_list=add_to_list@entry=0) at ../src/plugins.c:682
geany/geany#13 0x00007ffff7bebb61 in load_active_plugins () at ../src/plugins.c:1084
geany/geany#14 plugins_load_active () at ../src/plugins.c:1228
geany/geany#15 0x00007ffff7be474a in main_lib (argc=<optimized out>, argv=<optimized out>) at ../src/libmain.c:1216
geany/geany#16 0x00007ffff7929338 in __libc_start_call_main
(main=main@entry=0x555555555060 <main>, argc=argc@entry=2, argv=argv@entry=0x7fffffffdd98)
at ../sysdeps/nptl/libc_start_call_main.h:58
geany/geany#17 0x00007ffff79293fb in __libc_start_main_impl
(main=0x555555555060 <main>, argc=2, argv=0x7fffffffdd98, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdd88) at ../csu/libc-start.c:360
geany/geany#18 0x0000555555555095 in _start ()
(gdb)```
I've transferred this issue to geany-plugins.
The error message seems to come from within the gtk_status_icon_set_from_icon_name() call but I'm not sure if we can actually do anything about it.
FWIW I don't get this, but I get:
(geany:487193): Gdk-CRITICAL **: 23:33:17.361: gdk_window_thaw_toplevel_updates: assertion 'window->update_and_descendants_freeze_count > 0' failed
with the systray addon (and it does trace back to a GtkTrayIcon, so it's unlikely to be a coincidence 🙂 )
Not sure if we can do anything about it, unless there's some weird implicit requirement the addon plugin isn't following.