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 777696 - Open Location doesn't work, GIMP Message window flickers once and disappears
Open Location doesn't work, GIMP Message window flickers once and disappears
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: User Interface
2.8.18
Other All
: Normal normal
: 2.10
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2017-01-24 13:52 UTC by cordylus
Modified: 2018-04-01 10:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Various SSL/TLS test results for XP (1.29 KB, text/plain)
2017-02-20 10:16 UTC, Edward E.
  Details
Improve open file location dialog behavior (5.13 KB, patch)
2018-03-31 20:35 UTC, Edward E.
none Details | Review

Comment 1 Michael Schumacher 2017-01-24 15:17:55 UTC
Works fine for me on Windows 7 64 bit. You can add an error console dialog to your GIMP UI to capture any messages reliably.
Comment 2 cordylus 2017-01-24 17:41:56 UTC
Error console says:

  GIMP Error
Opening 'https://a.dilcdn.com/bl/wp-content/uploads/sites/2/2015/05/smile-pooh.gif' failed:

HEAD request failed: WinHttp error: INVALID_SERVER_RESPONSE

This is on Windows XP, perhaps it is related and not a GIMP issue, although IE8 and curl.exe download it fine.

But the error message is not shown with any error, this is another problem. Maybe already fixed in trunk, but I've retested 2.8.18 on a machine with Windows 7 by entering a non-existing domain, no message is shown. Only in Error Console it can be seen.
Comment 3 cordylus 2017-01-27 17:47:24 UTC
Opening 'https://www.gimp.org/images/frontpage/wilber-big.png' failed:

HEAD request failed: The message received was unexpected or badly formatted.
Comment 4 Edward E. 2017-02-20 10:16:10 UTC
Created attachment 346246 [details]
Various SSL/TLS test results for XP

Like OP said, this is two different problems.

First: "File/Open Location...", when it fails, never shows an error (other than in Error Console). When there is no error console, I think there should be a message box showing the error.

To test this, in "Open Location...", simply type a bogus filename, and press 'Open'. No failure message appears. Tested in 2.8.20 and 2.9.5-git-65485ae on XP SP3 32-bit; maybe it affects all platforms, though?


Second: glib uses Windows to do network transactions, which works; unfortunately Windows XP doesn't support modern network protocols, so GIMP can't get files from some servers. See the attachment.

On Windows platform, glib uses WinHttp.dll to get network resources. WinHttp in turn uses Schannel.dll, which on XP doesn't support newer network protocols/handshakes (TLSv1.2, Diffie-Hellman, etc.) See http://stackoverflow.com/a/40563251

If glib wants to support XP, maybe it could use libcurl, libopenssl, glib-networking, or whatever, across all platforms?
Comment 5 Michael Schumacher 2017-02-20 12:36:46 UTC
Whether any change will happen depends largely on the availability of people with development experience who are using the Windows XP platform. 

We should probably make this bug report about improving error messages (this is likely the only change that can happen for 2.8) and file a new one for using a non-WinHttp approach.
Comment 6 Edward E. 2018-03-31 20:35:52 UTC
Created attachment 370396 [details] [review]
Improve open file location dialog behavior

I looked into this and it seems like the code was just written in a hurry or something. The dialog can close too early, taking the error box it owns with it. Here's a patch to make the dialog behave more like "File/Open", which fixes the disappearing error message.

This patch is on master; it works on 2.8 also, but might need to be manually cherry picked. I thoroughly tested it on both branches, to see if it works the way I coded it. Specifically, the dialog only closes now when opening a file succeeds, or when you select cancel. Maybe some other behavior would be better though?
Comment 7 Michael Natterer 2018-03-31 21:53:37 UTC
That all seems to make a lot of sense, thanks!

I don't think we should bother with 2.8 any longer at this point,
setting 2.10 milestone.
Comment 8 Michael Natterer 2018-04-01 10:53:18 UTC
Pushed to master. Closing as FIXED because this is about how the
dialog itself is broken, but how whatever URLs can't be opened.

commit 94e2d745c875a618fd63e4d7d180203208f3b853 (HEAD)
Author: Edward E <develinthedetail@gmail.com>
Date:   Sat Mar 31 12:03:51 2018 -0500

    Bug 777696 - Open Location doesn't work, GIMP Message window flickers...
    
    ...once and disappears
    
    Don't close the dialog if no file was opened.

 app/dialogs/file-open-location-dialog.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

commit a02c85732ff5cfb9a5d501d36a0edaf391222db5
Author: Edward E <develinthedetail@gmail.com>
Date:   Sat Mar 31 12:00:05 2018 -0500

    Bug 777696 - Open Location doesn't work, GIMP Message window flickers...
    
    ...once and disappears
    
    Disable widgets only while opening a file.

 app/dialogs/file-open-location-dialog.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

commit 0d32621c00ae081e804b07e76be1bbe8c926a99b
Author: Edward E <develinthedetail@gmail.com>
Date:   Sat Mar 31 11:48:18 2018 -0500

    Bug 777696 - Open Location doesn't work, GIMP Message window flickers...
    
    ...once and disappears
    
    Don't create multiple progress bars.

 app/dialogs/file-open-location-dialog.c | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)