summaryrefslogtreecommitdiff
path: root/src/file-manager/fm-icon-view.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2006-10-31 09:21:53 +0000
committerAlexander Larsson <alexl@src.gnome.org>2006-10-31 09:21:53 +0000
commit2a1273f169d6e1e95f0359c7311243de8f51157b (patch)
tree7e83fe01aca23eef57ad60028ffdb01eb0ef385f /src/file-manager/fm-icon-view.c
parent52a5209e9a981b6e85e0a487def5ba5356dd87be (diff)
downloadnautilus-2a1273f169d6e1e95f0359c7311243de8f51157b.tar.gz
Remove assert that keep randomly failing to fix crash (#352592) Replace it
2006-10-31 Alexander Larsson <alexl@redhat.com> * src/file-manager/fm-icon-view.c (fm_icon_view_remove_file): Remove assert that keep randomly failing to fix crash (#352592) Replace it with some debug output that hopefully lets us track down the cause.
Diffstat (limited to 'src/file-manager/fm-icon-view.c')
-rw-r--r--src/file-manager/fm-icon-view.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/file-manager/fm-icon-view.c b/src/file-manager/fm-icon-view.c
index 5abf4325c..af40b9922 100644
--- a/src/file-manager/fm-icon-view.c
+++ b/src/file-manager/fm-icon-view.c
@@ -500,7 +500,26 @@ should_show_file_on_screen (FMDirectoryView *view, NautilusFile *file)
static void
fm_icon_view_remove_file (FMDirectoryView *view, NautilusFile *file, NautilusDirectory *directory)
{
- g_assert (directory == fm_directory_view_get_model (view));
+ /* This used to assert that 'directory == fm_directory_view_get_model (view)', but that
+ * resulted in a lot of crash reports (bug #352592). I don't see how that trace happens.
+ * It seems that somehow we get a files_changed event sent to the view from a directory
+ * that isn't the model, but the code disables the monitor and signal callback handlers when
+ * changing directories. Maybe we can get some more information when this happens.
+ * Further discussion in bug #368178.
+ */
+ if (directory != fm_directory_view_get_model (view)) {
+ char *file_uri, *dir_uri, *model_uri;
+ file_uri = nautilus_file_get_uri (file);
+ dir_uri = nautilus_directory_get_uri (directory);
+ model_uri = nautilus_directory_get_uri (fm_directory_view_get_model (view));
+ g_warning ("fm_icon_view_remove_file() - directory not icon view model, shouldn't happen.\n"
+ "file: %p:%s, dir: %p:%s, model: %p:%s, view loading: %d\n"
+ "If you see this, please add this info to http://bugzilla.gnome.org/show_bug.cgi?id=368178",
+ file, file_uri, directory, dir_uri, fm_directory_view_get_model (view), model_uri, fm_directory_view_get_loading (view));
+ g_free (file_uri);
+ g_free (dir_uri);
+ g_free (model_uri);
+ }
if (nautilus_icon_container_remove (get_icon_container (FM_ICON_VIEW (view)),
NAUTILUS_ICON_CONTAINER_ICON_DATA (file))) {