cannot register existing type `LINCConnection'



Hello,

I'm working on a gtk2 input module that uses GConf to store its settings.
If the input module is loaded twice I get a segfault caused by GConf.

Basically this is what I have: 

void im_module_init(GTypeModule *module) {
	gconf_client = gconf_client_get_default();
	g_object_unref(G_OBJECT(gconf_client));
	im_ja_register_type(module);
}

When the client application loads, I select the input module from the
menu. It works as expected until I select it again or some other input
method. 
The application crashes eventhough I have eliminated all other gconf
related functions calls from my input module code, except for the above 2
lines. Without the gconf code I don't get a segfault.

The weird thing is that if the module is preloaded with the GTK_IM_MODULE
env variable this bug is not triggered, I can switch between the input
modules as many times as I want.


If the same input module is loaded again, this is what I get:

(testapp:810): GLib-GObject-WARNING **: cannot register existing type
`LINCConnection'

(testapp:810): GLib-GObject-CRITICAL **: file gtype.c: line 1872
(g_type_register_static): assertion `parent_type > 0' failed

(testapp:810): GLib-GObject-CRITICAL **: file gobject.c: line 615
(g_object_new): assertion `G_TYPE_IS_OBJECT (object_type)' failed

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 830)]
0x40a697d5 in giop_connection_set_orb_n_ver () from
/usr/lib/libORBit-2.so.0

I'm attaching 2 backtraces also. The first was generated when selecting
the same input module twice. The second is when selecting something else
on the 2nd switch.

I'm using gconf 2.2.1 on debian unstable.

`ps jaxwww | grep gconf` gives
1  688  639  620 tty6 621 S 501 0:01  /usr/lib/gconf2/gconfd-2 11


Any help would be appreciated.

#0  0x40a697d5 in giop_connection_set_orb_n_ver () from /usr/lib/libORBit-2.so.0
#1  0x40a69896 in giop_connection_initiate () from /usr/lib/libORBit-2.so.0
#2  0x40a70459 in ORBit_object_get_connection () from /usr/lib/libORBit-2.so.0
#3  0x40a6e999 in ORBit_small_invoke_stub () from /usr/lib/libORBit-2.so.0
#4  0x40a6e938 in ORBit_small_invoke_stub_n () from /usr/lib/libORBit-2.so.0
#5  0x40a4fd98 in ConfigServer_ping () from /usr/lib/libgconf-2.so.4
#6  0x40a40686 in gconf_activate_server () from /usr/lib/libgconf-2.so.4
#7  0x40a48401 in gconf_engine_key_is_writable () from /usr/lib/libgconf-2.so.4
#8  0x40a484ea in gconf_engine_key_is_writable () from /usr/lib/libgconf-2.so.4
#9  0x40a46542 in gconf_engine_pop_owner_usage () from /usr/lib/libgconf-2.so.4
#10 0x40a467e7 in gconf_engine_get_default () from /usr/lib/libgconf-2.so.4
#11 0x40a49f1e in gconf_client_get_default () from /usr/lib/libgconf-2.so.4
#12 0x40a1fb39 in im_module_init (module=0x815baa8) at im-ja.c:181
#13 0x400c6516 in gtk_im_context_simple_add_table () from /usr/lib/libgtk-x11-2.0.so.0
#14 0x40356179 in g_type_module_use () from /usr/lib/libgobject-2.0.so.0
#15 0x400c6c1f in _gtk_im_module_create () from /usr/lib/libgtk-x11-2.0.so.0
#16 0x400c7213 in gtk_im_multicontext_new () from /usr/lib/libgtk-x11-2.0.so.0
#17 0x400c72c3 in gtk_im_multicontext_new () from /usr/lib/libgtk-x11-2.0.so.0
#18 0x400c5294 in gtk_im_context_get_preedit_string () from /usr/lib/libgtk-x11-2.0.so.0
#19 0x400aa3fe in gtk_entry_get_type () from /usr/lib/libgtk-x11-2.0.so.0
#20 0x4034e37f in g_cclosure_marshal_VOID__VOID () from /usr/lib/libgobject-2.0.so.0
#21 0x4033e872 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#22 0x4034df46 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#23 0x4034d0ea in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#24 0x4034d3ac in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#25 0x400c71b0 in gtk_im_multicontext_new () from /usr/lib/libgtk-x11-2.0.so.0
#26 0x400c766d in gtk_im_multicontext_new () from /usr/lib/libgtk-x11-2.0.so.0
#27 0x4034e37f in g_cclosure_marshal_VOID__VOID () from /usr/lib/libgobject-2.0.so.0
#28 0x4033e872 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#29 0x4034df46 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#30 0x4034d0ea in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#31 0x4034d2e3 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#32 0x4019bab8 in gtk_widget_activate () from /usr/lib/libgtk-x11-2.0.so.0
#33 0x400ec4b1 in gtk_menu_shell_activate_item () from /usr/lib/libgtk-x11-2.0.so.0
#34 0x400eb876 in _gtk_menu_shell_activate () from /usr/lib/libgtk-x11-2.0.so.0
#35 0x400e5dc3 in gtk_menu_reorder_child () from /usr/lib/libgtk-x11-2.0.so.0
#36 0x400df519 in _gtk_marshal_BOOLEAN__BOXED () from /usr/lib/libgtk-x11-2.0.so.0
#37 0x4033eb06 in g_cclosure_new_swap () from /usr/lib/libgobject-2.0.so.0
#38 0x4033e872 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#39 0x4034da57 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#40 0x4034cf05 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#41 0x4034d2e3 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#42 0x4019b903 in gtk_widget_send_expose () from /usr/lib/libgtk-x11-2.0.so.0
#43 0x400df344 in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
#44 0x400de3db in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#45 0x4026964a in _gdk_events_queue () from /usr/lib/libgdk-x11-2.0.so.0
#46 0x4038b1bb in unblock_source () from /usr/lib/libglib-2.0.so.0
#47 0x4038c0ad in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#48 0x4038c3af in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#49 0x4038c9de in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#50 0x400ddc97 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#51 0x08048d90 in main (argc=1, argv=0xbffffac4) at testapp.c:68
#0  0x4038b963 in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
#1  0x4038c237 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#2  0x4038c9de in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#3  0x400ddc97 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#4  0x08048d90 in main (argc=1, argv=0xbffffac4) at testapp.c:68


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]