GNOME Bugzilla – Bug 326104
Eog doesn't open files on smb shares.
Last modified: 2006-01-21 03:39:28 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"."
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.
bug #323983 seems to be the same problem
*** Bug 323983 has been marked as a duplicate of this bug. ***
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
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.
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!!
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).
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>.