strange segfault in threading



Hello.

I have a program that has besides the main GUI thread another thread
that creates some labels and pack them into a vbox. Before I do GUI
stuff in the thread I call gdk_threads_enter() and when I'm done I have

while (gtk_events_pending())
    gtk_main_iteration();
gdk_threads_leave();

There's no other thread.

But still the program crashes. What could be wrong? Here's the
backtrace:

--------------------------------
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208768832 (LWP 14235)]
0x4cb55dcc in free () from /lib/tls/i686/cmov/libc.so.6
(gdb) bt
#0  0x4cb55dcc in free () from /lib/tls/i686/cmov/libc.so.6
#1  0x4a93a131 in IA__g_free (mem=0x1ae4e000) at gmem.c:187
#2  0x4aaa0640 in IA__gdk_region_destroy (region=0x813203f)
    at gdkregion-generic.c:339
#3  0x4aabb86d in queue_item_free (item=0x81ad588) at
gdkgeometry-x11.c:1048
#4  0x4aabb9cf in _gdk_window_process_expose (window=0x807e108, 
    serial=18131, area=0xbf91ee08) at gdkgeometry-x11.c:1203
#5  0x4aab85a2 in gdk_event_translate (display=0x807a0e8,
event=0x81778f8, 
    xevent=0xbf91eed8, return_exposes=0) at gdkevents-x11.c:1648
#6  0x4aab8cbb in _gdk_events_queue (display=0x807a0e8)
    at gdkevents-x11.c:2252
#7  0x4aab90bf in gdk_event_dispatch (source=0x8080db0, callback=0, 
    user_data=0x0) at gdkevents-x11.c:2312
#8  0x4a932df2 in IA__g_main_context_dispatch (context=0x8080df8)
    at gmain.c:2045
#9  0x4a935dcf in g_main_context_iterate (context=0x8080df8, block=1, 
    dispatch=1, self=0x805a008) at gmain.c:2677
#10 0x4a936179 in IA__g_main_loop_run (loop=0x81748f0) at gmain.c:2881
#11 0x48180fa4 in IA__gtk_main () at gtkmain.c:1171
#12 0x0804c041 in main (argc=1, argv=0xbf91f164) at main.c:87
(gdb)
--------------------------------

Please help.

Greets,
Luka




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