Hi,

On 4/14/06, Kouhei Sutou <kou@cozmixng.org> wrote:
Hi,

In <ca2428780604140635l74095fadj4390d6d202331cb6@mail.gmail.com>
  "Re: [ruby-gnome2-devel-en] Re: Problem! :-) I need to turn off the Cairo support for testing a bug" on Fri, 14 Apr 2006 10:35:21 -0300,
  "Joao Pedrosa" <joaopedrosa@gmail.com> wrote:

> If you want to send your Ruby-GNOME2 with the fixes directly
> to me I will test it as soon as possible. If not, I will wait for the fix
> to show up in the anonymous CVS and I will test it, surely.

Try the attached patch. :)

I see improvements, but crashes are too easy still. Ruby Editor and Database Administrator
have crashed already:

dewd@marieta:~/workspace/pilar/db_admin/lib/db_admin$ gdb ruby
GNU gdb 6.4-debian
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".

(gdb) run db_admin.rb
Starting program: /usr/bin/ruby db_admin.rb
[Thread debugging using libthread_db enabled]
[New Thread -1210542400 (LWP 9543)]
"def show_modal parent"
"def msg parent_window, s, format = false, &block"
"22222 def msg parent_window, s, format = false, &block"
"def show_modal parent"
"hide"
"def show_modal parent"
"def show_modal parent"
"hide"
"destroying"
"def show_modal parent"
"hide"
"destroying"
"hide"
"destroying"
"hide"
"destroying"
"showing..."
"showing..."

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1210542400 (LWP 9543)]
st_lookup (table=0x141d1, key=3070233956, value=0xbf93ee9c) at st.c:245
245     st.c: Arquivo ou diretório não encontrado.
        in st.c
(gdb) bt
#0  st_lookup (table=0x141d1, key=3070233956, value=0xbf93ee9c) at st.c:245
#1  0x0806ee9f in rb_hash_aref (hash=3084099484, key=3070233956) at hash.c:419
#2  0xb7cee43c in rclosure_marshal_body (arg=0x141d1) at rbgobj_closure.c:82
#3  0x08052bd1 in rb_protect (proc=0xb7cee3d5 <rclosure_marshal_body>, data=3214143640, state=0xbf93f0b0) at eval.c:5385
#4  0xb7cee548 in rclosure_marshal (closure=0x82ed300, return_value=0x141d1, n_param_values=82385, param_values=0x141d1,
    invocation_hint=0x141d1, marshal_data=0x141d1) at rbgobj_closure.c:123
#5  0xb7cad79f in g_closure_invoke () from /usr/lib/libgobject- 2.0.so.0
#6  0xb7cbc2ea in g_signal_stop_emission () from /usr/lib/libgobject-2.0.so.0
#7  0xb7cbdb19 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#8  0xb7cbde89 in g_signal_emit () from /usr/lib/libgobject- 2.0.so.0
#9  0xb76f482d in gtk_widget_activate () from /usr/lib/libgtk-x11-2.0.so.0
#10 0xb762127f in gtk_menu_shell_activate_item () from /usr/lib/libgtk-x11-2.0.so.0
#11 0xb7621551 in gtk_menu_shell_activate_item () from /usr/lib/libgtk- x11-2.0.so.0
#12 0xb7617d04 in gtk_menu_reorder_child () from /usr/lib/libgtk-x11-2.0.so.0
#13 0xb7612610 in _gtk_marshal_BOOLEAN__BOXED () from /usr/lib/libgtk-x11-2.0.so.0
#14 0xb7cad16f in g_cclosure_new_swap () from /usr/lib/libgobject- 2.0.so.0
#15 0xb7cad79f in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#16 0xb7cbc9ce in g_signal_stop_emission () from /usr/lib/libgobject-2.0.so.0
#17 0xb7cbd886 in g_signal_emit_valist () from /usr/lib/libgobject- 2.0.so.0
#18 0xb7cbde89 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#19 0xb76f4a0f in gtk_widget_activate () from /usr/lib/libgtk-x11-2.0.so.0
#20 0xb7610d8d in gtk_propagate_event () from /usr/lib/libgtk- x11-2.0.so.0
#21 0xb761119b in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#22 0xb74b4e1c in _gdk_events_queue () from /usr/lib/libgdk-x11-2.0.so.0
#23 0xb7c43876 in g_main_context_dispatch () from /usr/lib/libglib- 2.0.so.0
#24 0xb7c46936 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#25 0xb7c46c58 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#26 0xb7610495 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#27 0xb7838f14 in gtk_m_main (self=3079697628) at rbgtkmain.c:159
#28 0x0805ce4c in rb_call0 (klass=<value optimized out>, recv=3079697628, id=5097, oid=82385, argc=0, argv=0x0,
    body=0xb7d59110, flags=0) at eval.c:5742
#29 0x0805d829 in rb_call (klass=3079695008, recv=3079697628, mid=5097, argc=0, argv=0x0, scope=0) at eval.c:5970
#30 0x0805b62b in rb_eval (self=3074018692, n=<value optimized out>) at eval.c:3430
#31 0x0805c011 in rb_eval (self=3074018692, n=<value optimized out>) at eval.c:3245
#32 0x0805f827 in rb_yield_0 (val=<value optimized out>, self=3074018692, klass=<value optimized out>, flags=0, avalue=0)
    at eval.c:4947
---Type <return> to continue, or q <return> to quit---


And:

dewd@marieta:~/workspace/pilar/ruby_editor/lib/ruby_editor$ gdb ruby
GNU gdb 6.4-debian
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".

(gdb) run ruby_editor.rb
Starting program: /usr/bin/ruby ruby_editor.rb
[Thread debugging using libthread_db enabled]
[New Thread -1210816832 (LWP 9550)]
[New Thread -1232114768 (LWP 9553)]
"def show_modal parent"
"delete-event"
"def close"
"AAAAAAAAAAAAAA"
"destroying"
"hide"
"destroying"
"destroy nah"
"OOOOOOOOOO1111111111"
"xxxxxxxxxxxxxx def Gtk.main_quit"
"def show_modal parent"
"delete-event"
"def close"
"AAAAAAAAAAAAAA"
"destroying"
"hide"
"destroying"
"destroy nah"
"OOOOOOOOOO1111111111"
"xxxxxxxxxxxxxx def Gtk.main_quit"
"def show_modal parent"
"delete-event"
"def close"
"AAAAAAAAAAAAAA"
"destroying"
"hide"
"destroying"
"destroy nah"
"OOOOOOOOOO1111111111"
"xxxxxxxxxxxxxx def Gtk.main_quit"
"def show_modal parent"
"delete-event"
"def close"
"AAAAAAAAAAAAAA"
"destroying"
"hide"
"destroying"
"destroy nah"
"OOOOOOOOOO1111111111"
"xxxxxxxxxxxxxx def Gtk.main_quit"
"HHHHHHM: (undefined method `db_str=' for nil:NilClass)"
SHHHHHHHHHHHHIIIIIIIIITTTTTTTT
undefined method `db_str=' for nil:NilClass
/home/dewd/workspace/pilar/db_rules/lib/dr/db.rb:97:in `db_str='
/home/dewd/workspace/pilar/ruby_editor/lib/ruby_editor/text_boosters.rb:198:in `insert_linked_views_of_tables'
/home/dewd/workspace/pilar/ruby_editor/lib/ruby_editor/text_boosters.rb:20:in `menu'
/home/dewd/workspace/pilar/gtk_rules/lib/gr/gtk_rules.rb:2189:in `append'
/home/dewd/workspace/pilar/gtk_rules/lib/gr/gtk_rules.rb:2255:in `sc'
/home/dewd/workspace/pilar/gtk_rules/lib/gr/gtk_rules.rb:39:in `sc'
/home/dewd/workspace/pilar/gtk_rules/lib/gr/gtk_rules.rb:2403:in `app'
/home/dewd/workspace/pilar/gtk_rules/lib/gr/gtk_rules.rb:2356:in `app'
/home/dewd/workspace/pilar/gtk_rules/lib/gr/gr.rb:1317:in `app'
/home/dewd/workspace/pilar/gtk_rules/lib/gr/gr.rb:1337:in `start'
ruby_editor.rb:11
"def show_modal parent"
"delete-event"
"def close"
"AAAAAAAAAAAAAA"
"destroying"
"hide"
"destroying"
"destroy nah"
"OOOOOOOOOO1111111111"
"xxxxxxxxxxxxxx def Gtk.main_quit"
"def show_modal parent"
"delete-event"
"def close"
"AAAAAAAAAAAAAA"
"destroying"
"hide"
"destroying"
"destroy nah"
"OOOOOOOOOO1111111111"
"xxxxxxxxxxxxxx def Gtk.main_quit"
"def show_modal parent"
"delete-event"
"def close"
"AAAAAAAAAAAAAA"
"destroying"
"hide"
"destroying"
"destroy nah"
"OOOOOOOOOO1111111111"
"xxxxxxxxxxxxxx def Gtk.main_quit "

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1210816832 (LWP 9550)]
st_lookup (table=0xa, key=3072208288, value=0xbfaf97fc) at st.c:245
245     st.c: Arquivo ou diretório não encontrado.
        in st.c
(gdb) bt
#0  st_lookup (table=0xa, key=3072208288, value=0xbfaf97fc) at st.c:245
#1  0x0806ee9f in rb_hash_aref (hash=3072829068, key=3072208288) at hash.c:419
#2  0xb7cab43c in rclosure_marshal_body (arg=0xa) at rbgobj_closure.c:82
#3  0x08052bd1 in rb_protect (proc=0xb7cab3d5 <rclosure_marshal_body>, data=3215956472, state=0xbfaf9a10) at eval.c:5385
#4  0xb7cab548 in rclosure_marshal (closure=0x86580e8, return_value=0xa, n_param_values=10, param_values=0xa,
    invocation_hint=0xa, marshal_data=0xa) at rbgobj_closure.c:123
#5  0xb7c6a79f in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#6  0xb7c792ea in g_signal_stop_emission () from /usr/lib/libgobject-2.0.so.0
#7  0xb7c7ab19 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#8  0xb7c7ae89 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#9  0xb775082d in gtk_widget_activate () from /usr/lib/libgtk-x11-2.0.so.0
#10 0xb767d27f in gtk_menu_shell_activate_item () from /usr/lib/libgtk-x11-2.0.so.0
#11 0xb767d551 in gtk_menu_shell_activate_item () from /usr/lib/libgtk-x11-2.0.so.0
#12 0xb7673d04 in gtk_menu_reorder_child () from /usr/lib/libgtk- x11-2.0.so.0
#13 0xb766e610 in _gtk_marshal_BOOLEAN__BOXED () from /usr/lib/libgtk-x11-2.0.so.0
#14 0xb7c6a16f in g_cclosure_new_swap () from /usr/lib/libgobject-2.0.so.0
#15 0xb7c6a79f in g_closure_invoke () from /usr/lib/libgobject- 2.0.so.0
#16 0xb7c799ce in g_signal_stop_emission () from /usr/lib/libgobject-2.0.so.0
#17 0xb7c7a886 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#18 0xb7c7ae89 in g_signal_emit () from /usr/lib/libgobject- 2.0.so.0
#19 0xb7750a0f in gtk_widget_activate () from /usr/lib/libgtk-x11-2.0.so.0
#20 0xb766cd8d in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
#21 0xb766d19b in gtk_main_do_event () from /usr/lib/libgtk- x11-2.0.so.0
#22 0xb7510e1c in _gdk_events_queue () from /usr/lib/libgdk-x11-2.0.so.0
#23 0xb7c00876 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#24 0xb7c03936 in g_main_context_check () from /usr/lib/libglib- 2.0.so.0
#25 0xb7c03c58 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#26 0xb766c495 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#27 0xb7894f14 in gtk_m_main (self=3083617192) at rbgtkmain.c:159
#28 0x0805ce4c in rb_call0 (klass=<value optimized out>, recv=3083617192, id=5097, oid=10, argc=0, argv=0x0,
    body=0xb73fe2d0, flags=0) at eval.c:5742
#29 0x0805d829 in rb_call (klass=3083607732, recv=3083617192, mid=5097, argc=0, argv=0x0, scope=0) at eval.c:5970
#30 0x0805b62b in rb_eval (self=3073840780, n=<value optimized out>) at eval.c:3430
#31 0x0805c011 in rb_eval (self=3073840780, n=<value optimized out>) at eval.c:3245
#32 0x0805f827 in rb_yield_0 (val=<value optimized out>, self=3073840780, klass=<value optimized out>, flags=0, avalue=0)
    at eval.c:4947
---Type <return> to continue, or q <return> to quit---


If you need help just ask.

Cheers,
Joao