Re: segfaults in GLib code



Have you initialized the glib threads stuff ? You have to use
gtk_threads_init()

Br

Michael Gratton escribiu:
> Hi,
> 
> I seem to be getting arbitrary segfaults in GLib code being called by
> Tinymail. They mostly seem to be occurring when constructing new
> gobjects, or registering new gobject types. Some occur during program
> startup from the main thread, some later like in the camel queue thread.
> 
> This happens with both my app and with Tinymail's
> tests/c-demo/tny-demoui, but not with other GLib programs I use
> day-to-day. Both these seem to be doing the right thing by way of
> calling g_thread_init/gdk_threads_init/gdk_threads_enter.
> 
> Has anyone encountered this before? I'm using an up-to-date trunk
> checkout. Suggestions appreciated.
> 
> Thanks,
> //Mike
> 
> Here's two examples:
> 
> #0  0x00007ffff47d74d4 in IA__g_type_fundamental (
>     type_id=<value optimized out>)
>     at /home/mjg/local/src/glib2.0-2.22.3/gobject/gtype.c:3682
> #1  0x00007ffff47c6447 in IA__g_object_new (object_type=3825212192,
>     first_property_name=0x0)
>     at /home/mjg/local/src/glib2.0-2.22.3/gobject/gobject.c:1083
> #2  0x00007ffff751b0a5 in _tny_camel_header_new () at tny-camel-header.c:373
> #3  0x00007ffff75299df in add_message_with_uid (self=<value optimized out>,
>     headers=0x8f3c10, refresh=<value optimized out>, err=<value
> optimized out>)
>     at tny-camel-folder.c:2293
> #4  tny_camel_folder_get_headers_default (self=<value optimized out>,
>     headers=0x8f3c10, refresh=<value optimized out>, err=<value
> optimized out>)
>     at tny-camel-folder.c:2559
> #5  0x00007ffff7524f83 in tny_camel_folder_get_headers_async_thread (
>     thr_user_data=0x8c3520) at tny-camel-folder.c:2393
> #6  0x00007ffff753c4a6 in tny_camel_queue_thread_main_func (
>     user_data=<value optimized out>) at tny-camel-queue.c:230
> [snip]
> 
> And the other:
> 
> #0  0x00007ffff47def41 in IA__g_type_add_interface_static (
>     instance_type=7507264, interface_type=3825207776, info=0x7ffff7234b20)
>     at /home/mjg/local/src/glib2.0-2.22.3/gobject/gtype.c:3123
> #1  0x00007ffff702c538 in tny_gtk_header_view_register_type (
>     notused=<value optimized out>) at tny-gtk-header-view.c:319
> #2  0x00007ffff4349fdb in IA__g_once_impl (once=0x7ffff7235e30,
>     func=0x7ffff702c500 <tny_gtk_header_view_register_type>, arg=0x0)
>     at /home/mjg/local/src/glib2.0-2.22.3/glib/gthread.c:190
> #3  0x00007ffff702c4d4 in tny_gtk_header_view_get_type ()
>     at tny-gtk-header-view.c:336
> #4  0x00007ffff702ced6 in tny_gtk_header_view_new ()
>     at tny-gtk-header-view.c:164
> #5  0x00007ffff701e424 in tny_gtk_msg_view_instance_init
> (instance=0x7260e0,
>     g_class=<value optimized out>) at tny-gtk-msg-view.c:827
> #6  0x00007ffff47df987 in IA__g_type_create_instance (
>     type=<value optimized out>)
>     at /home/mjg/local/src/glib2.0-2.22.3/gobject/gtype.c:1674
> #7  0x00007ffff47c47bc in g_object_constructor (type=7507264,
>     n_construct_properties=2, construct_params=0x7ffff47eca90)
>     at /home/mjg/local/src/glib2.0-2.22.3/gobject/gobject.c:1383
> #8  0x00007ffff47c55dd in IA__g_object_newv (
>     object_type=<value optimized out>, n_parameters=0, parameters=0x0)
>     at /home/mjg/local/src/glib2.0-2.22.3/gobject/gobject.c:1171
> #9  0x00007ffff47c6355 in IA__g_object_new_valist (object_type=7495248,
>     first_property_name=0x0, var_args=0x7fffffffdf80)
>     at /home/mjg/local/src/glib2.0-2.22.3/gobject/gobject.c:1323
> #10 0x00007ffff47c64ac in IA__g_object_new (object_type=7495248,
>     first_property_name=0x0)
>     at /home/mjg/local/src/glib2.0-2.22.3/gobject/gobject.c:1086
> #11 0x00007ffff701f4e2 in tny_gtk_msg_view_new () at tny-gtk-msg-view.c:793
> #12 0x000000000040636a in pimento_main_window_construct (
>     object_type=<value optimized out>, account_store=<value optimized out>)
>     at mainwindow.vala:91
> #13 0x0000000000403b8e in pimento_application_construct (
>     object_type=<value optimized out>)
> #14 0x0000000000403c49 in pimento_application_main (argc=1,
>     argv=<value optimized out>)
> #15 main (argc=1, argv=<value optimized out>) at application.vala:42
> 
> 



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