Forum: Ruby-Gnome 2 segfault from rbgtk-tree-view.c

4913bcb685792f601ae9813b4713abb9?d=identicon&s=25 Detlef Reichl (Guest)
on 2013-05-03 19:25
(Received via mailing list)
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,
key=key@entry=5548, value=value@entry=0x7fffffffc7c8) at st.c:341
341  st.c: Datei oder Verzeichnis nicht gefunden.
(gdb) bt
#0  0x00007ffff7ac7028 in st_lookup (table=0x7ffff6224bb0,
key=key@entry=5548, value=value@entry=0x7fffffffc7c8) at st.c:341
#1  0x00007ffff7b09fd9 in search_method (klass=klass@entry=25135200,
id=id@entry=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=<optimized out>,
id=<optimized out>) at vm_method.c:426
#4  0x00007ffff7b1406b in vm_method_search (ic=0x133c688,
klass=<optimized out>, id=<optimized out>) at vm_insnhelper.c:1379
#5  vm_method_search (ic=0x133c688, klass=<optimized out>, id=<optimized
out>) at vm_exec.c:38
#6  vm_exec_core (th=th@entry=0x603520, initial=initial@entry=0) at
insns.def:1014
#7  0x00007ffff7b148b4 in vm_exec (th=0x603520,
th@entry=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=<optimized out>, argc=4, argv=0x7fffffffcc30, me=0x708040) at
vm_eval.c:79
#11 0x00007ffff7b17358 in rb_call0 (self=6, scope=CALL_FCALL,
argv=0x7fffffffcc30, argc=<optimized out>, mid=6008, recv=25134120) at
vm_eval.c:236
#12 rb_call (scope=CALL_FCALL, argv=0x7fffffffcc30, argc=<optimized
out>, mid=6008, recv=25134120) at vm_eval.c:456
#13 rb_funcall (recv=recv@entry=25134120, mid=6008, n=n@entry=4) at
vm_eval.c:658
#14 0x00007ffff002300c in cell_data_func (column=0x156b5f0,
cell=0x15d6d80, model=<optimized out>, iter=<optimized out>,
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,
func=func@entry=0x7fffef9f7b40 <apply_cell_attributes>,
user_data=user_data@entry=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=<optimized out>, tree_model=0x15a3440, iter=0x17a0d00,
is_expander=<optimized out>, is_expanded=<optimized out>)
     at /tmp/buildd/gtk+3.0-3.4.2/./gtk/gtkcellarea.c:1313
#18 0x00007fffef9fd53f in gtk_cell_area_box_apply_attributes
(area=<optimized out>, tree_model=tree_model@entry=0x15a3440,
iter=iter@entry=0x17a0d00, is_expander=<optimized out>,
     is_expanded=<optimized out>) 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=<optimized out>, instance=0x15c7000, args=<optimized out>,
     marshal_data=<optimized out>, n_params=<optimized out>,
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=<optimized out>, detail=0,
var_args=var_args@entry=0x7fffffffd198)
     at
/tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c:3211
#22 0x00007ffff5fd5852 in g_signal_emit
(instance=instance@entry=0x15c7000, signal_id=<optimized out>,
detail=detail@entry=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, iter=iter@entry=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
(tree_column=tree_column@entry=0x156b5f0, tree_model=<optimized out>,
iter=iter@entry=0x7fffffffd410,
     is_expander=<optimized out>, is_expanded=<optimized out>) 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
(closure=closure@entry=0xe19d80,
return_value=return_value@entry=0x7fffffffd660,
instance=instance@entry=0x14d8390,
     args=args@entry=0x7fffffffd828, marshal_data=<optimized out>,
n_params=<optimized out>, param_types=param_types@entry=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=<optimized out>,
     n_params=<optimized out>, 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=<optimized out>, detail=0,
var_args=var_args@entry=0x7fffffffd828)
     at
/tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c:3211
#31 0x00007ffff5fd5852 in g_signal_emit
(instance=instance@entry=0x14d8390, signal_id=<optimized out>,
detail=detail@entry=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=<optimized out>) at
/tmp/buildd/gtk+3.0-3.4.2/./gtk/gtkwidget.c:5804
#34 0x00007fffefbe5d05 in gtk_widget_send_expose
(widget=widget@entry=0x14d8390, event=event@entry=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
(window=window@entry=0x1835000,
expose_region=expose_region@entry=0x134db60)
     at /tmp/buildd/gtk+3.0-3.4.2/./gdk/gdkwindow.c:3883
#37 0x00007ffff14eda0a in _gdk_window_process_updates_recurse
(window=window@entry=0x17ffea0,
expose_region=expose_region@entry=0x134db60)
     at /tmp/buildd/gtk+3.0-3.4.2/./gdk/gdkwindow.c:3928
---Type <return> to continue, or q <return> to quit---
#38 0x00007ffff14eda0a in _gdk_window_process_updates_recurse
(window=window@entry=0x17ffd80,
expose_region=expose_region@entry=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
(window=window@entry=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=<optimized out>)
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 (context=context@entry=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,
block=block@entry=1, dispatch=dispatch@entry=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=<optimized out>) at
rbgtk.c:185
#50 0x00007ffff7b19393 in vm_call_cfunc (me=0xe11510, blockptr=0x0,
recv=<optimized out>, num=0, reg_cfp=0x7ffff6b5af08, th=0x603520) at
vm_insnhelper.c:404
#51 vm_call_method (th=th@entry=0x603520, cfp=cfp@entry=0x7ffff6b5af08,
num=0, blockptr=0x0, flag=<optimized out>, id=<optimized out>,
me=0xe11510, recv=14658920) at vm_insnhelper.c:534
#52 0x00007ffff7b0f229 in vm_exec_core (th=th@entry=0x603520,
initial=initial@entry=0) at insns.def:1015
#53 0x00007ffff7b148b4 in vm_exec (th=th@entry=0x603520) at vm.c:1220
#54 0x00007ffff7b1be9d in rb_iseq_eval_main
(iseqval=iseqval@entry=6468920) at vm.c:1461
#55 0x00007ffff7a24e1a in ruby_exec_internal (n=0x62b538) at eval.c:204
#56 0x00007ffff7a258bd in ruby_exec_node (n=n@entry=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
Ee6ffca720cc428d70247dcd7377dd48?d=identicon&s=25 Kouhei Sutou (Guest)
on 2013-05-07 15:58
(Received via mailing list)
Hi,

In <5183F2C8.6030501@gmx.org>
  "[ruby-gnome2-devel-en] segfault from rbgtk-tree-view.c" on Fri, 03
May 2013 19:24:24 +0200,
  Detlef Reichl <detlef.reichl@gmx.org> 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
4913bcb685792f601ae9813b4713abb9?d=identicon&s=25 Detlef Reichl (Guest)
on 2013-05-08 20:21
(Received via mailing list)
Hi,

Am 07.05.2013 15:57, schrieb Kouhei Sutou:
> I could reproduce the problem and fixed it.
>
> Could you try again?
>

Works like a charm :-)

Thank you! detlef
Ee6ffca720cc428d70247dcd7377dd48?d=identicon&s=25 Kouhei Sutou (Guest)
on 2013-05-09 14:17
(Received via mailing list)
Hi,

In <518A9732.6000803@gmx.org>
  "Re: [ruby-gnome2-devel-en] segfault from rbgtk-tree-view.c" on Wed,
08 May 2013 20:19:30 +0200,
  Detlef Reichl <detlef.reichl@gmx.org> wrote:

> Am 07.05.2013 15:57, schrieb Kouhei Sutou:
>> I could reproduce the problem and fixed it.
>>
>> Could you try again?
>>
>
> Works like a charm :-)

Thanks for confirming it!

--
kou
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.