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 750724 - search provider tries to show dialog without gtk_init
search provider tries to show dialog without gtk_init
Status: RESOLVED FIXED
Product: gnome-contacts
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Contacts maintainer(s)
GNOME Contacts maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-06-10 16:42 UTC by Matthias Clasen
Modified: 2015-10-01 21:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't show authentication UI from the search provide (3.57 KB, patch)
2015-06-11 16:30 UTC, Alexander Larsson
none Details | Review
Don't show authentication UI from the search provide (3.57 KB, patch)
2015-06-11 16:32 UTC, Alexander Larsson
committed Details | Review

Description Matthias Clasen 2015-06-10 16:42:44 UTC
We have a frequent crash in Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1199712

From the stack trace there, what appears to be happening is that libedataserverui decides that it needs to prompt for credentials, so it tries to show a dialog, which does not go well, since nobody has called gtk_init().

Of course, the shell search provider has no business showing a dialog in the first place.
Comment 1 Matthias Clasen 2015-06-10 16:49:37 UTC
Looks like the culprit is contacts_ensure_eds_accounts - it probably needs to take an 'allow_interaction parameter to prevent any prompts.
Comment 2 Alexander Larsson 2015-06-11 16:30:41 UTC
Created attachment 305085 [details] [review]
Don't show authentication UI from the search provide
Comment 3 Alexander Larsson 2015-06-11 16:31:56 UTC
I haven't tested this because i'm not sure how to provoke it to show a dialog, but this seems like it would fix it.
Comment 4 Alexander Larsson 2015-06-11 16:32:46 UTC
Created attachment 305086 [details] [review]
Don't show authentication UI from the search provide
Comment 5 Alexander Larsson 2015-06-11 16:33:30 UTC
New version actually disables prompt for the search provider.
Comment 6 Matthias Clasen 2015-06-11 17:02:22 UTC
Review of attachment 305086 [details] [review]:

Certainly looks plausible, without looking too deeply. I'll put it in Fedora
Comment 7 Erick Perez Castellanos 2015-06-11 20:58:56 UTC
Comment on attachment 305086 [details] [review]
Don't show authentication UI from the search provide

Commited as 738983f
Comment 8 Alexander Larsson 2015-06-25 13:09:13 UTC
I pushed this on master too.
Comment 9 Erick Perez Castellanos 2015-06-25 16:36:36 UTC
(In reply to Alexander Larsson from comment #8)
> I pushed this on master too.

I'll try and make a release today or tomorrow.
Comment 10 Michael Catanzaro 2015-06-28 16:26:01 UTC
Unfortunately we have 1032 reports of this crash in Fedora after applying this patch (400 in the past three days!).
Comment 11 Milan Crha 2015-06-29 14:56:13 UTC
(In reply to Michael Catanzaro from comment #10)
> Unfortunately we have 1032 reports of this crash in Fedora after applying
> this patch (400 in the past three days!).

It would work, if the patch was actually applied:

@@ -43,6 +44,7 @@ Provides: contacts
 
 %prep
 %setup -q
+#%patch0 -p1
 
 %build
 %configure --enable-man-pages

-------------------------------------------------------------------

This can be closed, from my point of view, because I'm not able to reproduce this on sources (git master) with the patch applied, while if I disable (revert) the code then it crashes.

If one would want to make this super great, then when the "allow_interaction" is FALSE, the e_credentials_prompter_new() should not be called at all. That'll make sure that even any future ESource-s will not try the credentials prompt/UI calls.
Comment 12 Erick Perez Castellanos 2015-06-29 19:12:34 UTC
(In reply to Milan Crha from comment #11)
> 
> If one would want to make this super great, then when the
> "allow_interaction" is FALSE, the e_credentials_prompter_new() should not be
> called at all. That'll make sure that even any future ESource-s will not try
> the credentials prompt/UI calls.

I can make that happens.
Comment 13 Matthias Clasen 2015-10-01 21:31:40 UTC
this was all done, I believe