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 783548 - Invoking the application when a primary instance is present leads to CRITICALs
Invoking the application when a primary instance is present leads to CRITICALs
Status: RESOLVED FIXED
Product: gnome-documents
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME documents maintainer(s)
GNOME documents maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-06-08 14:43 UTC by Debarshi Ray
Modified: 2017-06-08 18:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
application: Avoid CRITICALs if a primary instance is already present (1.15 KB, patch)
2017-06-08 14:46 UTC, Debarshi Ray
committed Details | Review
application: Instantiate ShellSearchProvider only when registering (2.17 KB, patch)
2017-06-08 14:46 UTC, Debarshi Ray
committed Details | Review
application: Assert that the ShellSearchProvider's lifetime is sane (1.19 KB, patch)
2017-06-08 14:47 UTC, Debarshi Ray
committed Details | Review
application: Don't unexport a skeleton that was never exported (1.18 KB, patch)
2017-06-08 14:59 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2017-06-08 14:43:35 UTC
While one instance of gnome-documents is running, trying to spawn another from the terminal leads to:
  GLib-GIO-CRITICAL **:
    g_dbus_interface_skeleton_unexport_from_connection: assertion
    'interface_->priv->connections != NULL' failed

This is because the dbus_unregister method can be called multiple times.

In fact, earlier [1], it could also be called from GApplication::finalize, which is usually after the child class' dispose and finalize methods.

[1] Before https://git.gnome.org/browse/glib/commit/?id=21b1c390a3ce1f7e2816c6309f161c4b92470c46
Comment 1 Debarshi Ray 2017-06-08 14:46:46 UTC
Created attachment 353387 [details] [review]
application: Avoid CRITICALs if a primary instance is already present
Comment 2 Debarshi Ray 2017-06-08 14:46:59 UTC
Created attachment 353388 [details] [review]
application: Instantiate ShellSearchProvider only when registering
Comment 3 Debarshi Ray 2017-06-08 14:47:12 UTC
Created attachment 353389 [details] [review]
application: Assert that the ShellSearchProvider's lifetime is sane
Comment 4 Debarshi Ray 2017-06-08 14:59:19 UTC
Created attachment 353390 [details] [review]
application: Don't unexport a skeleton that was never exported
Comment 5 Debarshi Ray 2017-06-08 17:27:13 UTC
(In reply to Debarshi Ray from comment #0)
> In fact, earlier [1], it could also be called from GApplication::finalize,
> which is usually after the child class' dispose and finalize methods.
> 
> [1] Before
> https://git.gnome.org/browse/glib/commit/
> ?id=21b1c390a3ce1f7e2816c6309f161c4b92470c46

For the sake of curiosity there is some discussion in bug 725950
Comment 6 Cosimo Cecchi 2017-06-08 17:56:10 UTC
Review of attachment 353387 [details] [review]:

OK
Comment 7 Cosimo Cecchi 2017-06-08 17:57:21 UTC
Review of attachment 353388 [details] [review]:

Sure
Comment 8 Cosimo Cecchi 2017-06-08 17:57:48 UTC
Review of attachment 353389 [details] [review]:

OK
Comment 9 Cosimo Cecchi 2017-06-08 17:58:57 UTC
Review of attachment 353390 [details] [review]:

OK
Comment 10 Debarshi Ray 2017-06-08 18:19:17 UTC
Thanks for the quick reviews!