After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 784953 - GLib-GObject-CRITICAL from GDaemonFileEnumerator
GLib-GObject-CRITICAL from GDaemonFileEnumerator
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: client module
git master
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2017-07-14 14:04 UTC by Ondrej Holy
Modified: 2017-07-24 12:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
valgrind (6.57 KB, text/plain)
2017-07-14 14:04 UTC, Ondrej Holy
  Details
gdaemonfileenumerator: Fix crashes in synchronous enumerator code (1.80 KB, patch)
2017-07-24 10:38 UTC, Ondrej Holy
committed Details | Review

Description Ondrej Holy 2017-07-14 14:04:22 UTC
Created attachment 355597 [details]
valgrind

It happens to me with gvfs-1.33.3-1.fc27 from applications which uses synchronous enumerator, downgrade to gvfs-1.33.1-1.fc27 fixes the problem. I suppose it is caused by commit 2eae108. However, I can't reproduce with manually build gvfs 1.33.3 and I have no idea why...
Comment 1 Ondrej Holy 2017-07-24 09:37:25 UTC
I can reproduce it if it is linked against system version of glib. A reversion of the mentioned commit fixes the issue. I am working on fix...
Comment 2 Ondrej Holy 2017-07-24 09:37:43 UTC
It seems it causes the following Firefox/Thunderbird crashes when opening file chooser:
https://bugzilla.redhat.com/show_bug.cgi?id=1472819
Comment 3 Ondrej Holy 2017-07-24 10:38:17 UTC
Created attachment 356286 [details] [review]
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.
Comment 4 Debarshi Ray 2017-07-24 11:49:36 UTC
Review of attachment 356286 [details] [review]:

Looks good to me. Not having the 'return TRUE' will definitely lead to an extra unref due to the way the gdbus-codegen-ed GVfsDBusEnumerator code is laid out.
Comment 5 Ondrej Holy 2017-07-24 12:14:02 UTC
Attachment 356286 [details] pushed as c155704 - gdaemonfileenumerator: Fix crashes in synchronous enumerator code