Donate Share

Ruby-GNOME 2

Tracker: Bugs

5 treeview causes segfaults in two independent programs - ID: 1539572
Last Update: Comment added ( mutoh )

Twice in the past week on two different systems (home
and work), I've written programs that involve TreeViews
that segfault randomly. These were entirely separate
programs used the treeview in very different ways but
they both still crash.

(I have found other bug reports where you have told the
user to use Ruby 1.9 but I think Ruby 1.9 is the
development version and should not be used for normal
work. If Ruby-Gnome2 requires Ruby 1.9, it should
state that on the website.)

I have attached a program that started crashing
occasionally when I added code to use a list view.

To reproduce:
1) Download an image like:
http://neugierig.org/software/darcs/brawl/tools/data/MarioLuigi.gif
2) Run "./sprites MarioLuigi.gif".
3) Hit ctl-s a few times to add some things to the list.
4) Click on list elements a few times, resize the
window a few times, and it always crashes.

My other program doesn't use Gdk::Pixbuf, just string
manipulation, but it is at work so this one is easier
to submit.

Here is a backtrace:
---Type <return> to continue, or q <return> to quit---
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1211103552 (LWP 8702)]
0xb7ed69a3 in rb_hash_aref () from
/usr/lib/libruby1.8.so.1.8
(gdb) bt
#0 0xb7ed69a3 in rb_hash_aref () from
/usr/lib/libruby1.8.so.1.8
#1 0xb781da47 in Init_gtk_gdk_geometry ()
from /usr/lib/ruby/1.8/i486-linux/gtk2.so
#2 0xb7c88423 in g_cclosure_marshal_VOID__VOID ()
from /usr/lib/libgobject-2.0.so.0
#3 0xb7c7c79f in g_closure_invoke () from
/usr/lib/libgobject-2.0.so.0
#4 0xb7c8b2ea in g_signal_stop_emission () from
/usr/lib/libgobject-2.0.so.0
#5 0xb7c8cb19 in g_signal_emit_valist () from
/usr/lib/libgobject-2.0.so.0
#6 0xb7c8ce89 in g_signal_emit () from
/usr/lib/libgobject-2.0.so.0
#7 0xb754f9b6 in _gtk_action_emit_activate ()
from /usr/lib/libgtk-x11-2.0.so.0
#8 0xb755045b in gtk_action_unblock_activate_from ()
from /usr/lib/libgtk-x11-2.0.so.0
#9 0xb7c7c79f in g_closure_invoke () from
/usr/lib/libgobject-2.0.so.0
#10 0xb7c8b2ea in g_signal_stop_emission () from
/usr/lib/libgobject-2.0.so.0
#11 0xb7c8c886 in g_signal_emit_valist () from
/usr/lib/libgobject-2.0.so.0
#12 0xb7c8ce89 in g_signal_emit () from
/usr/lib/libgobject-2.0.so.0
#13 0xb754a84b in gtk_accel_group_activate () from
/usr/lib/libgtk-x11-2.0.so.0
#14 0xb754b09b in gtk_accel_groups_activate ()
from /usr/lib/libgtk-x11-2.0.so.0
#15 0xb771253f in gtk_window_activate_key () from
/usr/lib/libgtk-x11-2.0.so.0
#16 0xb7712599 in gtk_window_activate_key () from
/usr/lib/libgtk-x11-2.0.so.0
#17 0xb761c850 in _gtk_marshal_BOOLEAN__BOXED ()
#18 0xb7c7c16f in g_cclosure_new_swap () from
/usr/lib/libgobject-2.0.so.0
#19 0xb7c7c79f in g_closure_invoke () from
/usr/lib/libgobject-2.0.so.0
#20 0xb7c8b9ce in g_signal_stop_emission () from
/usr/lib/libgobject-2.0.so.0
#21 0xb7c8c886 in g_signal_emit_valist () from
/usr/lib/libgobject-2.0.so.0
#22 0xb7c8ce89 in g_signal_emit () from
/usr/lib/libgobject-2.0.so.0
#23 0xb76fec4f in gtk_widget_activate () from
/usr/lib/libgtk-x11-2.0.so.0
#24 0xb761b0d9 in gtk_propagate_event () from
/usr/lib/libgtk-x11-2.0.so.0
#25 0xb761b3db in gtk_main_do_event () from
/usr/lib/libgtk-x11-2.0.so.0
#26 0xb74beddc in _gdk_events_queue () from
/usr/lib/libgdk-x11-2.0.so.0
#27 0xb7c128c6 in g_main_context_dispatch () from
/usr/lib/libglib-2.0.so.0
#28 0xb7c15986 in g_main_context_check () from
/usr/lib/libglib-2.0.so.0
#29 0xb7c15ca8 in g_main_loop_run () from
/usr/lib/libglib-2.0.so.0
#30 0xb761a6d5 in gtk_main () from
/usr/lib/libgtk-x11-2.0.so.0
#31 0xb785946b in Init_gtk_textmark ()
from /usr/lib/ruby/1.8/i486-linux/gtk2.so
#32 0xb7eb750b in rb_iterator_p () from
/usr/lib/libruby1.8.so.1.8
#33 0xb7ec1f8c in rb_thread_trap_eval () from
/usr/lib/libruby1.8.so.1.8
#34 0xb7ec2a1f in rb_thread_trap_eval () from
/usr/lib/libruby1.8.so.1.8
#35 0xb7ebf6ab in rb_thread_trap_eval () from
/usr/lib/libruby1.8.so.1.8
#36 0xb7ecc60a in rb_eval_string () from
/usr/lib/libruby1.8.so.1.8
#37 0xb7ecc65a in ruby_exec () from
/usr/lib/libruby1.8.so.1.8
#38 0xb7ece76e in ruby_run () from
/usr/lib/libruby1.8.so.1.8



Here is what valgrind dies with:
==8687==
==8687== Invalid read of size 4
==8687== at 0x40769A3: rb_hash_aref (in
/usr/lib/libruby1.8.so.1.8.4)
==8687== by 0x49FCA46: (within
/usr/lib/ruby/1.8/i486-linux/gtk2.so)
==8687== by 0x43EF422: g_cclosure_marshal_VOID__VOID
(in /usr/lib/libgobject-2.0.so.0.1000.2)
==8687== by 0x43E379E: g_closure_invoke (in
/usr/lib/libgobject-2.0.so.0.1000.2)
==8687== by 0x43F22E9: (within
/usr/lib/libgobject-2.0.so.0.1000.2)
==8687== by 0x43F3B18: g_signal_emit_valist (in
/usr/lib/libgobject-2.0.so.0.1000.2)
==8687== by 0x43F3E88: g_signal_emit (in
/usr/lib/libgobject-2.0.so.0.1000.2)==8687== by
0x4AB49B5: _gtk_action_emit_activate (in
/usr/lib/libgtk-x11-2.0.so.0.800.17)
==8687== by 0x4AB545A: (within
/usr/lib/libgtk-x11-2.0.so.0.800.17)
==8687== by 0x43E379E: g_closure_invoke (in
/usr/lib/libgobject-2.0.so.0.1000.2)
==8687== by 0x43F22E9: (within
/usr/lib/libgobject-2.0.so.0.1000.2)
==8687== by 0x43F3885: g_signal_emit_valist (in
/usr/lib/libgobject-2.0.so.0.1000.2)
==8687== Address 0xC is not stack'd, malloc'd or
(recently) free'd
./sprites:208: [BUG] Segmentation fault
ruby 1.8.4 (2005-12-24) [i486-linux]


My package versions:
libgtk2-ruby: 0.14.1-1.1build1
libgtk2.0-0: 2.8.17-1ubuntu5


Evan Martin ( eeyem ) - 2006-08-13 15:20

5

Closed

Out of Date

Nobody/Anonymous

None

None

Public


Comments ( 2 )

Date: 2007-06-15 18:02
Sender: mutohProject AdminAccepting Donations


No answer has been replied for a long time. Closed.


Date: 2006-10-14 04:46
Sender: ktouProject Admin

Logged In: YES
user_id=1012232

Does CVS version Ruby/GTK2 causes this problem too?


Attached Files ( 2 )

Filename Description Download
sprites Download
MarioLuigi.gif the data file i mentioned in the bug report Download

Changes ( 5 )

Field Old Value Date By
status_id Open 2007-06-15 18:02 mutoh
resolution_id None 2007-06-15 18:02 mutoh
close_date - 2007-06-15 18:02 mutoh
File Added 188915: MarioLuigi.gif 2006-08-13 15:21 eeyem
File Added 188914: sprites 2006-08-13 15:20 eeyem