[PATCH] Directory view shutdown crash (#143561)
- From: Martin Wehner <martin wehner epost de>
- To: nautilus-list gnome org
- Subject: [PATCH] Directory view shutdown crash (#143561)
- Date: Wed, 02 Jun 2004 09:57:10 +0200
There's a small problem in the shutdown sequence in
disconnect_model_handlers in fm-directory-view.c:
nautilus_directory_file_monitor_remove will dispatch a state_changed
signal, which will in turn call finish_loading etc., although the view
is already in the process of being destructed. This will eventually
crash in fm_list_model_get_sort_column_id_from_attribute over a null
model pointer. This patch disconnects the callbacks before removing the
directory monitor, which fixes the problem.
Please see #143561 for instructions on how to reproduce the crash.
Martin
Index: src/file-manager/fm-directory-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-directory-view.c,v
retrieving revision 1.621
diff -u -p -w -r1.621 fm-directory-view.c
--- src/file-manager/fm-directory-view.c 1 Jun 2004 09:21:35 -0000 1.621
+++ src/file-manager/fm-directory-view.c 2 Jun 2004 07:33:56 -0000
@@ -6606,14 +6606,14 @@ disconnect_model_handlers (FMDirectoryVi
disconnect_directory_handler (view, &view->details->done_loading_handler_id);
disconnect_directory_handler (view, &view->details->load_error_handler_id);
disconnect_directory_as_file_handler (view, &view->details->file_changed_handler_id);
- nautilus_directory_file_monitor_remove (view->details->model,
- &view->details->model);
nautilus_file_cancel_call_when_ready (view->details->directory_as_file,
metadata_for_directory_as_file_ready_callback,
view);
nautilus_directory_cancel_callback (view->details->model,
metadata_for_files_in_directory_ready_callback,
view);
+ nautilus_directory_file_monitor_remove (view->details->model,
+ &view->details->model);
nautilus_file_monitor_remove (view->details->directory_as_file,
&view->details->directory_as_file);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]