Opened 4 years ago

Closed 4 years ago

#57842 closed defect (fixed)

exiv2 @0.27: bug makes gimp unable to open jpeg files due to crashing file-jpeg plug-in

Reported by: ivanschou Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version: 2.5.99
Keywords: haspatch Cc: mopihopi, Schamschula (Marius Schamschula), rpspringuel (Fr. Samuel Springuel)
Port: exiv2

Description (last modified by ivanschou)

Attempts to open JPEG files in Gimp 2.10.8 results in an error message.

Running "gimp-console --verbose My_Image.JPG" results in the following details:

libc++abi.dylib: terminating with uncaught exception of type Exiv2::BasicError<char>: No namespace info available for XMP prefix `DICOM'
/opt/local/lib/gimp/2.0/plug-ins/file-jpeg/file-jpeg: fatal error: Abort trap: 6
gimp-console: LibGimpBase-WARNING: gimp-console: gimp_wire_read(): error
Terminating plug-in: '/opt/local/lib/gimp/2.0/plug-ins/file-jpeg/file-jpeg'
GIMP-Error: Plug-in crashed: "file-jpeg"
(/opt/local/lib/gimp/2.0/plug-ins/file-jpeg/file-jpeg)

The dying plug-in may have messed up GIMP's internal state. You may want to save your images and restart GIMP to be on the safe side.

Searching Google results in a closed bug report from gimp:

https://gitlab.gnome.org/GNOME/gimp/issues/2703

which links back to a commit in MacPorts exiv2 PortFile commit

https://github.com/macports/macports-ports/commit/99d061023e0e399188648262de83c6082f19ef8f

Both gimp2 and exiv2 compile without error. Attempted to force uninstall and reinstall of both gimp and exiv2.

Using latest build of MacPort from git on MacBook running Mojave with exiv2 @0.27_0, gimp @2.10.8_0, gimp2 @2.10.8_2+python27, and gimp-app @2.8.2_2.

Change History (13)

comment:1 Changed 4 years ago by jmroot (Joshua Root)

Cc: devans@… removed
Owner: set to dbevans
Status: newassigned

comment:2 Changed 4 years ago by ivanschou

Description: modified (diff)

comment:3 Changed 4 years ago by mopihopi

Cc: mopihopi added

comment:4 Changed 4 years ago by mopihopi

I also encountered this issue. The macOS binary from gimp.org works.

comment:5 Changed 4 years ago by pietvo (Pieter van Oostrum)

Same problem on MacOS His Sierra 10.13.6 with gimp2 @2.10.8_3+python27+quartz, gimp @2.10.8_0+animation+quartz, gimp-app @2.8.2_2.

comment:6 in reply to:  4 ; Changed 4 years ago by ryandesign (Ryan Schmidt)

Replying to ivanschou:

Searching Google results in a closed bug report from gimp:

https://gitlab.gnome.org/GNOME/gimp/issues/2703

which links back to a commit in MacPorts exiv2 PortFile commit

https://github.com/macports/macports-ports/commit/99d061023e0e399188648262de83c6082f19ef8f

They say that MacPorts commit broke things. But that commit merely rebuilt gimp and everything else that links with exiv2, after exiv2 was updated to 0.27. That was apparently necessary following that update. If gimp doesn't work with exiv2 0.27, or if exiv2 0.27 is broken in general, that's not our bug.

Replying to mopihopi:

The macOS binary from gimp.org works.

And what version of exiv2 was it built with?

comment:7 in reply to:  6 Changed 4 years ago by mopihopi

Replying to ryandesign:

Replying to mopihopi:

The macOS binary from gimp.org works.

And what version of exiv2 was it built with?

It appears that the working gimp 2.10.8 macOS binary from gimp.org was built with exiv2 0.26:

$ /Applications/GIMP-2.10.app/Contents/MacOS/gimp-bin --version --verbose
GNU Image Manipulation Program version 2.10.8
git-describe: GIMP_2_10_6-294-ga967e8d2c2
C compiler:
	Configured with: --prefix=/Applications/Xcode-10.app/Contents/Developer/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
	Apple LLVM version 10.0.0 (clang-1000.11.45.2)
	Target: x86_64-apple-darwin17.7.0
	Thread model: posix
	InstalledDir: /Applications/Xcode-10.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
	
using GEGL version 0.4.12 (compiled against version 0.4.12)
using GLib version 2.58.1 (compiled against version 2.58.1)
using GdkPixbuf version 2.36.12 (compiled against version 2.36.12)
using GTK+ version 2.24.32 (compiled against version 2.24.32)
using Pango version 1.42.4 (compiled against version 1.42.4)
using Fontconfig version 2.13.0 (compiled against version 2.13.0)
using Cairo version 1.16.0 (compiled against version 1.16.0)
$ ls /Applications/GIMP-2.10.app/Contents/Resources/lib/*exiv*
/Applications/GIMP-2.10.app/Contents/Resources/lib/libexiv2.26.dylib
/Applications/GIMP-2.10.app/Contents/Resources/lib/libgexiv2.2.dylib
$ strings /Applications/GIMP-2.10.app/Contents/Resources/lib/libexiv2.26.dylib | grep '0\.2[0-9]'
0.26
$ 

The broken gimp 2.10.8 from MacPorts is built with exiv2 0.27 and gexiv2 0.10.9.

I don't know if it is related but it appears that a new gexiv2 0.11 was released today: https://gitlab.gnome.org/GNOME/gexiv2/blob/master/NEWS

comment:8 Changed 4 years ago by ryandesign (Ryan Schmidt)

Keywords: haspatch added
Port: gimp2 removed
Summary: gimp @2.10.8_0 unable to open jpeg files due to crashing file-jpeg plug-in dueexiv2 @0.27: bug makes gimp unable to open jpeg files due to crashing file-jpeg plug-in

A gimp developer has helped identify this as a bug in exiv2 0.27. It is reported to the developers of exiv2 here and the proposed patch is here. I have not tested the patch.

comment:9 Changed 4 years ago by Schamschula (Marius Schamschula)

Unfortunately, upgrading gexiv to 0.11.0 doesn't seem to fix this issue. I built a local copy (needed to switch to the meson PortGroup, as autotools have been removed), and rebuilt gimp against it. I get the same error when opening a .jpeg file.

comment:10 Changed 4 years ago by Schamschula (Marius Schamschula)

Cc: Schamschula added

comment:11 Changed 4 years ago by Schamschula (Marius Schamschula)

Seeing the above patch makes me chuckle that the exiv2 developers missed this change in their own code. I had to add similar patches to get several dependent packages to (re-)build against exiv2 0.27.

comment:12 Changed 4 years ago by rpspringuel (Fr. Samuel Springuel)

Cc: rpspringuel added

comment:13 Changed 4 years ago by Schamschula (Marius Schamschula)

Resolution: fixed
Status: assignedclosed

In 2a50743b0f16b2c0c142df60ee357522cff7f72d/macports-ports (master):

exiv2: fix bug that prevents opening graphics files

Closes: #57842
remove obsolete patches

Note: See TracTickets for help on using tickets.