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

From: Zhu, Peter J peter.j.zhu at intel.com
Date: Mon Jul 23 17:50:43 EEST 2007

Thanks for response. I might stated unclear. 

As stated at last mail, I have written a very simple test case like

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);
            g_signal_connect(G_OBJECT(window), "delete_event",
      G_CALLBACK(delete_event_cb), NULL);
	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. 

Any ideas?


Murray Cumming wrote:
> On Mon, 2007-07-23 at 16:36 +0800, Zhu, Peter J wrote:
>> Hi,
>> As I wrote one application for new hildon-1/hildon-wm, I found there
>> is a serious problem with one of the toplevel windows it creates. If
>> one tries to close that window by click X at top right corner,
>> coredump happens. Then 
>> I tried to found the difference of that window with others. Then
>> I found that the buggy window has connected with "delete-event"
>> signal and the callback of the signal returns FALSE to let window
>> continue destroy. 
>> To verify the issue is NOT caused by the special application logic
>> itself, I write one very simle program that only creates one toplevel
>> window and has delete-event-cb callback. If the callback returns
>> TRUE, no problem. If it returns FALSE, then the program coredump as
>> attched at last of mail. 
>> In my understanding it should be a problem of components of app
>> framework. It might be hildon-wm, matchbox or gtk porting
>> itself.
> This is a very common technique. You should try to create a
> simple-as-possible test case. That will probably show the real cause
> of the error in your own code. And if there's really a problem then
> it will help people to fix it.
> --
> Murray Cumming
> murrayc at murrayc.com
> www.murrayc.com
> www.openismus.com

More information about the maemo-developers mailing list