From c155704092c1848a42539ab91cad9052c38e62af Mon Sep 17 00:00:00 2001 From: Ondrej Holy Date: Mon, 24 Jul 2017 12:00:09 +0200 Subject: gdaemonfileenumerator: Fix crashes in synchronous enumerator code Commit 2eae108 ported the code to GTask and slightly changed processing. The changes trigger the following criticals and cause crashes of some applications (e.g. Firefox, Thunderbird). GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed Return TRUE from signal handlers in order to prevent further processing of the invocations, which cause the mentioned issues. https://bugzilla.gnome.org/show_bug.cgi?id=784953 --- client/gdaemonfileenumerator.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'client') diff --git a/client/gdaemonfileenumerator.c b/client/gdaemonfileenumerator.c index aa30ee24..f3ba336b 100644 --- a/client/gdaemonfileenumerator.c +++ b/client/gdaemonfileenumerator.c @@ -194,7 +194,7 @@ next_files_sync_check (GDaemonFileEnumerator *enumerator) g_mutex_unlock (&enumerator->next_files_mutex); } -static void +static gboolean handle_done (GVfsDBusEnumerator *object, GDBusMethodInvocation *invocation, gpointer user_data) @@ -209,9 +209,11 @@ handle_done (GVfsDBusEnumerator *object, g_signal_emit (enumerator, signals[CHANGED], 0); gvfs_dbus_enumerator_complete_done (object, invocation); + + return TRUE; } -static void +static gboolean handle_got_info (GVfsDBusEnumerator *object, GDBusMethodInvocation *invocation, GVariant *arg_infos, @@ -248,6 +250,8 @@ handle_got_info (GVfsDBusEnumerator *object, g_signal_emit (enumerator, signals[CHANGED], 0); gvfs_dbus_enumerator_complete_got_info (object, invocation); + + return TRUE; } static void -- cgit v1.2.1