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 735995 - GDK PixbufLoader problem with TIFF files in 32bit mode on x86_64 linux
GDK PixbufLoader problem with TIFF files in 32bit mode on x86_64 linux
Status: RESOLVED NOTGNOME
Product: gdk-pixbuf
Classification: Platform
Component: loaders
2.30.x
Other Linux
: Normal normal
: ---
Assigned To: gdk-pixbuf-maint
gdk-pixbuf-maint
Depends on:
Blocks:
 
 
Reported: 2014-09-03 21:07 UTC by Daniel Appelt
Modified: 2015-02-15 10:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
C source file using Pixbufloader (1.70 KB, text/x-csrc)
2014-09-03 21:07 UTC, Daniel Appelt
Details
C source file using gdk_pixbuf_new_from_file() (659 bytes, text/x-csrc)
2014-09-03 21:08 UTC, Daniel Appelt
Details
Makefile to create 64bit and 32bit executables (401 bytes, application/octet-stream)
2014-09-03 21:09 UTC, Daniel Appelt
Details
Some console output showing the problem.. (8.86 KB, application/octet-stream)
2014-09-03 21:10 UTC, Daniel Appelt
Details
Some console output showing the problem.. (8.86 KB, text/plain)
2014-09-03 21:11 UTC, Daniel Appelt
Details
Makefile to create 64bit and 32bit executables (401 bytes, text/plain)
2014-09-03 21:12 UTC, Daniel Appelt
Details
TIFF image that produces an error when loaded with 32bit PixbufLoader on x86_64 (507.13 KB, image/tiff)
2014-09-03 21:15 UTC, Daniel Appelt
Details
Corresponding JPG that works in all modes (25.68 KB, image/jpeg)
2014-09-03 21:16 UTC, Daniel Appelt
Details
Corresponding PNG that works in all modes (129.22 KB, image/png)
2014-09-03 21:17 UTC, Daniel Appelt
Details

Description Daniel Appelt 2014-09-03 21:07:02 UTC
Created attachment 285292 [details]
C source file using Pixbufloader

I am trying to load TIFF files progressively using PixbufLoader (pixbufloader.c) which works perfectly fine when compiled natively for x86_64 but the same code produces a run time error when compiled for 32bit on x86_64:

"TIFF-Bild konnte nicht geladen werden"
which roughly translates to "TIFF image could not be loaded".

A corresponding, non-progressive version which uses gdk_pixbuf_new_from_file() works fine in both versions (pixbuf.c).

The system I am using is an up-to-date Arch Linux with the following kernel:
3.16.1-1-ARCH #1 SMP PREEMPT Thu Aug 14 07:40:19 CEST 2014 x86_64 GNU/Linux

The error occured with all TIFF files that I have tested but works with the same files in other file formats such as PNG or JPG.

Please find both C source files, a simple Makefile, three test images in TIFF, JPG, and PNG format as well as some console output attached.
Comment 1 Daniel Appelt 2014-09-03 21:08:23 UTC
Created attachment 285293 [details]
C source file using gdk_pixbuf_new_from_file()
Comment 2 Daniel Appelt 2014-09-03 21:09:57 UTC
Created attachment 285294 [details]
Makefile to create 64bit and 32bit executables
Comment 3 Daniel Appelt 2014-09-03 21:10:40 UTC
Created attachment 285295 [details]
Some console output showing the problem..
Comment 4 Daniel Appelt 2014-09-03 21:11:37 UTC
Created attachment 285296 [details]
Some console output showing the problem..
Comment 5 Daniel Appelt 2014-09-03 21:12:28 UTC
Created attachment 285297 [details]
Makefile to create 64bit and 32bit executables
Comment 6 Daniel Appelt 2014-09-03 21:15:27 UTC
Created attachment 285298 [details]
TIFF image that produces an error when loaded with 32bit PixbufLoader on x86_64
Comment 7 Daniel Appelt 2014-09-03 21:16:19 UTC
Created attachment 285299 [details]
Corresponding JPG that works in all modes
Comment 8 Daniel Appelt 2014-09-03 21:17:07 UTC
Created attachment 285300 [details]
Corresponding PNG that works in all modes
Comment 9 Daniel Appelt 2015-02-15 10:15:56 UTC
After further debugging, I found out that the bug is coming from libtiff. Macro SeekOK in tiffiop.h does not work as expected in the given configuration:

#define SeekOK(tif, off) \
	(TIFFSeekFile((tif),(off),SEEK_SET)==(off))
#endif

Although the value returned from TIFFSeekFile looks similar to what is provided in off, the macro returns false on my system when running pixbufloader32.

If I replace the call to the macro in function TIFFReadRawStrip1 in tif_read.c  with the replacement code, pixbufloader32 works as expected.