When I checkout xfce4-panel at or beyond this change and build+run it I get a crash: commit 6a7a2ace8d3c008104736b8fb20731382eea862a Author: Simon Steinbeiss <simon.steinbeiss@elfenbeinturm.at> Date: Fri Nov 9 00:19:38 2018 +0100 Fix deprecations in xfce-panel-plugin I appended the valgrind output and a gdb backtrace. valgrind xfce4-panel ==10623== Memcheck, a memory error detector ==10623== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==10623== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info ==10623== Command: xfce4-panel ==10623== DBG[xfce-sm-client.c:724] xfce_sm_client_parse_argv(): setting restart and clone commands (xfce4-panel, xfce4-panel) DBG[xfce-sm-client.c:753] xfce_sm_client_set_state(): state change: DISCONNECTED -> REGISTERING DBG[xfce-sm-client.c:1331] xfce_sm_client_set_property_from_command(): setting RestartCommand DBG[xfce-sm-client.c:1331] xfce_sm_client_set_property_from_command(): setting CloneCommand DBG[xfce-sm-client.c:753] xfce_sm_client_set_state(): state change: REGISTERING -> FROZEN DBG[xfce-sm-client.c:753] xfce_sm_client_set_state(): state change: FROZEN -> IDLE (xfce4-panel:10623): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:1602:13: not a number (xfce4-panel:10623): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:1602:13: Expected a string. (xfce4-panel:10623): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:1984:11: not a number (xfce4-panel:10623): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:1984:11: Expected a string. (xfce4-panel:10623): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2534:11: not a number (xfce4-panel:10623): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2534:11: Expected a string. (xfce4-panel:10623): Gtk-WARNING **: Theme parsing error: applications.css:21:0: Expected a valid selector (xfce4-panel:10623): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkEventBox' (xfce4-panel:10623): Gtk-CRITICAL **: gtk_event_box_set_visible_window: assertion 'GTK_IS_EVENT_BOX (event_box)' failed (xfce4-panel:10623): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed ==10623== Invalid read of size 8 ==10623== at 0x5F2AD64: ??? (in /usr/lib64/libgtk-3.so.0.2200.26) ==10623== by 0x7554918: g_cclosure_marshal_VOID__OBJECTv (in /usr/lib64/libgobject-2.0.so.0.5400.3) ==10623== by 0x7551975: ??? (in /usr/lib64/libgobject-2.0.so.0.5400.3) ==10623== by 0x756CFE3: g_signal_emit_valist (in /usr/lib64/libgobject-2.0.so.0.5400.3) ==10623== by 0x756D65E: g_signal_emit (in /usr/lib64/libgobject-2.0.so.0.5400.3) ==10623== by 0x5F7A144: gtk_container_add (in /usr/lib64/libgtk-3.so.0.2200.26) ==10623== by 0x1A243B8B: applications_menu_plugin_init (applicationsmenu.c:208) ==10623== by 0x7575F1C: g_type_create_instance (in /usr/lib64/libgobject-2.0.so.0.5400.3) ==10623== by 0x7556857: ??? (in /usr/lib64/libgobject-2.0.so.0.5400.3) ==10623== by 0x4E42507: xfce_panel_plugin_constructor (xfce-panel-plugin.c:746) ==10623== by 0x7556BDD: ??? (in /usr/lib64/libgobject-2.0.so.0.5400.3) ==10623== by 0x7558C1F: g_object_new_valist (in /usr/lib64/libgobject-2.0.so.0.5400.3) ==10623== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==10623== ==10623== ==10623== Process terminating with default action of signal 11 (SIGSEGV): dumping core ==10623== Access not within mapped region at address 0x0 ==10623== at 0x5F2AD64: ??? (in /usr/lib64/libgtk-3.so.0.2200.26) ==10623== by 0x7554918: g_cclosure_marshal_VOID__OBJECTv (in /usr/lib64/libgobject-2.0.so.0.5400.3) ==10623== by 0x7551975: ??? (in /usr/lib64/libgobject-2.0.so.0.5400.3) ==10623== by 0x756CFE3: g_signal_emit_valist (in /usr/lib64/libgobject-2.0.so.0.5400.3) ==10623== by 0x756D65E: g_signal_emit (in /usr/lib64/libgobject-2.0.so.0.5400.3) ==10623== by 0x5F7A144: gtk_container_add (in /usr/lib64/libgtk-3.so.0.2200.26) ==10623== by 0x1A243B8B: applications_menu_plugin_init (applicationsmenu.c:208) ==10623== by 0x7575F1C: g_type_create_instance (in /usr/lib64/libgobject-2.0.so.0.5400.3) ==10623== by 0x7556857: ??? (in /usr/lib64/libgobject-2.0.so.0.5400.3) ==10623== by 0x4E42507: xfce_panel_plugin_constructor (xfce-panel-plugin.c:746) ==10623== by 0x7556BDD: ??? (in /usr/lib64/libgobject-2.0.so.0.5400.3) ==10623== by 0x7558C1F: g_object_new_valist (in /usr/lib64/libgobject-2.0.so.0.5400.3) ==10623== If you believe this happened as a result of a stack ==10623== overflow in your program's main thread (unlikely but ==10623== possible), you can try to increase the size of the ==10623== main thread stack using the --main-stacksize= flag. ==10623== The main thread stack size used in this run was 8388608. ==10623== ==10623== HEAP SUMMARY: ==10623== in use at exit: 1,251,483 bytes in 15,316 blocks ==10623== total heap usage: 112,349 allocs, 97,033 frees, 7,218,716 bytes allocated ==10623== ==10623== LEAK SUMMARY: ==10623== definitely lost: 2,121 bytes in 53 blocks ==10623== indirectly lost: 13,295 bytes in 487 blocks ==10623== possibly lost: 4,736 bytes in 49 blocks ==10623== still reachable: 1,129,635 bytes in 13,890 blocks ==10623== of which reachable via heuristic: ==10623== length64 : 4,840 bytes in 82 blocks ==10623== newarray : 2,096 bytes in 51 blocks ==10623== suppressed: 0 bytes in 0 blocks ==10623== Rerun with --leak-check=full to see details of leaked memory ==10623== ==10623== For counts of detected and suppressed errors, rerun with: -v ==10623== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) GDB backtrace: #0 0x00007ffff660ad64 in gtk_bin_add () at /lib64/libgtk-3.so.0 #1 0x00007ffff548e919 in g_cclosure_marshal_VOID__OBJECTv () at /lib64/libgobject-2.0.so.0 #2 0x00007ffff548b976 in _g_closure_invoke_va () at /lib64/libgobject-2.0.so.0 #3 0x00007ffff54a6fe4 in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0 #4 0x00007ffff54a765f in g_signal_emit () at /lib64/libgobject-2.0.so.0 #5 0x00007ffff665a145 in gtk_container_add () at /lib64/libgtk-3.so.0 #6 0x00007fffd7781b8c in applications_menu_plugin_init (plugin=0x898190) at applicationsmenu.c:208 #7 0x00007ffff54aff1d in g_type_create_instance () at /lib64/libgobject-2.0.so.0 #8 0x00007ffff5490858 in g_object_constructor () at /lib64/libgobject-2.0.so.0 #9 0x00007ffff7bcb508 in xfce_panel_plugin_constructor (type=7871968, n_props=5, props=0x7fffdc0126a0) at xfce-panel-plugin.c:746 #10 0x00007ffff5490bde in g_object_new_internal () at /lib64/libgobject-2.0.so.0 #11 0x00007ffff5492c20 in g_object_new_valist () at /lib64/libgobject-2.0.so.0 #12 0x00007ffff5492f99 in g_object_new () at /lib64/libgobject-2.0.so.0 #13 0x0000000000422132 in panel_module_new_plugin (module=module@entry=0x702aa0, screen=screen@entry=0x680020, unique_id=unique_id@entry=5, arguments=arguments@entry=0x0) at panel-module.c:463 #14 0x0000000000422cac in panel_module_factory_new_plugin (factory=0x7fffdc018410, name=name@entry=0x7b5b20 "applicationsmenu", screen=0x680020, unique_id=unique_id@entry=5, arguments=arguments@entry=0x0, return_unique_id=return_unique_id@entry=0x7fffffffd99c) at panel-module-factory.c:449 #15 0x0000000000416abb in panel_application_plugin_insert (application=application@entry=0x6d0000, window=window@entry=0x701e10, name=name@entry=0x7b5b20 "applicationsmenu", unique_id=unique_id@entry=5, arguments=arguments@entry=0x0, position=position@entry=-1) at panel-application.c:786 #16 0x0000000000418016 in panel_application_load_real (application=0x6d0000) at panel-application.c:422 #17 0x00007ffff6225338 in gdk_threads_dispatch_free () at /lib64/libgdk-3.so.0 #18 0x00007ffff51af5d8 in g_source_callback_unref () at /lib64/libglib-2.0.so.0 #19 0x00007ffff51b0e14 in g_source_destroy_internal () at /lib64/libglib-2.0.so.0 #20 0x00007ffff51b2c40 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0 #21 0x00007ffff51b2f40 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0 #22 0x00007ffff51b3252 in g_main_loop_run () at /lib64/libglib-2.0.so.0 #23 0x00007ffff6722ca5 in gtk_main () at /lib64/libgtk-3.so.0 #24 0x0000000000413036 in main (argc=<optimized out>, argv=<optimized out>) at main.c:379
Strange, I can't reproduce. This happens when you start the panel? Or when you add a particular plugin (applicationsmenu)? Would be good to have steps to reproduce, or the plugins (and their versions, if external) you have in your panels.
Created attachment 8102 Patch that reverts replacing of deprecated macro Please check if the patch attached fixes the issue. That's the most suspicious part of the commit.
I can reproduce this on a fresh install of a Debian-based Linux distribution. I use a script to install dependencies, and then build and install the latest sources from git (I can paste it here later if that'll help). The panel doesn't come up when I "startx", although the desktop displays fine. When I try to start xfce4-panel from the command line I get a similar set of errors: DBG[xfce-sm-client.c:724] xfce_sm_client_parse_argv(): setting restart and clone commands (xfce4-panel, xfce4-panel) DBG[xfce-sm-client.c:753] xfce_sm_client_set_state(): state change: DISCONNECTED -> REGISTERING DBG[xfce-sm-client.c:1331] xfce_sm_client_set_property_from_command(): setting RestartCommand DBG[xfce-sm-client.c:1331] xfce_sm_client_set_property_from_command(): setting CloneCommand DBG[xfce-sm-client.c:753] xfce_sm_client_set_state(): state change: REGISTERING -> FROZEN DBG[xfce-sm-client.c:753] xfce_sm_client_set_state(): state change: FROZEN -> IDLE (xfce4-panel:1841): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkEventBox' (xfce4-panel:1841): Gtk-CRITICAL **: gtk_event_box_set_visible_window: assertion 'GTK_IS_EVENT_BOX (event_box)' failed (xfce4-panel:1841): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed
(In reply to Simon Steinbeiss from comment #2) > Created attachment 8102 > Patch that reverts replacing of deprecated macro > > Please check if the patch attached fixes the issue. That's the most > suspicious part of the commit. The patch does appear to fix the issue for me.
Simon Steinbeiss referenced this bugreport in commit 8cda5e440ab2f0bf0d43e4169c04aa9a7f535fa7 Revert replacing of G_TYPE_INSTANCE_GET_PRIVATE macro (Bug #14860) https://git.xfce.org/xfce/xfce4-panel/commit?id=8cda5e440ab2f0bf0d43e4169c04aa9a7f535fa7
Alistair Buxton referenced this bugreport in commit dc9bb3e612d7473c3917c2e5da9f01bf17148c03 libxfce4panel: Fix deprecated instance private data API https://git.xfce.org/xfce/xfce4-panel/commit?id=dc9bb3e612d7473c3917c2e5da9f01bf17148c03
I have pushed a new version of the deprecation fix. It should avoid the crash from before. Reporters, please test it and let me know. Thanks.
Works for me :-) Thanks!