Re: segfault caused by glib/gtk?

        ok; obviously the problem here
is that (source->context != context);
not that that should mean anything to
someone not familiar with the guts of glib.

I'm going to through a wild guess on 
the table here.

a "source" in glib is something
used to dispatch events or the like.
(i.e. g_timeout_add returns the "source"
used by the main loop to call your
timeout callback... remove it with

I'm not sure about "context" but
as I can see
#1  0x4077624b in pthread_kill () from /lib/
you're using threads.

is it possible that the main_loop associated
with thread 1 (context 1 ?) is trying to 
execute the source created by thread 2 (context 2 ?). ?

Again; its just a wild guess. if it were me; I'd
read the code to be sure.


Thijs Assies wrote:


my program suddenly chrashes, while trying to figure out where, i found

GLib-ERROR **: file gmain.c: line 1633 (g_main_dispatch): assertion
failed: (source->context == context)

Program received signal SIGABRT, Aborted.
[Switching to Thread 16384 (LWP 18295)]
0x40846911 in kill () from /lib/
(gdb) backtrace
#0  0x40846911 in kill () from /lib/
#1  0x4077624b in pthread_kill () from /lib/
#2  0x40776521 in raise () from /lib/
#3  0x40847846 in abort () from /lib/
#4  0x407e3970 in g_logv (log_domain=0x407ffc8d "GLib",
    format=0x408000a0 "file %s: line %d (%s): assertion failed: (%s)",
args1=0xbffff91c) at gmessages.c:507
#5  0x407e3a1d in g_log (log_domain=0x407ffc8d "GLib",
    format=0x408000a0 "file %s: line %d (%s): assertion failed: (%s)")
at gmessages.c:526
#6  0x407dc890 in g_main_dispatch (context=0x805fd50) at gmain.c:1633
#7  0x407dd5f7 in g_main_context_dispatch (context=0x805fd50) at
#8  0x407dd9d3 in g_main_context_iterate (context=0x805fd50, block=1,
dispatch=1, self=0x8051ac8) at gmain.c:2242
#9  0x407de0af in g_main_loop_run (loop=0x814ab50) at gmain.c:2462
#10 0x4026734f in gtk_main () from /usr/lib/
#11 0x0804d274 in main (argc=1, argv=0xbffffaf4) at got_topics.c:42

i cont find wich line of my code causes this error! (line 42 of
got_topic.c = gtk_main(); )
how can i find out?

gtk-app-devel-list mailing list
gtk-app-devel-list gnome org

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