HdyHeaderGroup crashes when changing decoration layout
Somehow I cannot reproduce this in libhandy example, and only see this in gnome-games with the following changes:
diff --git a/data/ui/preferences-window.ui b/data/ui/preferences-window.ui
index 3e10d978..6b569ae3 100644
--- a/data/ui/preferences-window.ui
+++ b/data/ui/preferences-window.ui
@@ -24,7 +24,6 @@
<property name="visible">True</property>
<property name="title" translatable="yes">Preferences</property>
<property name="show-close-button">True</property>
- <property name="decoration_layout">menu</property>
</object>
</child>
<child>
@@ -120,6 +119,12 @@
</object>
</child>
</template>
+ <object class="HdyHeaderGroup">
+ <headerbars>
+ <headerbar name="left_header_bar"/>
+ <headerbar name="right_header_bar"/>
+ </headerbars>
+ </object>
<object class="GtkSizeGroup">
<property name="mode">GTK_SIZE_GROUP_HORIZONTAL</property>
<widgets>
Basically, just added a HdyHeaderGroup
.
From there the steps are: Open preferences dialog, open GtkInspector, open properties for GtkSettings, click on gtk-decoration-layout
, and it immediately segfaults.
The crash doesn't happen if I change layout before opening the window with HdyHeaderGroup
.
Backtrace:
#0 0x00007ffff7fbeebe in HDY_IS_HEADER_GROUP (ptr=0x555557393130) at ../src/hdy-header-group.h:20
#1 update_decoration_layouts (self=0x555557393130) at ../src/hdy-header-group.c:73
#2 0x00007ffff741bd4d in g_closure_invoke (closure=0x555556303090, return_value=0x0, n_param_values=2, param_values=0x7fffffffc790,
invocation_hint=0x7fffffffc710) at gclosure.c:810
#3 0x00007ffff742f5c3 in signal_emit_unlocked_R (node=node@entry=0x555555622600, detail=detail@entry=1112, instance=instance@entry=0x5555557337a0,
emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffc790) at gsignal.c:3635
#4 0x00007ffff7438842 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>,
var_args=var_args@entry=0x7fffffffc960) at gsignal.c:3391
#5 0x00007ffff7438e8f in g_signal_emit (instance=instance@entry=0x5555557337a0, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3447
#6 0x00007ffff7420494 in g_object_dispatch_properties_changed (object=0x5555557337a0, n_pspecs=<optimized out>, pspecs=<optimized out>)
at gobject.c:1088
#7 0x00007ffff7422a61 in g_object_notify_by_spec_internal (pspec=<optimized out>, object=0x5555557337a0) at gobject.c:1181
#8 g_object_notify (object=0x5555557337a0, property_name=<optimized out>) at gobject.c:1229
#9 0x00007ffff79570e9 in property_editor (editor=<optimized out>, spec=0x555555765b10, object=0x5555557337a0) at inspector/prop-editor.c:1152
#10 constructed (object=<optimized out>) at inspector/prop-editor.c:1739
#11 0x00007ffff74219ab in g_object_new_internal (class=class@entry=0x555557c62400, params=params@entry=0x7fffffffcd30, n_params=n_params@entry=3)
at gobject.c:1845
#12 0x00007ffff7423634 in g_object_new_valist (object_type=<optimized out>, first_property_name=first_property_name@entry=0x7ffff7c3b0b9 "object",
var_args=var_args@entry=0x7fffffffce80) at gobject.c:2128
#13 0x00007ffff7423969 in g_object_new (object_type=<optimized out>, first_property_name=first_property_name@entry=0x7ffff7c3b0b9 "object")
at gobject.c:1648
#14 0x00007ffff79586eb in gtk_inspector_prop_editor_new (object=0x5555557337a0, name=0x55555796fd10 "gtk-decoration-layout", is_child_property=0)
at inspector/prop-editor.c:1853
#15 0x00007ffff7958b38 in row_activated (tv=<optimized out>, path=0x55555791a2c0, col=0x555557608d90, pl=0x555555a44d30) at inspector/prop-list.c:229
#16 0x00007ffff741bd4d in g_closure_invoke (closure=0x555557360570, return_value=0x0, n_param_values=3, param_values=0x7fffffffd1d0,
invocation_hint=0x7fffffffd150) at gclosure.c:810
#17 0x00007ffff742f5c3 in signal_emit_unlocked_R (node=node@entry=0x5555560d07b0, detail=detail@entry=0, instance=instance@entry=0x5555574f07c0,
emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffd1d0) at gsignal.c:3635
--Type <RET> for more, q to quit, c to continue without paging--
#18 0x00007ffff7438842 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>,
var_args=var_args@entry=0x7fffffffd3b0) at gsignal.c:3391
#19 0x00007ffff7438e8f in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3447
#20 0x00007ffff7bce006 in gtk_tree_view_multipress_gesture_pressed (gesture=0x555557608a50, n_press=<optimized out>, x=<optimized out>,
y=<optimized out>, tree_view=0x5555574f07c0) at gtktreeview.c:3373
#21 0x00007ffff60b286e in ffi_call_unix64 () at ../src/x86/unix64.S:76
#22 0x00007ffff60b223f in ffi_call (cif=cif@entry=0x7fffffffd780, fn=fn@entry=0x7ffff7bcdae0 <gtk_tree_view_multipress_gesture_pressed>,
rvalue=<optimized out>, avalue=avalue@entry=0x7fffffffd690) at ../src/x86/ffi64.c:525
#23 0x00007ffff741c9c6 in g_cclosure_marshal_generic_va (closure=0x55555593bee0, return_value=0x0, instance=<optimized out>,
args_list=<optimized out>, marshal_data=<optimized out>, n_params=3, param_types=0x5555557ab950) at gclosure.c:1614
#24 0x00007ffff741bf86 in _g_closure_invoke_va (closure=0x55555593bee0, return_value=0x0, instance=0x555557608a50, args=0x7fffffffda20, n_params=3,
param_types=0x5555557ab950) at gclosure.c:873
#25 0x00007ffff7438921 in g_signal_emit_valist (instance=0x555557608a50, signal_id=<optimized out>, detail=<optimized out>,
var_args=var_args@entry=0x7fffffffda20) at gsignal.c:3300
#26 0x00007ffff7438e8f in g_signal_emit (instance=instance@entry=0x555557608a50, signal_id=<optimized out>, detail=detail@entry=0) at gsignal.c:3447
#27 0x00007ffff7a58e58 in gtk_gesture_multi_press_begin (gesture=0x555557608a50, sequence=<optimized out>) at gtkgesturemultipress.c:241
#28 0x00007ffff741ed82 in g_cclosure_marshal_VOID__BOXEDv (closure=0x555555827be0, return_value=<optimized out>, instance=<optimized out>,
args=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x555555827c30) at gmarshal.c:1950
#29 0x00007ffff741bf86 in _g_closure_invoke_va (closure=0x555555827be0, return_value=0x0, instance=0x555557608a50, args=0x7fffffffddd0, n_params=1,
param_types=0x555555827c30) at gclosure.c:873
#30 0x00007ffff7438921 in g_signal_emit_valist (instance=0x555557608a50, signal_id=<optimized out>, detail=<optimized out>,
var_args=var_args@entry=0x7fffffffddd0) at gsignal.c:3300
#31 0x00007ffff7438e8f in g_signal_emit (instance=instance@entry=0x555557608a50, signal_id=<optimized out>, detail=detail@entry=0) at gsignal.c:3447
#32 0x00007ffff7a55cee in _gtk_gesture_set_recognized (sequence=0x0, recognized=1, gesture=0x555557608a50) at gtkgesture.c:343
#33 _gtk_gesture_check_recognized (gesture=gesture@entry=0x555557608a50, sequence=sequence@entry=0x0) at gtkgesture.c:389
#34 0x00007ffff7a57223 in gtk_gesture_handle_event (controller=0x555557608a50, event=0x5555577fd700) at gtkgesture.c:747
#35 0x00007ffff7a5a086 in gtk_gesture_single_handle_event (controller=0x555557608a50, event=0x5555577fd700) at gtkgesturesingle.c:222
#36 0x00007ffff7a22d35 in gtk_event_controller_handle_event (controller=0x555557608a50, event=event@entry=0x5555577fd700) at gtkeventcontroller.c:230
--Type <RET> for more, q to quit, c to continue without paging--
#37 0x00007ffff7bdc05b in _gtk_widget_run_controllers (widget=0x5555574f07c0, event=0x5555577fd700, phase=GTK_PHASE_BUBBLE) at gtkwidget.c:7379
#38 0x00007ffff7c30114 in _gtk_marshal_BOOLEAN__BOXEDv (closure=0x5555557378e0, return_value=0x7fffffffe170, instance=<optimized out>,
args=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x555555735e60) at gtkmarshalers.c:129
#39 0x00007ffff741bf86 in _g_closure_invoke_va (closure=0x5555557378e0, return_value=0x7fffffffe170, instance=0x5555574f07c0, args=0x7fffffffe240,
n_params=1, param_types=0x555555735e60) at gclosure.c:873
#40 0x00007ffff74382eb in g_signal_emit_valist (instance=0x5555574f07c0, signal_id=<optimized out>, detail=<optimized out>,
var_args=var_args@entry=0x7fffffffe240) at gsignal.c:3300
#41 0x00007ffff7438e8f in g_signal_emit (instance=instance@entry=0x5555574f07c0, signal_id=<optimized out>, detail=detail@entry=0) at gsignal.c:3447
#42 0x00007ffff7bde2f4 in gtk_widget_event_internal (widget=widget@entry=0x5555574f07c0, event=event@entry=0x5555577fd700) at gtkwidget.c:7744
#43 0x00007ffff7be040a in gtk_widget_event (widget=widget@entry=0x5555574f07c0, event=event@entry=0x5555577fd700) at gtkwidget.c:7314
#44 0x00007ffff7a9f096 in propagate_event_up (topmost=<optimized out>, event=<optimized out>, widget=0x5555574f07c0) at gtkmain.c:2582
#45 propagate_event (widget=<optimized out>, event=0x5555577fd700, captured=<optimized out>, topmost=0x0) at gtkmain.c:2685
#46 0x00007ffff7aa1153 in gtk_main_do_event (event=<optimized out>) at gtkmain.c:1915
#47 0x00007ffff77a41e5 in _gdk_event_emit (event=event@entry=0x5555577fd700) at gdkevents.c:73
#48 0x00007ffff77f7c52 in gdk_event_source_dispatch (base=<optimized out>, callback=<optimized out>, data=<optimized out>) at gdkeventsource.c:124
#49 0x00007ffff733a4ee in g_main_dispatch (context=0x55555564b460) at gmain.c:3182
#50 g_main_context_dispatch (context=context@entry=0x55555564b460) at gmain.c:3847
#51 0x00007ffff733a788 in g_main_context_iterate (context=context@entry=0x55555564b460, block=block@entry=1, dispatch=dispatch@entry=1,
self=<optimized out>) at gmain.c:3920
#52 0x00007ffff733a81c in g_main_context_iteration (context=context@entry=0x55555564b460, may_block=may_block@entry=1) at gmain.c:3981
#53 0x00007ffff750fe6d in g_application_run (application=0x555555653270, argc=<optimized out>, argv=0x7fffffffe6b8) at gapplication.c:2470
#54 0x00005555555bbe70 in _vala_main (args=<optimized out>, args_length1=<optimized out>)
at ../../../../../../../../../Projects/gnome-games/src/main.vala:15
#55 0x00007ffff666b00b in __libc_start_main (main=0x555555574460 <main>, argc=1, argv=0x7fffffffe6b8, init=<optimized out>, fini=<optimized out>,
rtld_fini=<optimized out>, stack_end=0x7fffffffe6a8) at ../csu/libc-start.c:308
#56 0x000055555557449a in _start () at ../sysdeps/x86_64/start.S:120