Window destroy = program crash?



Hi folks,

I seem to be getting strange crashes in my app, back tracing shows a
long list of gtk function calls ... which do not help me debug.  Here's
a brief snippet:

#0  0x40318c00 in free () from /lib/libc.so.6
#1  0x40318a9b in free () from /lib/libc.so.6
#2  0x40174855 in g_free (mem=0x809ac18) at gmem.c:411
#3  0x40154480 in gdk_window_unref (window=0x809ac18) at gdkwindow.c:740

#4  0x40146743 in gdk_event_translate (event=0x8087700,
xevent=0xbffff8dc)
    at gdkevents.c:1948
#5  0x4014683d in gdk_events_queue () at gdkevents.c:2045
#6  0x40146a18 in gdk_event_dispatch (source_data=0x0,
    current_time=0xbffff9c4, user_data=0x0) at gdkevents.c:2123
#7  0x40173717 in g_main_dispatch (dispatch_time=0xbffff9c4) at
gmain.c:656
#8  0x40173cdb in g_main_iterate (block=1, dispatch=1) at gmain.c:877
#9  0x40173e59 in g_main_run (loop=0x8087690) at gmain.c:935
#10 0x400a1069 in gtk_main () at gtkmain.c:476
#11 0x804f967 in main (argc=1, argv=0xbffffab4) at main.c:100
#12 0x402d9577 in __libc_start_main () from /lib/libc.so.6

Basically, I'm creating a window as follows:

    obj_prop_win = gtk_window_new (GTK_WINDOW_DIALOG);

when the user clicks "ok" I set up some callbacks designed to grab data,
then I destroy the window with:

     gtk_signal_connect_object(GTK_OBJECT(ok_button), "clicked",
         GTK_SIGNAL_FUNC(gtk_widget_destroy),
         GTK_OBJECT(obj_prop_win));

but for some reason, this causes a crash after about 5 or 10 instances
of creating / destroying.

I am also setting the window as a transient for the parent app /
window.  But not doing that seems to have little effect.

Am I doing something wrong?

Thanks,

DT
--
Technical Director - Virginia Center for Computer Music
http://www.virginia.edu/music/vccm.html






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