crash when opening large PNG file (28MIO)

Bug #1095875 reported by alphascorpii on 2013-01-04
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Picture is a scan of a b&w film produced with Gimp 2.8. It's a square picture (6984x6984 pixels).

Hugin crashes when opening picture. The same picture but in jpeg opens correctly, but a lot of other bugs occurs when trying to control perspective effect on the picture.

Ubuntu 12.04 64 bits. Fresh install of Hugin latest version from repository

OS : Linux 3.2.0-35-generic x86_64
Architecture : 64 bits
Mémoire libre : 3073356 kio

Version : 2012.0.0.a94faa15c927
Chemin vers les ressources : /usr/share/hugin/xrc/
Chemin vers les données : /usr/share/hugin/data/
Chemin vers données lensfun utilisateur : /home/bruno/.local/share/lensfun

libpano13: 2.9.18
Boost: 1.46.1
Exiv2: 0.22.0

Revision history for this message
alphascorpii (burelbruno) wrote :

The same error occurs with .tif files. It's not a filesize problem : here is the error produced when lauching Hugin in a terminal :

Unable to read EXIF data from opened file:/home/bruno/Bureau/Photos/Travail/Perigueux.png
ERROR: 12:22:06.340662 (/build/buildd/hugin-2012.0.0+dfsg/src/hugin_base/huginapp/ImageCache.cpp:653) loadImageSafely(): unsupported depth, only images with 1 or 3 channel images are supported.
hugin: /usr/include/boost/smart_ptr/shared_ptr.hpp:418: T* boost::shared_ptr<T>::operator->() const [with T = HuginBase::ImageCache::Entry]: Assertion `px != 0' failed.
Abandon (core dumped)

Pictures produced by Gimp 2.8 are exported from standard Gimp working format (.xcf) to either png or tif format with standard options.

I noticed that they both have 2 channels : grey and alpha channel, and the same picture in jpg format as only a grey channel, no alpha.

The final picture produce by Hugin with the jpg picture is in .tif format and has 2 channels (grey and alpha) when opened in Gimp.

So I don't really understand the problem, but I'd like to work with a non destructive file format, no jpeg

Revision history for this message
tmodes (tmodes) wrote :

The error log say it all: loadImageSafely(): unsupported depth, only images with 1 or 3 channel images are supported.
Hugin can only load gray images, RGB images and RGB images with alpha channel.

This is fixed in the repository.

Workaround for older versions:
1.) Remove alpha channel from gray scale images
2.) If you need the alpha channel: convert to RGB image with alpha channel.

Changed in hugin:
status: New → Fix Committed
tmodes (tmodes) on 2013-03-05
Changed in hugin:
milestone: none → 2013.0beta1
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers