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 745407 - Opening invalid yelp link results in uncloseable modal help dialog
Opening invalid yelp link results in uncloseable modal help dialog
Status: RESOLVED FIXED
Product: yelp
Classification: Applications
Component: General
3.14.x
Other Linux
: Normal normal
: ---
Assigned To: Yelp maintainers
Yelp maintainers
: 464111 742409 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-03-02 06:31 UTC by ruibalp
Modified: 2015-03-02 23:06 UTC
See Also:
GNOME target: 3.16
GNOME version: ---


Attachments
Avoid activating ourselves recursively (1.57 KB, patch)
2015-03-02 22:47 UTC, Matthias Clasen
committed Details | Review

Description ruibalp 2015-03-02 06:31:43 UTC
I'm on gnome-terminal version 3.6.2

Caution: following these instructions may result in your session being unusable.  You may have to exit to a local tty or ssh in externally to kill things to recover your session. 

Steps to reproduce:

1) In gnome terminal, "echo INFO:Foobar"
2) right click "INFO:Foobar" and click "Open Link"
3) Close the dialog that opens

What should happen:

- Other applications should remain usable while yelp is open
- The dialog should close, and you can resume using the terminal

What actually happens:

- Yelp re-opens almost immediately, and continues reopening every time you attempt to close it.
- Yelp opens modally / steals focus from all desktop applications
Comment 1 André Klapper 2015-03-02 09:23:21 UTC
Hi null, 
Thanks for taking the time to report this bug.
However, you are using version 3.6.x which is too old and not supported anymore by GNOME developers. GNOME developers are no longer working on that older version, so unfortunately there will not be any bug fixes by GNOME developers for the version that you use.

By upgrading to a newer version of GNOME you could receive bug fixes and new functionality. You may need to upgrade your Linux distribution to obtain a newer version of GNOME.

Please feel free to reopen this bug if the problem still occurs with a recent version of GNOME, or feel free to file a bug report in the bug tracking system of your Linux distribution if your distribution still supports your version 3.6.x
Comment 2 Debarshi Ray 2015-03-02 10:11:50 UTC
Still valid in 3.14.x
Comment 3 Christian Persch 2015-03-02 10:49:11 UTC
Certainly not a gnome-terminal bug.
Comment 4 Matthias Clasen 2015-03-02 18:04:55 UTC
wow, thats pretty annoying. we should really fix this for 3.16
Comment 5 Matthias Clasen 2015-03-02 22:13:08 UTC
some observations:

- this only happens with uppercase INFO:

- can be reproduced by running yelp directly: yelp INFO:fubar
Comment 6 Matthias Clasen 2015-03-02 22:35:20 UTC
So, whats apparently happening here is that yelp treats anything that doesn't have a recognized scheme but contains a : as an 'external uri', and calls 
g_app_info_launch_default_for_uri on it. Ironically, for INFO:, gio determines that the default handler is...yelp, so yelp activates itself recursively.
Comment 7 Matthias Clasen 2015-03-02 22:47:46 UTC
Created attachment 298354 [details] [review]
Avoid activating ourselves recursively

We consider INFO:foobar an 'external uri', and call
g_app_info_launch_default_for_uri on it. Which is bad,
since GIO promptly determines the default handler for INFO:
uris to be...yelp. Avoid this by manually looking up the
default handler, and ignoring it if it appears to be yelp.
Comment 8 David King 2015-03-02 22:58:18 UTC
Review of attachment 298354 [details] [review]:

URI schemes are case-insensitive, according to RFC3986, so this seems fine to me. Yelp might want to handle "unknown" schemes more intelligently, but this seems OK as a workaround.
Comment 9 Matthias Clasen 2015-03-02 23:01:55 UTC
Attachment 298354 [details] pushed as adb5cce - Avoid activating ourselves recursively
Comment 10 David King 2015-03-02 23:05:44 UTC
*** Bug 464111 has been marked as a duplicate of this bug. ***
Comment 11 David King 2015-03-02 23:06:30 UTC
*** Bug 742409 has been marked as a duplicate of this bug. ***