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 428037 - GIMP is not able to read EXIF format used by Windows Photo Gallery
GIMP is not able to read EXIF format used by Windows Photo Gallery
Status: RESOLVED DUPLICATE of bug 381182
Product: GIMP
Classification: Other
Component: Plugins
2.3.x
Other All
: Normal critical
: ---
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2007-04-09 22:02 UTC by Helcar
Modified: 2008-01-15 14:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Troubled picture (483.20 KB, image/jpeg)
2007-04-10 14:57 UTC, Helcar
Details

Description Helcar 2007-04-09 22:02:44 UTC
Steps to reproduce:
1. Save any .jpg with EXIF information in MS Vista Windows Photo Gallery 
2. Than try to open it in GIMP
3. The jpeg.exe plug-in will crash during opening the file, unable to handle with EXIF


Stack trace:
After I've resaved EXIF(for example after rotation) information included within .jpg file with Windows Photo Gallery (integrated in my new Windows Vista), I was not able to open the file in GIMP. I've tried different versions of libexif and GIMP (from 2.2.6 to 2.3.14) and  nothing helps. 

Other information:
Comment 1 Michael Schumacher 2007-04-10 10:10:41 UTC
Another incarnation of the closed #300186 and similar bugs, I assume. Could you attach an example?
Comment 2 Helcar 2007-04-10 14:57:45 UTC
Created attachment 86111 [details]
Troubled picture
Comment 3 Helcar 2007-04-10 15:02:20 UTC
Upward is an exaple. 
This photo was edited and saved in Windows Photo Gallery. Original version from my old Olympus camera works fine. This caused jpeg.exe plug-in crash. Actually tested in GIMP 2.3.14 on my Windows Vista Home Premium 64-bit. 
Comment 4 Nev Delap 2007-04-12 05:29:36 UTC
I also have this problem with photos from my Olympus 770 SW, reproduced in GIMP 2.3.14 running on Windows. Cheers.
Comment 5 Nev Delap 2007-04-12 05:32:07 UTC
BTW, I mean photos taken directly from the camera, not photos from the camera edited with Windows Photo Gallery. ie: original photos from the camera do not work fine for me.
Comment 6 Sven Neumann 2007-04-12 09:53:54 UTC
I get the following warnings on the console before the JPEG plug-in crashes (after allocating more than a GB of memory):

** (metadata:32180): WARNING **: While parsing XMP metadata:
Error on line 2 char 42: Expected element <x:xmpmeta>, found <xmp:xmpmeta> instead


** (jpeg:32179): WARNING **: JPEG - unable to decode XMP metadata packet

Comment 7 Raphaël Quinet 2007-04-12 11:37:05 UTC
The XMP packet is skipped so there is nothing wrong with that (although the
parser could be a bit more tolerant).  The crash seems to occur later, when
trying to use the EXIF data:

Program received signal SIGSEGV, Segmentation fault.
0xb775dc4a in exif_set_sshort () from /usr/lib/libexif.so.12
(gdb) bt
  • #0 exif_set_sshort
    from /usr/lib/libexif.so.12
  • #1 exif_set_short
    from /usr/lib/libexif.so.12
  • #2 exif_data_new_from_file
    from /usr/lib/libexif.so.12
  • #3 exif_data_new_from_file
    from /usr/lib/libexif.so.12
  • #4 exif_data_save_data
    from /usr/lib/libexif.so.12
  • #5 gimp_metadata_store_exif
    at gimpexif.c line 59

Unfortunately, I do not have a debug version of libexif installed.  But this
could be another duplicate of the various crashes related to libexif.  I'm
still trying to analyze this a bit deeper, although I'm not sure that I will
be able to find much without debugging libexif itself.
Comment 8 Raphaël Quinet 2007-04-12 11:42:45 UTC
Note that this is happening with libexif 0.6.13, so this is not a duplicate of bug #300186 (which is related to the old version 0.6.12).
Comment 9 Sven Neumann 2007-04-12 15:27:53 UTC

*** This bug has been marked as a duplicate of 381182 ***
Comment 10 Raphaël Quinet 2007-04-12 16:39:40 UTC
For the record, my recent commit to xmp-parse.c (SVN rev 22242) gets rid of the warning while parsing the XMP block and allows it to be parsed correctly despite the fact that "Windows Photo Gallery 6.0" does not follow the recommendations in the XMP specification.

So what remains is the bug in libexif, which is covered in bug #358117 (as well as similar bug reports for other applications depending on libexif).
Comment 11 Jan Patera 2007-05-09 12:17:19 UTC
As on many places in EXIF-related entries in this bugzilla, here are again combined several actually unrelated problems.
1) Original report, Comment #2 : Looks like this Windows Photo Gallery tool reads Olympus EXIF JPEG Intel-order IFD with Intel makernote, but saves back Motorola IFD with Intel makernote. This can be a simple consequence of the fact that Photo Gallery doesn't know how to handle the makernote and thus copies it back unmodified, while it swaps endienness of the rest of Exif data. Anyway, just yesterday I checked in a heuristical fix to libEXIF CVS repository that detects this problem on read. Because libEXIF keeps endianness and I haven't seen any Olympus makernote with Motorola endianness, libEXIF keeps Motorola-order for the main IFD and Intel-order for the makernote when resaving this document.
2) Comment #4 : Apparently Olympus S760 and S770 started to use a new variant of Olympus makernote. I checked in enhancement to the libEXIF CVS repository just yesterday.
3) Comment #1 : Bug #300186 is 2 years old, it is about something different...
 I am not able to reproduced it now, it must have been fixed.

 -- Jan Patera, libexif developer