GNOME Bugzilla – Bug 777696
Open Location doesn't work, GIMP Message window flickers once and disappears
Last modified: 2018-04-01 10:53:18 UTC
The URL to open: https://a.dilcdn.com/bl/wp-content/uploads/sites/2/2015/05/smile-pooh.gif
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.
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.
Opening 'https://www.gimp.org/images/frontpage/wilber-big.png' failed: HEAD request failed: The message received was unexpected or badly formatted.
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?
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.
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?
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.
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(-)