Marco Trevisan (Treviño) has proposed merging ~3v1n0/ubuntu/+source/nautilus:ubuntu/master-recent-files-crashes-fix into ~ubuntu-desktop/ubuntu/+source/nautilus:ubuntu/master.
Requested reviews: Ubuntu Desktop (ubuntu-desktop) Related bugs: Bug #1760569 in nautilus (Ubuntu): "Nautilus crashes in g_free -> g_bookmark_file_move_item -> gtk_recent_manager_move_item -> nautilus_recent_update_file_moved" https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1760569 Bug #1774587 in nautilus (Ubuntu): "nautilus crashes in recent_thread_func -> is_file_valid_recursive -> g_local_file_query_info -> free(): invalid pointer" https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1774587 For more details, see: https://code.launchpad.net/~3v1n0/ubuntu/+source/nautilus/+git/nautilus/+merge/358484 -- Your team Ubuntu Desktop is requested to review the proposed merge of ~3v1n0/ubuntu/+source/nautilus:ubuntu/master-recent-files-crashes-fix into ~ubuntu-desktop/ubuntu/+source/nautilus:ubuntu/master.
diff --git a/debian/changelog b/debian/changelog index aea1b84..f255ee3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +nautilus (1:3.26.4-0ubuntu8) UNRELEASED; urgency=medium + + * d/p/0016-search-engine-add-a-recent-search-engine-listing-Gtk.patch: + - Don't start a new search thread until the one running is over + (LP: #1774587) + * d/p/0017-recent-add-function-to-update-manager-on-file-rename.patch: + - Do not try to update the position of a recent file if it didn't change + (LP: #1760569) + + -- Marco Trevisan (Treviño) <ma...@ubuntu.com> Thu, 08 Nov 2018 02:32:03 -0600 + nautilus (1:3.26.4-0ubuntu7) cosmic; urgency=medium * d/p/0016-search-engine-add-a-recent-search-engine-listing-Gtk.patch: diff --git a/debian/patches/0016-search-engine-add-a-recent-search-engine-listing-Gtk.patch b/debian/patches/0016-search-engine-add-a-recent-search-engine-listing-Gtk.patch index 56ab309..c4be530 100644 --- a/debian/patches/0016-search-engine-add-a-recent-search-engine-listing-Gtk.patch +++ b/debian/patches/0016-search-engine-add-a-recent-search-engine-listing-Gtk.patch @@ -1,5 +1,5 @@ From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <m...@3v1n0.net> -Date: Wed, 21 Feb 2018 17:05:51 +0100 +Date: Wed, 21 Feb 2018 10:05:51 -0600 Subject: search-engine: add a recent-search-engine listing GtkRecentManager entries @@ -17,10 +17,10 @@ Applied-Upstream: 3.30.0, https://gitlab.gnome.org/GNOME/nautilus/commit/6968637 Forwarded: yes, https://gitlab.gnome.org/GNOME/nautilus/merge_requests/335 --- src/meson.build | 2 + - src/nautilus-search-engine-recent.c | 440 ++++++++++++++++++++++++++++++++++++ + src/nautilus-search-engine-recent.c | 433 ++++++++++++++++++++++++++++++++++++ src/nautilus-search-engine-recent.h | 36 +++ src/nautilus-search-engine.c | 11 + - 4 files changed, 489 insertions(+) + 4 files changed, 482 insertions(+) create mode 100644 src/nautilus-search-engine-recent.c create mode 100644 src/nautilus-search-engine-recent.h @@ -39,10 +39,10 @@ index 73aafe9..213b35f 100644 'nautilus-search-hit.c', diff --git a/src/nautilus-search-engine-recent.c b/src/nautilus-search-engine-recent.c new file mode 100644 -index 0000000..40cf7e0 +index 0000000..95d8c21 --- /dev/null +++ b/src/nautilus-search-engine-recent.c -@@ -0,0 +1,440 @@ +@@ -0,0 +1,433 @@ +/* + * Copyright (C) 2018 Canonical Ltd + * @@ -141,7 +141,7 @@ index 0000000..40cf7e0 +search_thread_add_hits_idle (gpointer user_data) +{ + SearchHitsData *search_hits = user_data; -+ NautilusSearchEngineRecent *self = search_hits->recent; ++ g_autoptr (NautilusSearchEngineRecent) self = search_hits->recent; + NautilusSearchProvider *provider = NAUTILUS_SEARCH_PROVIDER (self); + + self->add_hits_idle_id = 0; @@ -160,8 +160,6 @@ index 0000000..40cf7e0 + NAUTILUS_SEARCH_PROVIDER_STATUS_NORMAL); + g_object_notify (G_OBJECT (provider), "running"); + -+ g_object_unref (self); -+ + return FALSE; +} + @@ -173,6 +171,7 @@ index 0000000..40cf7e0 + + if (self->add_hits_idle_id != 0) + { ++ g_list_free_full (hits, g_object_unref); + return; + } + @@ -231,7 +230,7 @@ index 0000000..40cf7e0 +static gpointer +recent_thread_func (gpointer user_data) +{ -+ NautilusSearchEngineRecent *self = NAUTILUS_SEARCH_ENGINE_RECENT (user_data); ++ g_autoptr (NautilusSearchEngineRecent) self = NAUTILUS_SEARCH_ENGINE_RECENT (user_data); + g_autoptr (GPtrArray) date_range = NULL; + g_autoptr (GFile) query_location = NULL; + GList *recent_items; @@ -263,28 +262,6 @@ index 0000000..40cf7e0 + continue; + } + -+ if (gtk_recent_info_is_local (info)) -+ { -+ g_autoptr (GError) error = NULL; -+ -+ if (!is_file_valid_recursive (self, file, &error)) -+ { -+ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) -+ { -+ break; -+ } -+ -+ if (error != NULL && -+ !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_EXISTS)) -+ { -+ g_debug("Impossible to read recent file info: %s", -+ error->message); -+ } -+ -+ continue; -+ } -+ } -+ + if (g_cancellable_is_cancelled (self->cancellable)) + { + break; @@ -306,6 +283,28 @@ index 0000000..40cf7e0 + g_autoptr (GDateTime) gmodified = NULL; + g_autoptr (GDateTime) gvisited = NULL; + ++ if (gtk_recent_info_is_local (info)) ++ { ++ g_autoptr (GError) error = NULL; ++ ++ if (!is_file_valid_recursive (self, file, &error)) ++ { ++ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) ++ { ++ break; ++ } ++ ++ if (error != NULL && ++ !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_EXISTS)) ++ { ++ g_debug ("Impossible to read recent file info: %s", ++ error->message); ++ } ++ ++ continue; ++ } ++ } ++ + if (mime_types) + { + GList *ml; @@ -377,7 +376,7 @@ index 0000000..40cf7e0 +{ + NautilusSearchEngineRecent *self = NAUTILUS_SEARCH_ENGINE_RECENT (provider); + g_autoptr (GFile) location = NULL; -+ GThread *thread; ++ g_autoptr (GThread) thread = NULL; + + g_return_if_fail (self->query); + g_return_if_fail (self->cancellable == NULL); @@ -392,13 +391,11 @@ index 0000000..40cf7e0 + return; + } + -+ g_object_ref (self); + self->cancellable = g_cancellable_new (); ++ thread = g_thread_new ("nautilus-search-recent", recent_thread_func, ++ g_object_ref (self)); + -+ thread = g_thread_new ("nautilus-search-recent", recent_thread_func, self); + g_object_notify (G_OBJECT (provider), "running"); -+ -+ g_thread_unref (thread); +} + +static void @@ -410,9 +407,6 @@ index 0000000..40cf7e0 + { + DEBUG ("Recent engine stop"); + g_cancellable_cancel (self->cancellable); -+ g_clear_object (&self->cancellable); -+ -+ g_object_notify (G_OBJECT (provider), "running"); + } +} + @@ -431,8 +425,7 @@ index 0000000..40cf7e0 +{ + NautilusSearchEngineRecent *self = NAUTILUS_SEARCH_ENGINE_RECENT (provider); + -+ return self->cancellable != NULL && -+ !g_cancellable_is_cancelled (self->cancellable); ++ return self->cancellable != NULL; +} + +static void diff --git a/debian/patches/0017-recent-add-function-to-update-manager-on-file-rename.patch b/debian/patches/0017-recent-add-function-to-update-manager-on-file-rename.patch index ad248da..ea61122 100644 --- a/debian/patches/0017-recent-add-function-to-update-manager-on-file-rename.patch +++ b/debian/patches/0017-recent-add-function-to-update-manager-on-file-rename.patch @@ -1,5 +1,5 @@ From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <m...@3v1n0.net> -Date: Thu, 12 Apr 2018 00:51:34 +0200 +Date: Wed, 11 Apr 2018 17:51:34 -0500 Subject: recent: add function to update manager on file rename or move When files have been moved or renamed nautilus should inform @@ -128,7 +128,7 @@ index 28b5a13..7886d1f 100644 static void diff --git a/src/nautilus-recent.c b/src/nautilus-recent.c -index ab50fef..6676465 100644 +index ab50fef..ff0ca3c 100644 --- a/src/nautilus-recent.c +++ b/src/nautilus-recent.c @@ -1,5 +1,7 @@ @@ -162,7 +162,7 @@ index ab50fef..6676465 100644 + g_autoptr (NautilusFile) file = NULL; + NautilusFile *existing_file; + -+ if (new_uri == NULL || old_uri == NULL) ++ if (new_uri == NULL || old_uri == NULL || g_strcmp0 (old_uri, new_uri) == 0) + { + return; + }
-- ubuntu-desktop mailing list ubuntu-desktop@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop