[patch] Nautilus segfaults when quiting



Hi,

I'm getting a segfault whenever I quit nautilus (logging out or with
nautilus --quit) and I had a volume mounted.  I tracked down the problem
and it seems the desktop view gets a notification of the deleted link
for the CD in the finalize method where the nautilus view is no longer
available.  The crash is on schedule_update_menus (fails the assertion).

The patch makes the FMDirectoryView disconnect its model handlers in
destroy instead of finalize.  I don't know if this is correct, but it
seems to work for me.

HTH,
Gustavo

? fm-directory-view.patch
Index: fm-directory-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-directory-view.c,v
retrieving revision 1.535
diff -u -r1.535 fm-directory-view.c
--- fm-directory-view.c	22 May 2002 11:41:54 -0000	1.535
+++ fm-directory-view.c	23 May 2002 08:13:55 -0000
@@ -1286,6 +1286,8 @@
 
 	view = FM_DIRECTORY_VIEW (object);
 
+	disconnect_model_handlers (view);
+
 	/* Since we are owned by the NautilusView, if we're going it's
 	 * gone. It would be even better to NULL this out when the
 	 * NautilusView goes away, but this is good enough for our
@@ -1315,7 +1317,6 @@
 		remove_directory_from_scripts_directory_list (view, node->data);
 	}
 
-	disconnect_model_handlers (view);
 	nautilus_directory_unref (view->details->model);
 	view->details->model = NULL;
 	nautilus_file_unref (view->details->directory_as_file);


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