[maemo-developers] delete-event processing of GtkWindow causes cordump

From: Murray Cumming murrayc at murrayc.com
Date: Mon Jul 23 18:04:38 EEST 2007
On Mon, 2007-07-23 at 22:50 +0800, Zhu, Peter J wrote:
> static gboolean delete_event_cb( GtkWidget *widget,
>                               GdkEvent  *event,
>                               gpointer   data ) {
>    return FALSE;
> }
> int main(int argc, char *argv[]) {
> 	GtkWidget* window;
> 
> 	gtk_init(&argc, &argv);
> 	window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
> 	gtk_widget_show_all(GTK_WIDGET(window));
>             g_signal_connect(G_OBJECT(window), "delete_event",
>       G_CALLBACK(delete_event_cb), NULL);
> 	gtk_main();
> 	return 0;
> }
> 
> 
> it crashes if click X of uppoer right corner. If that delete-event
> callback returns TRUE, it behaves like normal. You might note that it
> doesn't use any hildon specialized function. But it just crashes in
> hildon enviroment. 

I don't get a crash. I'm attaching a file that actually compiles (I
added the include).

I'm building it like so:
gcc test.c `pkg-config gtk+-2.0 --cflags --libs`

And then running it like so, in an x86 maemo scratchbox target:
run-standalone.sh ./a.out

In general, you should try using gdb or valgrind when something crashes.
However, if this simple test case crashes then it suggests that
something is very wrong with your installation.

-- 
Murray Cumming
murrayc at murrayc.com
www.murrayc.com
www.openismus.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.c
Type: text/x-csrc
Size: 535 bytes
Desc: not available
Url : http://lists.maemo.org/pipermail/maemo-developers/attachments/20070723/84a8cac6/attachment.c 
More information about the maemo-developers mailing list