D.R.C.

Q: Photos crashes when Removing Location

Upon returning from vacation, I imported several hundred photos from my Panasonic ZS40 camera into Photos. The ZS40 has a built-in GPS receiver, and embeds location information into each photo if it's available.

 

When viewed in Photos,  a fair number (but not all) of the imported photos appear to have embedded location information (the little 'map' icon appears in the lower-left corner), but the photo's location fails to appear on the map in the Info box.  A map appears, but there's no push-pin. Instead, the info box displays "Looking up location information...". This notice never disappears, and the photo's location never appears on the map (which is not relevant to where the photo was taken).

 

I suspect that the ZS40 had not yet acquired GPS lock when these photos were taken. Perhaps it wrote default (or faulty) lat/long coordinates into the EXIF data structure embedded in the JPG file.  In order to correctly assign the proper location in Photos, I clicked Image/Location/Remove Location, intending to then manually add the location where the photo was taken.  Photos promptly crashes as soon as I click Remove Location.

 

This happens every time. I've tried it on dozens of different affected photos, with the same result: Photos crashes.

It appears to be a coding bug in the Photos program (which I dislike more and more every time I use it).

 

Can anyone suggest a workaround with (or without) Photos?

Can anyone tell me the location of the actual JPG image file which Photos has hidden away somewhere in its database? (With iPhoto, it was easy to find the actual file...). If I can find the actual JPG files, I might be able to inspect (and perhaps correct) the faulty lat/long data in the EXIF with a 3rd party geo-tagging utility.

 

Photos 1.3

OSX 10.11.3

Posted on May 4, 2016 9:02 AM

Close

Q: Photos crashes when Removing Location

  • All replies
  • Helpful answers

Page 1 Next
  • by LarryHN,

    LarryHN LarryHN May 4, 2016 9:51 AM in response to D.R.C.
    Level 10 (84,617 points)
    Photos for Mac
    May 4, 2016 9:51 AM in response to D.R.C.

    Try manually adding the correct location without first removing the current location

     

    You can export the unmodified original (file menu ==> export) and work on those and then import the corrected photos and delete the original photos all using Photos as you should

     

    The original files are in your Photos library in the Masters folder - you can see it by right clicking on the Photos library and showing Package content

     

     

    BUT  --   be VERY sure you have a great, current backup

     

     

    It is not really a good idea to mess around in there - there are no user serviceable parts in the Photos library, it is not designed for human interaction and there are background and iCloud Photo Library operations taking place that could cause you problems or even damage your library - it never has been supported are smart to mess around inside the library and with Photos is it very dangerous

     

    and there are a couple of user scripts for dealing with GPS - they might be helpful in determineing what you have or even fixing it -  Photos for Mac

     

    LN

  • by D.R.C.,

    D.R.C. D.R.C. May 4, 2016 10:32 AM in response to LarryHN
    Level 2 (162 points)
    Apple TV
    May 4, 2016 10:32 AM in response to LarryHN

    @Larry,

    Thanks for the reply.

     

    I couldn't find a way to manually add the correct location first (which is why I was trying to remove the 'bad' location).

    Since Photos already thinks the photos have GPS data, the usual Assign a Location field in the Info window is not present. In its place is the message Looking up location info...


    Is there some other way to add location other than the Assign a Location field??

    Under the Image/Location menu, the only available option is Remove Location. The other (Revert to Original Location) is greyed out.

     

    I still have the SD card with the original photos on them, so if I can find a decent geo-coding app, I'll be able to copy the images from there and inspect/fiddle them.

     

    DRC

  • by LarryHN,

    LarryHN LarryHN May 4, 2016 11:52 AM in response to D.R.C.
    Level 10 (84,617 points)
    Photos for Mac
    May 4, 2016 11:52 AM in response to D.R.C.

    In the assigned location simple double click to highlight and type a new location name

     

    I personally like HoudahGeo the best for GeoCoding - there are a number of them out there

     

     

    LN

  • by D.R.C.,

    D.R.C. D.R.C. May 4, 2016 12:05 PM in response to LarryHN
    Level 2 (162 points)
    Apple TV
    May 4, 2016 12:05 PM in response to LarryHN

    @Larry,

    Unfortunately, there is no assigned location to click on, so I'm unable to enter a new location name.   The field in which the location would normally be says "Looking up location info...".  See screenshot.

    Double-clicking on that has no effect.

     

    2016-05-04_14-59-07.png

  • by LarryHN,

    LarryHN LarryHN May 4, 2016 12:10 PM in response to D.R.C.
    Level 10 (84,617 points)
    Photos for Mac
    May 4, 2016 12:10 PM in response to D.R.C.

    strange - I've not seen that

     

    Export the unmodified original of that photo and look at the EXIF data using Preview and see what you have

    LN

  • by D.R.C.,

    D.R.C. D.R.C. May 4, 2016 12:25 PM in response to LarryHN
    Level 2 (162 points)
    Apple TV
    May 4, 2016 12:25 PM in response to LarryHN

    Preview's Inspector pane shows there's GPS info in the EXIF, but the lat/long are blank. Screenshot below.

     

    My suspicion is that the camera failed to write correct lat/long into the EXIF block when the affected photos were taken. Perhaps the GPS receiver didn't have lock. Perhaps a bug in the Panasonic firmware.  Then Photos chokes when it encounters the bad lat/long values. It can't lookup/display the location on the map, and it crashes when it tries to remove them.

     

    About 20% of the photos I took on my trip are affected.  Most are fine (ie., the camera wrote good GPS data in the JPGs, and Photos properly finds the locations).  A handful have no GPS data at all, usually when I was in a basement or somewhere the GPS reception would have been poor.

    2016-05-04_15-14-10.png

  • by LarryHN,Solvedanswer

    LarryHN LarryHN May 8, 2016 1:47 PM in response to D.R.C.
    Level 10 (84,617 points)
    Photos for Mac
    May 8, 2016 1:47 PM in response to D.R.C.

    Looks like the camera messed up - your best solution is probably going to be to edit it with a third party program and import the corrected photos

     

    You can try removing the GPS info using Preview and importing that image - you should be able to then add it in Photos

     

    And I'd report this as a bug - Photos should allow you to fix the camera issue rather than just crash - My Photo Stream FAQ - Apple Support

     

    LN

  • by D.R.C.,

    D.R.C. D.R.C. May 4, 2016 1:54 PM in response to LarryHN
    Level 2 (162 points)
    Apple TV
    May 4, 2016 1:54 PM in response to LarryHN

    @Larry,

    I launched Console and found logs of when Photos crashed (at the instant when I attempted to Remove Location).

    Here's a snippet:

    Application Specific Information:

    Assertion failure in -[IPXGPSLocation initWithCoordinate:placeAnnotation:], /Library/Caches/com.apple.xbs/Sources/PhotoApp/PhotoApp-350.23/app/spark/Source /Places/IPXGPSLocation.m:30

    Invalid coordinate: {17056881.666667,17056881.666667}

    Performing @selector(a_removeLocation:) from sender NSMenuItem 0x7fc7ebd2deb0

    abort() called

     

    Note the unusual co-ordinates (which I assume are the lat/long values).

    I surmise that my Lumix ZS-40 camera is putting these numbers into the EXIF metadata on the affected photos (who knows why...), and then Photos gags on the bad values. 

     

    I checked the Panasonic website for firmware updates for the ZS-40, but there aren't any. Not that it would make any different to my current batch of photos.

     

    The crashes were already reported to Apple (numerous times): I let OSX submit a report every time that Photos crashed, and I added details explaining what I had done to trigger the crash. That should provide Cupertino with all the info necessary to follow-up, though I won't hold my breath...

     

    Now I have to figure out why the imported photos aren't in chronological sequence when they get to Photos.  The timestamps are all correct, but the timezones are all over the place.  Some are Eastern time (where I am when I did the import). Some are Central European time (where the photos were taken). Some have no timezone (i.e. GMT).  

     

     

    Thanks for the dialog on this.

    DRC

  • by LarryHN,Helpful

    LarryHN LarryHN May 8, 2016 1:48 PM in response to D.R.C.
    Level 10 (84,617 points)
    Photos for Mac
    May 8, 2016 1:48 PM in response to D.R.C.

    I would still report as a Photos bug - the crash report I believe just is collected automatically antlized and no one actually looks at them until something flags them - your choice but I wouel send the bug report - http://www.apple.com/feedback/photos.html

     

     

    As to the sequencing - it is related as Photos does a terrible job with time zones (another bug report needed here) - Léonie has figured it out and posted - basically her solution is to keep the camera and computer all set on her home time

     

    I usually take my computer with me so I import in the same time zone I took the (at least most of the) Photos

     

    I'll ask her to repost her info on that or you can search for it in these forums

     

    LN

  • by léonie,

    léonie léonie May 4, 2016 11:33 PM in response to D.R.C.
    Level 10 (106,904 points)
    iLife
    May 4, 2016 11:33 PM in response to D.R.C.

    When I use exiftool to add the same GPS tags to a photo it will crash Photos for me too, if I try "remove location" from the Image menu.

     

    However, when I simply use "File > Export > Export ... Images" and uncheck "Include Location Information" in the export panel, the photo will be exported with the GPS tags removed. I can then reimport the photos without the problematic GPS.

  • by léonie,

    léonie léonie May 5, 2016 12:19 AM in response to LarryHN
    Level 10 (106,904 points)
    iLife
    May 5, 2016 12:19 AM in response to LarryHN

    Hi Larry,

    The timezone support is really problematic in photos, because it is impossible to find out which timezone the photos are using. The Info panel does not show the timezone for a photo, and if we force it to display the timezone, it will not show the timezone name for the capture time of the photo but the current system timezone.

     

    As you know, Photos is using the timezone of the current system time to interpret the capture dates of the photos, when you import photos.

    To handle this, it is best to import the photos always to the computer, while the system time is set to the same timezone as the camera. And never import photos at the same time, that have been taken with the camera set to different timezones.

     

    I used to handle this by simply never, ever changing the timezones in my cameras. For ten years I kept all cameras set to UTC, the same timestamp used by geotrackers like Garmin or AMOD.  This way I would always know exactly the timezone setting of any photo, without any complication by daylight savin time switches. And all photos in my library had the same timebase. And geocoding was very easy.

     

    This work-around is problematic however, if we are also taking photos with an iPhone or other devices, that need to be set to the local time. And my newest camera, a Lumix FZ330, insists on being set to the local time, or I cannot transfer the photos to my Mac using the Wi-Fi or use the iPhone as a track logger to geocode the photos in the camera.

     

    So I had to revert to changing the timezone in the cameras whenever I am entering a different timezone and I take a picture of my  watch, so I can easily recognize where photos with a different timezones start.  For the iPhone I was forced to disable the automatic timezone switch. Otherwise I would have had no control at all over the timezone used, because it is hard to tell, when the iPhone could read the time server after crossing the border and switch to a different timezone.

     

    Photos does not even have a setting to use UTC for the capture time, if we try to correct the timezone with "Image> Adjust Date and Time".  In winter we can use GMT instead, but in summer Photos will automatically interpret "GMT" as British Summer Time. When I need to work with the older photos, taken with UTC  capture time, I use the "closest city: Reykjavik - Iceland".  Iceland does not have the daylight saving time complication.

     

    One more complication with my Lumix cameras: when I take videos with my FZ28 or FZ330, the camera also will save a still frame, but without an EXIF capture time tag. These still frames will appear at random places in the Moments after importing, because the creation date is used instead  of the precise capture date. The video still frames are easy to recognize by the different aspect ratio.

  • by D.R.C.,

    D.R.C. D.R.C. May 5, 2016 6:49 AM in response to léonie
    Level 2 (162 points)
    Apple TV
    May 5, 2016 6:49 AM in response to léonie

    @Léonie and Larry,

    Thanks to both of you for your helpful replies.

     

    My current vacation photo project is the first time I've 'seriously' used Photos since migrating from iPhoto. What a pain. Photos really has a lot of shortcomings.

    In addition to it crashing (triggered by what appears to be 'bad' lat/long data in some pictures, seemingly a bug in my Lumix ZS40), I'm dealing with large numbers of out-of-order pictures when viewed in Photos Moments.  It's much as Léonie described, but worse.  Like her, I'm integrating images taken with both my iPhone and the Lumix (and my wife's iPhone). 

     

    It's not obvious, but Photos uses a hidden timezone parameter to determine the ordering. As best I can tell, it adds a timezone parameter to each image as it is imported. The timezone that's applied can be inspected by opening the Adjust Date & Time (ADT) window (not through the Info pane). The timezone offset is then used to determine ordering in Photos.  So two photos with seemingly identical timestamps can get sorted on the timeline hours apart.

     

    For photos imported from my iPhone, I found two situations:

    - pictures taken on the iPhone retain the timezone that was in use on the iPhone.  If it's automatically setting the date/time, this will be the 'correct' in-country timezone.   Photos assigns this timezone to the image 'under the covers' (and it can be seen in the ADT window).

    - screenshots captured on the iPhone don't seem to include the iPhone's timezone.  When imported into Photos, it assigns the timezone that's in force on the Mac when the import was done.   On one occasion in Barcelona, I took a photo on the iPhone and immediately captured a screenshot of a related webpage.  In Moment, the two images were sorted 6 hours apart. They should have been side-by-side.

     

    For photos taken on the Lumix, it's much more complicated.  I imported several hundred pictures. The majority had GPS tags in the EXIF, thanks to the GPS receiver in my Lumix ZS40. Some did not - either I had forgotten to activate its GPS, it hadn't locked on the satellites, etc.  As described above, some of the images with GPS tags contained bad GPS values due to a camera bug.

     

    I've looked at how Photos dealt with the import for about a third of my shots so far. Here's what I found:

    1) For images with no GPS, Photos was quite consistent. It assigned the Mac's timezone.

    2) For images with faulty GPS coordinates (17056881.666667, as described previously), Photos assigned the Mac's timezone.

    3) For images with a legitimate GPS tag, it usually assigned a timezone corresponding to where the picture has been taken. But not always.  About 10-15% of the time, the "Closest City" field in the ADT window was blank.  Based on where these pictures got ordered on the timeline, I determined that the timezone applied to these pictures was GMT. And on another 10% or so, the timezone assigned was the Mac's timezone. 

     

    Situation (1) is pretty straightforward. If there's no location info in the image, about all Photos can do is assign the Mac's timezone.

    Ditto for situation (2).

    I'm unable to rationalize (3).  Sometimes, Photos does the 'right' thing, but often it does not, assigning either no location (a GMT time zone) or my home time zone) to an image.  I have several instances of two (or more) pictures taken in the same location (in Europe) a few minutes apart.  The images all have correct GPS data in the EXIF.  Photos properly displays the locations on the little map.  But some will have the correct timezone applied, some will have GMT (2 hours off) or some will have my home timezone (6 hours off). As a result, the pictures are scattered all over the timeline.

     

    I've been unable to deduce any pattern in Photos behavior - it seems random.  So there's no obvious way to automate repairs. My current solution, painful as it is, is to go through each picture one at a time, correcting the 'hidden' timezone parameter in the ADT window, and manually applying a time correction if needed to get the pictures in the proper order.    I thought of stripping off all the EXIF data on the Lumix shot before the import. I'm pretty sure they would all then be ordered correctly, but I'd lose the location information.  I've found it is very handy to have that automatically captured.

  • by LarryHN,

    LarryHN LarryHN May 5, 2016 6:54 AM in response to D.R.C.
    Level 10 (84,617 points)
    Photos for Mac
    May 5, 2016 6:54 AM in response to D.R.C.

    Unfortunately there is no solution but at least now you have a better understanding of the problem and a work around for some situations

     

    and your choice but I would send the bug report - http://www.apple.com/feedback/photos.html

     

     

    LN

  • by D.R.C.,

    D.R.C. D.R.C. May 5, 2016 8:41 AM in response to LarryHN
    Level 2 (162 points)
    Apple TV
    May 5, 2016 8:41 AM in response to LarryHN

    @Larry,

    I submitted two bug reports: one on the crashes when Photos tries to remove location, the other on the misordering (due to random assignment of timezone offset).

     

    Thanks.

Page 1 Next