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 326104 - Eog doesn't open files on smb shares.
Eog doesn't open files on smb shares.
Status: RESOLVED FIXED
Product: eog
Classification: Core
Component: image viewer
2.13.x
Other Linux
: Normal normal
: ---
Assigned To: EOG Maintainers
EOG Maintainers
: 323983 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-01-07 14:08 UTC by Sebastien Bacher
Modified: 2006-01-21 03:39 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastien Bacher 2006-01-07 14:08:56 UTC
This bug has been opened as http://bugzilla.ubuntu.com/show_bug.cgi?id=17959

"...
Updated to 2.13.2-ubuntu1 (dapper): now i get a popup window with this message
"Image loading failed for xxxx.jpg Reason: Unrecognized image file format"."
Comment 1 Felix Riemann 2006-01-10 17:34:37 UTC
Hmm, it looks like there is some sort of type conversion error involved here. Currently eog is configured to sequentially read 64 KBytes from GnomeVFS, this is handled by the READ_BUFFER_SIZE-define in eog-image.c. But this reads 0 Bytes.
Reducing READ_BUFFER_SIZE by one to 65535 makes it work(65535 Bytes are read). Increasing it to 65537 reads 1 Byte at every call to gnome_vfs_read.
Comment 2 Felix Riemann 2006-01-10 17:38:48 UTC
bug #323983 seems to be the same problem
Comment 3 Lucas Rocha 2006-01-10 23:11:16 UTC
*** Bug 323983 has been marked as a duplicate of this bug. ***
Comment 4 Felix Riemann 2006-01-14 14:53:46 UTC
I googled a bit around for some info about the SMB-protocol and the problem seems to be a protocol limitation. Reading [1 "READ_ANDX"] it looks like the field for the chunk size in the SMB-request for reading filedata is transmitted as an unsigned short. The maximum of an unsigned short is 65535 which eog exceeds by 1.
So a fix would be to set READ_BUFFER_SIZE to 65535 or lower.

[1] http://www.ubiqx.org/cifs/SMB.html#SMB.9.3
Comment 5 Lucas Rocha 2006-01-20 02:45:52 UTC
Felix, have you tested this solution on a real smb environment to confirm it really solves the problem? I don't have an environment to test the suggested solution.
Comment 6 Gianfranco Liporace 2006-01-20 09:19:36 UTC
I'm the original reporter of this bug on ubuntu, i've recompiled eog with READ_BUFFER_SIZE = 65535 and it works now. Thanks Felix!!
Comment 7 Felix Riemann 2006-01-20 13:07:20 UTC
I could only test it with my localhost Samba-server and my laptop which has XP and the fix works for both (although it wasn't never really broken for samba which seems to support the high byte field described in the link above).
Comment 8 Lucas Rocha 2006-01-21 03:39:28 UTC
Ok, applied. Thanks Felix, nice catch!

2006-01-21  Lucas Rocha  <lucasr@gnome.org>

        * libeog/eog-image.c: decrease READ_BUFFER_SIZE by 1
        to make it possible to view images from a SMB
        shares (Fixes bug #326104). Solution from Felix
        Riemann <felix@hsgheli.de>.