GNOME Bugzilla – Bug 735914
EOG's Map plugin crashes on invalid GPS coordinates
Last modified: 2014-09-03 18:14:25 UTC
EOG will crash with the following failed assertion when viewing many (but not all!) images taken with my DMC-TS5 camera: $ eog teste.jpg Duplicate property or field node Duplicate property or field node ** ERROR:./champlain-scale.c:253:redraw_scale: assertion failed: (base > 0) Abortado (imagem do núcleo gravada) $ LC_ALL=C eog --version GNOME Image Viewer 3.12.2 I'm attaching both a test image and a core dump generated from trying to open it.
Well, it seems I can't attach either due to size limits. You can download the test image from Google Drive, just click on the download icon at the top toolbar: https://docs.google.com/file/d/0B1RQL7VdLXBkbTZQR09TX2NTd1E/ Fun fact. After imgur's post processing, EOG is able to open the file just fine: http://imgur.com/caHCbvq
Oh, the GPS coordinates saved in the file seem a bit off: GPS Altitude : 1143 m Above Sea Level GPS Date/Time : 0000:00:00 00:00:00Z GPS Latitude : 17056881 deg 51' 12.15" N GPS Longitude : 17056881 deg 51' 12.15" E GPS Position : 17056881 deg 51' 12.15" N, 17056881 deg 51' 12.15" E imgur is stripping off the metadata, so they don't cause any harm afterwards. These coordinates are apparently causing the Map plugin to go off limits, so if it is a showstopper for you. Although, I am not sure if that is really fixable.
So there are actually two bugs: 1. EOG's Map plugin crashes on invalid positions. It should just ignore that the image has a position instead. 2. EOG's library that reads EXIF information needs a fix to read that GPS position. I know *something* can be done about it because Flickr correctly puts the images on the map. I'm going to rename this issue so that it reflects bug 1. Where should I file a issue for bug 2?
Hmmm, actually, I'm wrong about bug 2 above. I went to Flickr to confirm that it is able to show the position of this particular image and, surprise, it doesn't! Then I've checked one of the images that Flickr does show on a map, and, surprise again, EOG and the Map plugin both work! Perhaps there is a bug on my camera that puts that bogus data whenever it is not able to fix the GPS position. The test image I've posted here was taken indoors where it rarely gets a GPS fix. If that's the case, bug 2 doesn't exist and only bug 1 remains relevant.
Well, there's also this tag: GPS Status : Measurement Void it knows "Active" as well. However it doesn't seem to be great for compatibility to rely on this field as I have images with this tag that still have valid coordinates. We should probably just check that the angles make sense (+-90/+-180).
I agree! That would solve this problem
There we go. Longitude is limited to +-180° and latitude to +-90°. commit 74bdd4aa13b8f64459ef4f3004ddf27acbb510e6 Author: Felix Riemann <> Date: Wed Sep 3 19:45:48 2014 +0200 map: Perform simple validation on extracted coordinates Simply check whether the angles make sense. That should avoid hitting an assertion in libchamplain with images having bogus values. https://bugzilla.gnome.org/show_bug.cgi?id=735914 Maybe you could still report this to libchamplain as well. I'd say libchamplain shouldn't accept such values either. --- This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Many thanks! I've filed bug #735986.