Segfault from rbgtk-tree-view.c

Hi,

With github pull request 151 I’ve made the stock browser sample gtk3
ready. If I scroll up and down in den list view, the program crashes
with a segfault. It seems to be in the ruby bindings. The original C
version doesn’t show this behavior.

$ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]

Here is the back trace:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7ac7028 in st_lookup (table=0x7ffff6224bb0,
[email protected]=5548, [email protected]=0x7fffffffc7c8) at st.c:341
341 st.c: Datei oder Verzeichnis nicht gefunden.
(gdb) bt
#0 0x00007ffff7ac7028 in st_lookup (table=0x7ffff6224bb0,
[email protected]=5548, [email protected]=0x7fffffffc7c8) at st.c:341
#1 0x00007ffff7b09fd9 in search_method ([email protected]=25135200,
[email protected]=5548) at vm_method.c:374
#2 0x00007ffff7b0bef1 in rb_method_entry_get_without_cache
(klass=25135200, id=5548) at vm_method.c:393
#3 0x00007ffff7b0bf8e in rb_method_entry (klass=,
id=) at vm_method.c:426
#4 0x00007ffff7b1406b in vm_method_search (ic=0x133c688,
klass=, id=) at vm_insnhelper.c:1379
#5 vm_method_search (ic=0x133c688, klass=, id=) at vm_exec.c:38
#6 vm_exec_core ([email protected]=0x603520, [email protected]=0) at
insns.def:1014
#7 0x00007ffff7b148b4 in vm_exec (th=0x603520,
[email protected]=0x107f8b48fb894853) at vm.c:1220
#8 0x00007ffff7b154d0 in invoke_block_from_c (cref=0x0, blockptr=<error
reading variable: Cannot access memory at address 0x107f8b48fb894893>,
argv=0x7fffffffcc30, argc=4, self=24423280,
block=0x17fed10, th=0x107f8b48fb894853) at vm.c:624
#9 rb_vm_invoke_proc (th=0x107f8b48fb894853, proc=0x17fed10,
self=24423280, argc=4, argv=0x7fffffffcc30,
blockptr=<error reading variable: Cannot access memory at address
0x107f8b48fb894893>) at vm.c:670
#10 0x00007ffff7b15882 in vm_call0 (th=0x603520, recv=25134120,
id=, argc=4, argv=0x7fffffffcc30, me=0x708040) at
vm_eval.c:79
#11 0x00007ffff7b17358 in rb_call0 (self=6, scope=CALL_FCALL,
argv=0x7fffffffcc30, argc=, mid=6008, recv=25134120) at
vm_eval.c:236
#12 rb_call (scope=CALL_FCALL, argv=0x7fffffffcc30, argc=, mid=6008, recv=25134120) at vm_eval.c:456
#13 rb_funcall ([email protected]=25134120, mid=6008, [email protected]=4) at
vm_eval.c:658
#14 0x00007ffff002300c in cell_data_func (column=0x156b5f0,
cell=0x15d6d80, model=, iter=,
func=0x17f8428) at rbgtk-tree-view.c:84
#15 0x00007fffef9f7c53 in apply_cell_attributes (renderer=0x15d6d80,
info=0x17feb20, data=0x7fffffffce00) at
/tmp/buildd/gtk+3.0-3.4.2/./gtk/gtkcellarea.c:1284
#16 0x00007ffff5cedd00 in g_hash_table_foreach (hash_table=0x176a2a0,
[email protected]=0x7fffef9f7b40 <apply_cell_attributes>,
[email protected]=0x7fffffffce00)
at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./glib/ghash.c:1524
#17 0x00007fffef9f7af6 in gtk_cell_area_real_apply_attributes
(area=, tree_model=0x15a3440, iter=0x17a0d00,
is_expander=, is_expanded=)
at /tmp/buildd/gtk+3.0-3.4.2/./gtk/gtkcellarea.c:1313
#18 0x00007fffef9fd53f in gtk_cell_area_box_apply_attributes
(area=, [email protected]=0x15a3440,
[email protected]=0x17a0d00, is_expander=,
is_expanded=) at
/tmp/buildd/gtk+3.0-3.4.2/./gtk/gtkcellareabox.c:1317
#19 0x00007fffefab60b8 in
_gtk_marshal_VOID__OBJECT_BOXED_BOOLEAN_BOOLEANv (closure=0x156bbc0,
return_value=, instance=0x15c7000, args=,
marshal_data=, n_params=,
param_types=0x149c800) at
/tmp/buildd/gtk+3.0-3.4.2/./gtk/gtkmarshalers.c:4874
#20 0x00007ffff5fbc9a7 in _g_closure_invoke_va (closure=0x156bbc0,
return_value=0x0, instance=0x15c7000, args=0x7fffffffd198, n_params=4,
param_types=0x149c800)
at
/tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gclosure.c:840
#21 0x00007ffff5fd5006 in g_signal_emit_valist (instance=0x15c7000,
signal_id=, detail=0,
[email protected]=0x7fffffffd198)
at
/tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c:3211
#22 0x00007ffff5fd5852 in g_signal_emit
([email protected]=0x15c7000, signal_id=,
[email protected]=0)
at
/tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c:3356
#23 0x00007fffef9f9954 in gtk_cell_area_apply_attributes
(area=0x15c7000, tree_model=0x15a3440, [email protected]=0x7fffffffd410,
is_expander=0, is_expanded=0)
at /tmp/buildd/gtk+3.0-3.4.2/./gtk/gtkcellarea.c:2362
#24 0x00007fffefbca8ad in gtk_tree_view_column_cell_set_cell_data
([email protected]=0x156b5f0, tree_model=,
[email protected]=0x7fffffffd410,
is_expander=, is_expanded=) at
/tmp/buildd/gtk+3.0-3.4.2/./gtk/gtktreeviewcolumn.c:2872
#25 0x00007fffefbb4246 in gtk_tree_view_bin_draw (cr=0x15d44d0,
widget=0x14d8390) at /tmp/buildd/gtk+3.0-3.4.2/./gtk/gtktreeview.c:4956
#26 gtk_tree_view_draw (widget=0x14d8390, cr=0x15d44d0) at
/tmp/buildd/gtk+3.0-3.4.2/./gtk/gtktreeview.c:5365
#27 0x00007fffefaaf47f in _gtk_marshal_BOOLEAN__BOXEDv
([email protected]=0xe19d80,
[email protected]=0x7fffffffd660,
[email protected]=0x14d8390,
[email protected]=0x7fffffffd828, marshal_data=,
n_params=, [email protected]=0xc05cb0) at
/tmp/buildd/gtk+3.0-3.4.2/./gtk/gtkmarshalers.c:130
#28 0x00007fffefbd4c9e in gtk_widget_draw_marshallerv (closure=0xe19d80,
return_value=0x7fffffffd660, instance=0x14d8390, args=0x7fffffffd828,
marshal_data=,
n_params=, param_types=0xc05cb0) at
/tmp/buildd/gtk+3.0-3.4.2/./gtk/gtkwidget.c:850
#29 0x00007ffff5fbc9a7 in _g_closure_invoke_va (closure=0xe19d80,
return_value=0x7fffffffd660, instance=0x14d8390, args=0x7fffffffd828,
n_params=1, param_types=0xc05cb0)
at
/tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gclosure.c:840
#30 0x00007ffff5fd5006 in g_signal_emit_valist (instance=0x14d8390,
signal_id=, detail=0,
[email protected]=0x7fffffffd828)
at
/tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c:3211
#31 0x00007ffff5fd5852 in g_signal_emit
([email protected]=0x14d8390, signal_id=,
[email protected]=0)
at
/tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c:3356
#32 0x00007fffefbe5b4e in _gtk_widget_draw_internal (clip_to_size=1,
cr=0x15d44d0, widget=0x14d8390) at
/tmp/buildd/gtk+3.0-3.4.2/./gtk/gtkwidget.c:5828
#33 _gtk_widget_draw_internal (widget=0x14d8390, cr=0x15d44d0,
clip_to_size=) at
/tmp/buildd/gtk+3.0-3.4.2/./gtk/gtkwidget.c:5804
#34 0x00007fffefbe5d05 in gtk_widget_send_expose
([email protected]=0x14d8390, [email protected]=0x7fffffffd9e0) at
/tmp/buildd/gtk+3.0-3.4.2/./gtk/gtkwidget.c:6211
#35 0x00007fffefaaf2a2 in gtk_main_do_event (event=0x7fffffffd9e0) at
/tmp/buildd/gtk+3.0-3.4.2/./gtk/gtkmain.c:1621
#36 0x00007ffff14eda60 in _gdk_window_process_updates_recurse
([email protected]=0x1835000,
[email protected]=0x134db60)
at /tmp/buildd/gtk+3.0-3.4.2/./gdk/gdkwindow.c:3883
#37 0x00007ffff14eda0a in _gdk_window_process_updates_recurse
([email protected]=0x17ffea0,
[email protected]=0x134db60)
at /tmp/buildd/gtk+3.0-3.4.2/./gdk/gdkwindow.c:3928
—Type to continue, or q to quit—
#38 0x00007ffff14eda0a in _gdk_window_process_updates_recurse
([email protected]=0x17ffd80,
[email protected]=0x134db60)
at /tmp/buildd/gtk+3.0-3.4.2/./gdk/gdkwindow.c:3928
#39 0x00007ffff14eda0a in _gdk_window_process_updates_recurse
(window=0x17ffb40, expose_region=0x134db60) at
/tmp/buildd/gtk+3.0-3.4.2/./gdk/gdkwindow.c:3928
#40 0x00007ffff14eceb6 in gdk_window_process_updates_internal
([email protected]=0x17ffb40) at
/tmp/buildd/gtk+3.0-3.4.2/./gdk/gdkwindow.c:4069
#41 0x00007ffff14ed338 in gdk_window_process_all_updates () at
/tmp/buildd/gtk+3.0-3.4.2/./gdk/gdkwindow.c:4200
#42 0x00007ffff14ed3a9 in gdk_window_update_idle (data=)
at /tmp/buildd/gtk+3.0-3.4.2/./gdk/gdkwindow.c:3818
#43 0x00007ffff14d0980 in gdk_threads_dispatch (data=0x17a86e0) at
/tmp/buildd/gtk+3.0-3.4.2/./gdk/gdk.c:763
#44 0x00007ffff5cfd355 in g_main_dispatch (context=0x9afda0) at
/tmp/buildd/glib2.0-2.33.12+really2.32.4/./glib/gmain.c:2539
#45 g_main_context_dispatch ([email protected]=0x9afda0) at
/tmp/buildd/glib2.0-2.33.12+really2.32.4/./glib/gmain.c:3075
#46 0x00007ffff5cfd688 in g_main_context_iterate (context=0x9afda0,
[email protected]=1, [email protected]=1, self=<error reading
variable: Unhandled dwarf expression opcode 0xfa>)
at /tmp/buildd/glib2.0-2.33.12+really2.32.4/./glib/gmain.c:3146
#47 0x00007ffff5cfda82 in g_main_loop_run (loop=0x156c620) at
/tmp/buildd/glib2.0-2.33.12+really2.32.4/./glib/gmain.c:3340
#48 0x00007fffefaae3b5 in gtk_main () at
/tmp/buildd/gtk+3.0-3.4.2/./gtk/gtkmain.c:1161
#49 0x00007ffff000f719 in rg_s_main (self=) at
rbgtk.c:185
#50 0x00007ffff7b19393 in vm_call_cfunc (me=0xe11510, blockptr=0x0,
recv=, num=0, reg_cfp=0x7ffff6b5af08, th=0x603520) at
vm_insnhelper.c:404
#51 vm_call_method ([email protected]=0x603520, [email protected]=0x7ffff6b5af08,
num=0, blockptr=0x0, flag=, id=,
me=0xe11510, recv=14658920) at vm_insnhelper.c:534
#52 0x00007ffff7b0f229 in vm_exec_core ([email protected]=0x603520,
[email protected]=0) at insns.def:1015
#53 0x00007ffff7b148b4 in vm_exec ([email protected]=0x603520) at vm.c:1220
#54 0x00007ffff7b1be9d in rb_iseq_eval_main
([email protected]=6468920) at vm.c:1461
#55 0x00007ffff7a24e1a in ruby_exec_internal (n=0x62b538) at eval.c:204
#56 0x00007ffff7a258bd in ruby_exec_node ([email protected]=0x62b538) at
eval.c:251
#57 0x00007ffff7a2734e in ruby_run_node (n=0x62b538) at eval.c:244
#58 0x000000000040091b in ?? ()
#59 0x00007fffffffe3b8 in ?? ()
#60 0x0000000200400920 in ?? ()
#61 0x00007fffffffe3b0 in ?? ()
#62 0x0000000000000000 in ?? ()
(gdb)

Cheers, detlef

Hi,

In [email protected]
“[ruby-gnome2-devel-en] segfault from rbgtk-tree-view.c” on Fri, 03
May 2013 19:24:24 +0200,
Detlef R. [email protected] wrote:

With github pull request 151 I’ve made the stock browser sample gtk3
ready. If I scroll up and down in den list view, the program crashes
with a segfault. It seems to be in the ruby bindings. The original C
version doesn’t show this behavior.

Thanks for your report.
I could reproduce the problem and fixed it.

Could you try again?

Thanks,

kou

Hi,

Am 07.05.2013 15:57, schrieb Kouhei S.:

I could reproduce the problem and fixed it.

Could you try again?

Works like a charm :slight_smile:

Thank you! detlef

Hi,

In [email protected]
“Re: [ruby-gnome2-devel-en] segfault from rbgtk-tree-view.c” on Wed,
08 May 2013 20:19:30 +0200,
Detlef R. [email protected] wrote:

Am 07.05.2013 15:57, schrieb Kouhei S.:

I could reproduce the problem and fixed it.

Could you try again?

Works like a charm :slight_smile:

Thanks for confirming it!


kou