Bug 1401706

Summary: shotwell crashes due to assertion in libgexiv2 for certain images
Product: [Fedora] Fedora Reporter: Sjoerd Mullender <sjoerd>
Component: libgexiv2Assignee: Ankur Sinha (FranciscoD) <sanjay.ankur>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: sanjay.ankur, sjoerd
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-31 14:10:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
image that shows the problem
none
patch that fixes the problem none

Description Sjoerd Mullender 2016-12-05 22:20:18 UTC
Created attachment 1228168 [details]
image that shows the problem

Description of problem:
When I click on certain images, shotwell crashes.  I'm pretty sure that in the past, shotwell didn't crash for those images.

Version-Release number of selected component (if applicable):
libgexiv2-0.10.4-2.fc25.x86_64
shotwell-0.24.2-1.fc25.x86_64


How reproducible:
100% (depending on the image)

Steps to Reproduce:
1.import the attached image into shotwell
2.click on it.
3.
(Note, I didn't reproduce it this way, the image was imported long ago.  Clicking on the image does trigger the crash.)

Actual results:
$ shotwell

(shotwell:24000): Gtk-WARNING **: Failed to get the GNOME session proxy: The name org.gnome.SessionManager is not owned
**
ERROR:gexiv2/gexiv2-metadata.cpp:405:GExiv2Orientation gexiv2_metadata_get_orientation(GExiv2Metadata*): code should not be reached
Aborted - core dumped


Expected results:
No crash.

Additional info:
Looking at the libgexiv2 source code, I think https://github.com/GNOME/gexiv2/commit/02f97b262c315da2b46ac486a2c3e019d8cd925f is the culprit.  It introduces a number of
default: g_assert_not_reached();
sequences in gexiv2/gexiv2-metadata.cpp that deal with the image orientation for Minolta cameras.  The attached image is not rotated, so the two other cases are not taken (they are for 90 and 270 degrees rotation).

Comment 1 Sjoerd Mullender 2016-12-18 10:59:22 UTC
Created attachment 1233093 [details]
patch that fixes the problem

As I thought, the g_assert_not_reached() calls added in the changeset that I pointed to in my original bug report caused the problem.  The attached patch removes the two calls and it fixes my problem.

Comment 2 Sjoerd Mullender 2017-04-16 12:54:42 UTC
Please upgrade to the 0.10.5 version.  It fixes this bug.

While you're at it, please also update the URL in the source RPM.  The correct URL for the package is https://wiki.gnome.org/gexiv2 or https://github.com/GNOME/gexiv2.

Comment 3 Sjoerd Mullender 2017-05-15 16:43:13 UTC
See bug 1450540: a new version is available.

Comment 4 Ankur Sinha (FranciscoD) 2017-08-31 12:14:29 UTC
The package is already 0.10.6 in F25 - do you still see this bug?

Comment 5 Ankur Sinha (FranciscoD) 2017-08-31 12:16:16 UTC
Ah, it's in testing - please test the update and provide karma there:

https://bodhi.fedoraproject.org/updates/FEDORA-2017-e269c886d0

Cheers!

Comment 6 Sjoerd Mullender 2017-08-31 13:00:00 UTC
I'm running F26 now (of course ;-) ).  I see that libgexiv2 was updated to 0.10.6 on July 11.

No problems with that version, the bug is fixed.

I can create a VM with F25 in order to test this there if you really want.  I'm not sure I'm supposed to provide karma if I didn't actually test the build in question, so I'm not doing that now.

Comment 7 Ankur Sinha (FranciscoD) 2017-08-31 14:10:22 UTC
Nah. If it works on F26, that is fine. I'll close this bug. Ideally, it should've been linked to the update anyway.