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 743034 - file-tiff-load crashes if I try to open a BigTIFF file
file-tiff-load crashes if I try to open a BigTIFF file
Status: RESOLVED OBSOLETE
Product: GIMP
Classification: Other
Component: Plugins
git master
Other Linux
: Normal normal
: 2.10
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2015-01-16 13:06 UTC by tobias
Modified: 2018-05-24 15:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Rome image scaled down and saved as xcf (323.26 KB, image/x-xcf)
2015-09-16 21:05 UTC, tobias
Details

Description tobias 2015-01-16 13:06:21 UTC
What I've done:

- downloaded the Rome example from: http://lp.urthecast.com/theia-sample-
product/ 
- Unziped it.
- Tried to open the BigTIFF file (5,3 GB) with Gimp (git master and 2.8.14 (64Bit version))
- Selected all pages in the dialog and clicked OK.
-> crash
Comment 1 tobias 2015-01-16 15:09:28 UTC
And this is the error message in the command line:

$ ./dev/bin/bin/gimp-2.9 ./Downloads/Rome_Sample/176__MRC-00003618__SEG-001__20140703_143825Z_ORT_16_06780703.TIF 
This is a development version of GIMP.  Debug messages may appear here.

bps: 16
babl-model.c:350 babl_model()
	babl_model("A"): not found
Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Die Operation ist nicht erlaubt.
/tmp/babl.gdb:1: Error in sourced command file:
No stack.
plug-in 'file-tiff-load' aborted before sending its procedure return values
EEEEeEeek! 3 GeglBuffers leaked
Comment 2 tobias 2015-01-16 15:11:37 UTC
And if I run it as root I get this:

~$ sudo ./dev/bin/bin/gimp-2.9 ./Downloads/Rome_Sample/176__MRC-00003618__SEG-001__20140703_143825Z_ORT_16_06780703.TIF 
This is a development version of GIMP.  Debug messages may appear here.


(gimp-2.9:3955): IBUS-WARNING **: The owner of /home/tobias/.config/ibus/bus is not root!
bps: 16
babl-model.c:350 babl_model()
	babl_model("A"): not found
31	../sysdeps/unix/sysv/linux/waitpid.c: No such file or directory.
  • #5 babl_die
    at babl-internal.c line 74
  • #6 babl_model
    at babl-model.c line 350
  • #7 load_image
    at file-tiff-load.c line 1131
  • #8 run
    at file-tiff-load.c line 269
  • #9 gimp_proc_run
    at gimp.c line 2068
  • #10 gimp_loop
    at gimp.c line 1897
  • #11 gimp_main
    at gimp.c line 520
  • #12 __libc_start_main
    at libc-start.c line 287
  • #13 _start

Comment 3 tobias 2015-01-19 10:04:20 UTC
I was looking for easier assessable example images and found this collection form graphicsmagick:
ftp://ftp.graphicsmagick.org/pub/tiff-samples/

The images tiger-75-gray-jpg.tiff and tiger-75-rgb-jpg.tiff don't load correctly in the latest git version compared to 2.8 or eog.

And the 64K-colormap.tiff crashes the tiff plugin, if I run it ass root, but not if I run it as normal user. This is the stacktrace:

~$ sudo ./dev/bin/bin/gimp-2.9 ./Downloads/BigTIFF/64K-colormap.tiff 
[sudo] password for tobias: 
This is a development version of GIMP.  Debug messages may appear here.


(gimp-2.9:17193): IBUS-WARNING **: The owner of /home/tobias/.config/ibus/bus is not root!
bps: 16
photomet: 3 (3)
load_rgba
/home/tobias/dev/bin/lib/gimp/2.0/plug-ins/file-tiff-load: fatal error: Speicherzugriffsfehler
/home/tobias/dev/bin/lib/gimp/2.0/plug-ins/file-tiff-load (pid:17202): [E]xit, [H]alt, show [S]tack trace or [P]roceed: S
  • #0 __libc_waitpid
  • #1 g_on_error_stack_trace
  • #2 g_on_error_query
  • #3 gimp_plugin_sigfatal_handler
  • #4 <signal handler called>
  • #5 conv_16_F
  • #6 conv_rgba16_rgbaF
  • #7 babl_conversion_linear_process
  • #8 babl_conversion_process
  • #9 process_conversion_path
  • #10 babl_fish_path_process
  • #11 babl_fish_process
  • #12 babl_process
  • #13 gegl_buffer_iterate_write
  • #14 gegl_buffer_set_internal
  • #15 _gegl_buffer_set_with_flags
  • #16 gegl_buffer_set
  • #17 load_rgba
  • #18 load_image
  • #19 run
  • #20 gimp_proc_run
    at gimp.c line 2068
  • #21 gimp_loop
    at gimp.c line 1897
  • #22 gimp_main
  • #23 __libc_start_main
  • #24 _start

Comment 4 Mukund Sivaraman 2015-01-23 02:01:10 UTC
(In reply to comment #3)
> I was looking for easier assessable example images and found this collection
> form graphicsmagick:
> ftp://ftp.graphicsmagick.org/pub/tiff-samples/
> 
> The images tiger-75-gray-jpg.tiff and tiger-75-rgb-jpg.tiff don't load
> correctly in the latest git version compared to 2.8 or eog.

This is fixed in master in:

* 2b41520 file-tiff-load: Fix rowstride for edge tiles (#743034 comment #3)

> And the 64K-colormap.tiff crashes the tiff plugin, if I run it ass root, but
> not if I run it as normal user. This is the stacktrace:

Colormap images are no longer processed. We should outright reject these or support them, not do something half-baked. I'll commit a patch towards it.
Comment 5 Mukund Sivaraman 2015-01-23 02:02:48 UTC
(In reply to comment #0)
> What I've done:
> 
> - downloaded the Rome example from: http://lp.urthecast.com/theia-sample-
> product/ 
> - Unziped it.
> - Tried to open the BigTIFF file (5,3 GB) with Gimp (git master and 2.8.14
> (64Bit version))
> - Selected all pages in the dialog and clicked OK.
> -> crash

This is way too large for me to download. Also this seems to be a non-free image. Can you find a smaller file-sized image that demonstrates the problem?

I have tried the big tiff images from the GraphicsMagick collection and they seem to load properly.
Comment 6 tobias 2015-01-23 08:58:37 UTC
(In reply to comment #5)
> (In reply to comment #0)
> > - downloaded the Rome example from: http://lp.urthecast.com/theia-sample-
> > product/ 
> This is way too large for me to download. Also this seems to be a non-free
> image.
 
I don't have the image here on the machine I'm at the moment, but afaik the the license of the image was OK. I'll can post it here later.

> Can you find a smaller file-sized image that demonstrates the problem?

No. I already searched for other images. That's why I found the GraphicsMagick collection. I have a sneaky feeling that the size of the image is part of the problem.

> I have tried the big tiff images from the GraphicsMagick collection and they
> seem to load properly.

Yes, I know. I tested them, too.

Can I somehow give you more information about the crash? Special gdb parameters or something like that?
Comment 7 Michael Natterer 2015-02-06 21:46:35 UTC
All the stuff pasted above sounds as if only the plug-in crashed.

What does crash, file-tiff or gimp or both?
Comment 8 tobias 2015-02-07 21:06:50 UTC
I've just tested it with the last version from git and it is "just" the plug-in 'file-tiff-load'.

On IRC Mukund Sivaraman told me, that he already has the image and confirmed the problem. If I remember it right, he planned to work on a fix.
Comment 9 Michael Natterer 2015-02-07 23:06:20 UTC
Thanks.
Comment 10 Michael Natterer 2015-09-13 14:23:53 UTC
This fixes the crash, but the "Rome" example loads as black pages only...

commit 1243e1f93b071dc5056997d33b8dc11f27712c0a
Author: Michael Natterer <mitch@gimp.org>
Date:   Sun Sep 13 16:21:35 2015 +0200

    Bug 743034 - file-tiff-load crashes if I try to open a BigTIFF file
    
    Use a Babl format that actually exists for extra channels. Makes the
    plug-in load black pages from the mentioned "Rome" BigTIFF, so this
    only fixes the plug-in crash but doesn't fix loading of BigTIFF
    images, whatever they are...

 plug-ins/common/file-tiff-load.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Comment 11 tobias 2015-09-14 11:26:17 UTC
Mitch, the corners of the "Rome" BigTIFF are black you can see that in the jpeg image thats in the ZIP file too. I was not able to test your fix. My Computer was not responsible for hours after trying to open the image and then I rebooted because I had other stuff to do. :(
Comment 12 tobias 2015-09-16 21:05:09 UTC
Created attachment 311506 [details]
Rome image scaled down and saved as xcf

I've scaled the Rome image down an converted it to 8 bit. Then I saved it as XCF. The problem of the image is still there. It is black, even if you hide all layers or add a white layer at top of the image.
If you copy the background layer an insert it as a new image you get an image, that looks closer to the expected result.
I hape its easier and faster to test with this image.
Comment 13 Jonathan Tait 2015-09-16 21:47:12 UTC
(In reply to tobias from comment #12)
> Created attachment 311506 [details]
> Rome image scaled down and saved as xcf
> 
> I've scaled the Rome image down an converted it to 8 bit. Then I saved it as
> XCF. The problem of the image is still there. It is black, even if you hide
> all layers or add a white layer at top of the image.
> If you copy the background layer an insert it as a new image you get an
> image, that looks closer to the expected result.
> I hape its easier and faster to test with this image.

Look in the Channels dialog - that image has got 12 extra channels, all absolute black!
If you turn-off the visibility of those channels, there is something in the Layers which does resemble a scaled map, but with strangely low opacity.
Comment 14 GNOME Infrastructure Team 2018-05-24 15:03:00 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/645.