linuxmint / pix

Image management application
GNU General Public License v2.0
214 stars 43 forks source link

Crash with Darktable jpeg #140

Closed franckmee closed 3 years ago

franckmee commented 3 years ago
 * pix 2.6.5
 * Mint 20.2

Issue

Pix 2.6.5 crashes every time I try to load a JPEG produced by Darktable. Tested with different pictures generated from Darktable 3.0 to the current 3.6.

Steps to reproduce

Load a JPEG produced by Darktable, or a folder containing any such picture. Alternately, display a folder in Pix, go to Darktable and export a JPEG to this folder. Pix will immediately crash.

Expected behaviour

Load and display the picture/folder.

Other information

Everything worked perfectly fine with the same files a few weeks ago (maybe before upgrading to Mint 20.2).

Example of picture that makes Pix crash: IMGP8190_01

Text trace in terminal (note the index is always 19, no matter how many and what files are in the folder): (pix:25297): GLib-GObject-WARNING **: 11:45:36.580: g_type_class_add_private() called multiple times for the same type terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::at: __n (which is 19) >= this->size() (which is 19) Abandon (core dumped)

Crash file: _usr_bin_pix.1000.crash.gz

ghost commented 3 years ago

Ditto- pix crashes out when trying to load a .jpg, .tiff or .png. Also happened to me after upgrading to Mint 20.2, something to do with the upgrade perhaps? As a test, I exported a .png from darktable, this crashed pix too, yet images exported pre-upgrade open up fine. Regards, T. P.S. I can confirm this behaviour also occurs with photos of geese.

darkshram commented 3 years ago

Must be something Linuxmint specific. I tried to replicate in ALDOS (a Fedora fork) using the sample image provided. No crash. Just a harmless glib warning.

Captura de pantalla_2021-08-24_11-54-13

ghost commented 3 years ago

Cheers for checking that out, darkshram, I've posted this issue on the Mint forum to see if anyone there has any ideas. Crash report here- https://pastebin.com/KZ80jY6f

icarter09 commented 3 years ago

I put up a PR that addresses this issue. I tested it out with the provided image in the ticket. I'm going to keep researching this issue to see if I can find a better solution to handle the given exception. If anyone keeps having issues, let me know and we'll step from there. Thanks.

tim747 commented 3 years ago

This issue is NOT just limited to "darktable"? The image causing pix to crash for me is a digital camera jpeg which has been cropped with GIMP 2.8.22. Apart from image size, the only difference from the original in the image properties is the addition of XMP Exif data. Both images previously displayed with no crash. I am of course assuming that this is the same issue. Trace file (https://termbin.com/hocvx) cheers

tim747 commented 3 years ago

Update: If I turn off 'EXIF,IPTC,XMP support' Extension, pix does NOT crash.

franckmee commented 3 years ago

Update: If I turn off 'EXIF,IPTC,XMP support' Extension, pix does NOT crash.

Confirmed. De-activating this extension prevents crashes. Re-activating it makes it crash again.

rgreen5 commented 3 years ago

LM 21.1 Cinnamon (4.8.6) / Linux kernel 5.4.0-86-generic

Just confirming tim747 and franckmee's observations; turning off 'EXIF,IPTC,XMP support' stops the crash.

darkshram commented 3 years ago

Again, seems to be a Linuxmint specific issue. Still, can't reproduce crash.

Pix showing sample image provided, with EXIF, IPTC, XMP extension support enabled. No crash.

Captura de pantalla de 2021-10-01 20-43-26

Installed pixbuf loaders:

Relevant ~/.xsession-errors messages:

(pix:6965): GLib-GObject-WARNING **: 20:51:53.923: g_type_class_add_private() called multiple times for the same type
darkshram commented 3 years ago

I have checked the ChangeLog of exiv2 and searched for solved issues related to size. There is a relevant bug in exiv2 < 0.27:

Exiv2 aborted (crashed) with "Error in `exiv2': free(): invalid next size (fast)"

For what I see, some versions of Linuxmint comes with exiv2 0.25, which has this bug. So, seems the bug is really in exiv2 (not a pix bug) and gets solved upgrading to exiv2 >= 0.27 (current version is 0.27.4).

franckmee commented 3 years ago

I have checked the ChangeLog of exiv2 and searched for solved issues related to size. There is a relevant bug in exiv2 < 0.27:

Exiv2 aborted (crashed) with "Error in `exiv2': free(): invalid next size (fast)"

For what I see, some versions of Linuxmint comes with exiv2 0.25, which has this bug. So, seems the bug is really in exiv2 (not a pix bug) and gets solved upgrading to exiv2 >= 0.27 (current version is 0.27.4).

Mine (Mint 20.2 Uma) was using exiv2 0.27.2, and I still got the crash. So I searched a 0.27.4 package to force the update, and it actually solved the crash.

So it seems we need to update to exiv2 0.27.4 (earlier 0.27.2 is not enough). This PPA's version solved my issue.

Thanks a lot to everyone who helped!