Re: [Evolution-hackers] Crash in libebook (1.4.5)



you need to use g_thread_init separately to the other init bits, from
memory.

i.e. g_thread_init(NULL);

not sure if you need to init other stuff either.

On Thu, 2004-01-22 at 23:04 -0600, John Spiegel wrote:
> I'm trying to access the evolution address book with this code:
> 
> ----snip----
> int main(int argc, char** argv)
> {
>     EBook*  book;
> 
>     //g_type_init();
>     //printf("gtype inited\n");
> 
>     bonobo_activation_init(argc, argv);
>     printf("bonobo activated\n");
>     //bonobo_activation_orb_init(&argc, argv);
>     //printf("bonobo orb activated\n");
> 
>     book = e_book_new();
>     printf("Got an ebook\n");
> 
>     char* localPath = g_strdup_printf (
>             "file://%s/evolution/local/Contacts/addressbook.db", g_get_home_dir());
>     printf( "|");
>     printf(localPath);
>     printf("|\n");
> 
>     printf("|%s|\n", e_book_get_uri(book) );
>     e_book_load_uri(book, localPath, loaded_cb, NULL);
> }
> ----snip----
> 
> The code always crashes in e_book_load_uri.  Here's a backtrace from
> gdb:
> 
> (gdb) bt
> #0  0x40bb6e9d in pthread_mutex_lock () from /lib/libpthread.so.0
> #1  0x4012b72a in bonobo_object_instance_init () from /usr/lib/libbonobo-2.so.0
> #2  0x40c86a8b in g_type_create_instance () from /usr/lib/libgobject-2.0.so.0
> #3  0x40c76ee5 in g_object_constructor () from /usr/lib/libgobject-2.0.so.0
> #4  0x4012bab7 in bonobo_object_constructor () from /usr/lib/libbonobo-2.so.0
> #5  0x40c7321e in g_object_newv () from /usr/lib/libgobject-2.0.so.0
> #6  0x40c739df in g_object_new_valist () from /usr/lib/libgobject-2.0.so.0
> #7  0x40c72ffd in g_object_new () from /usr/lib/libgobject-2.0.so.0
> #8  0x40023ccc in e_book_listener_new () from /usr/lib/evolution/1.4/libebook.so.0
> #9  0x40026a76 in e_book_load_uri () from /usr/lib/evolution/1.4/libebook.so.0
> #10 0x08048dbb in main (argc=1, argv=0xbffff734) at evonopy.c:133
> 
> Is this a pthread problem?  A problem in my code?  An evolution bug?
> 
> John
> 
> 
> _______________________________________________
> evolution-hackers maillist  -  evolution-hackers lists ximian com
> http://lists.ximian.com/mailman/listinfo/evolution-hackers




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