11 Replies Latest reply: Apr 24, 2013 7:16 AM by léonie
chang k Level 1 Level 1 (0 points)

My Aperture 3.4.4 crashes all the time a few minutes after startup.

attached the error message below.

Someone has any idea to fix this?

 

 

 

Exception Type:  EXC_CRASH (SIGABRT)

Exception Codes: 0x0000000000000000, 0x0000000000000000

 

 

Application Specific Information:

*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSPathStore2 substringWithRange:]: Range or index out of bounds'

terminate called throwing an exception

abort() called

 

 

Application Specific Backtrace 1:

0   CoreFoundation                      0x00007fff871f6b06 __exceptionPreprocess + 198

1   libobjc.A.dylib                     0x00007fff8d00f3f0 objc_exception_throw + 43

2   CoreFoundation                      0x00007fff871f68dc +[NSException raise:format:] + 204

3   Foundation                          0x00007fff81f3a3ad -[NSString substringWithRange:] + 107

4   RedRock                             0x000000010a0b693f +[RKFileNamingPolicy fileSafeName:] + 136

5   RedRock                             0x000000010a261958 -[RKVersion(Imaging) proxyWritePath:] + 141

6   RedRock                             0x000000010a261edf -[RKVersion(Imaging) absoluteProxyWritePath:] + 28

7   RedRock                             0x000000010a255b97 -[JPEGFileCacheStore filePathForVersion:key:withWrite:] + 51

8   RedRock                             0x000000010a329d64 -[IPMiniJPEGFileCacheStore newCachePageLookupForRequest:] + 428

9   ProXTCore                           0x000000010b88a14e -[XTCachePersistentPolicy newCachePageOnLookupForRequest:] + 136

10  ProXTCore                           0x000000010b881534 -[XTCacheEvictionPolicy isObjectReadyForRequest:] + 20

11  ProXTCore                           0x000000010b8872d0 -[XTCacheStore isObjectReadyForRequest:] + 37

12  ProXTCore                           0x000000010b880b77 -[XTCache isObjectReadyForRequest:] + 28

13  RedRock                             0x000000010a20b8a2 -[RKImageCache hasThumbnailOnDiskForVersion:style:] + 70

14  RedRock                             0x000000010a21b12c -[DownsampleFactory cache:cacheStore:onFulfillRequest:intoPageRef:] + 1162

15  ProXTCore                           0x000000010b882501 -[XTCacheFactory cache:cacheStore:fulfillRequest:intoPageRef:] + 896

16  ProXTCore                           0x000000010b881388 -[XTCacheBroker cacheStore:fulfillRequest:intoPageRef:] + 51

17  ProXTCore                           0x000000010b88809f -[XTCacheStore newObjectFulfillRequest:] + 546

18  ProXTCore                           0x000000010b888657 -[XTCacheStore newObjectForRequest:] + 1034

19  Geode                               0x000000010b629fc0 -[DGTier2Factory readRequest:intoPageRef:] + 482

20  Geode                               0x000000010b62a604 -[DGTier2Factory cache:cacheStore:onFulfillRequest:intoPageRef:] + 589

21  ProXTCore                           0x000000010b881f47 -[XTCacheFactory backgroundFulfillment:] + 532

22  ProXTCore                           0x000000010b862736 -[XTDistributor distributeMessage:] + 444

23  ProXTCore                           0x000000010b8620fa -[XTThread handleMessage:] + 342

24  ProXTCore                           0x000000010b860eb3 -[XTThread run:] + 345

25  Foundation                          0x00007fff81f5acd2 __NSThread__main__ + 1345

26  libsystem_c.dylib                   0x00007fff8a28f7a2 _pthread_start + 327

27  libsystem_c.dylib                   0x00007fff8a27c1e1 thread_start + 13


Aperture 3, OS X Mountain Lion (10.8.3)
  • léonie Level 9 Level 9 (65,160 points)

    What happened before the crashes started?

    • Did you upgrade software,
    • install something new,
    • move your Aperture library,
    • import new photos or videos?
    • Do other applications crash? anything else suspicious?
    • Can you launch Aperture with the Shift key held down to defer the generation of previews?

     

    Regards

    Léonie

  • chang k Level 1 Level 1 (0 points)

    Thanks for the nice catch!

    Deferring the generation of previews stops crashing.

    But whenever I try generating previews, it crashes again.

    Now we know the preview generation is the problem, but how can I fix it?

  • Frank Caggiano Level 7 Level 7 (25,695 points)

    You have a corrupted image in the library. Did the crash start recently, after an import? If so it could indicate one of your recent imported images is at fault.

     

    If that is not he case then you will need to use the dived and conquer strategy. Try generating previews for half the library. If that works try on the other half. Keep halving the part of the library that causes the failure. Eventually you will get to the defective image.

     

    good luck

  • chang k Level 1 Level 1 (0 points)

    Thanks so much.

    I was able to locate almost 100 images by using devide-and-conquer you mentioned.

     

    After tons of experiment, I found the root of the cause.

    All of the photos with really long version name have the same symptom.

    Gererating thumbnail (or generating preview) for those pictures may crash Aperture.

     

    And all those long version names have come from Facebook synchronization.

    You know, after synchronizing with Facebook, all version name will be replaced with Facebook photo captions.

     

    Hope the next Aperture release will fix this bug.

  • léonie Level 9 Level 9 (65,160 points)

    After tons of experiment, I found the root of the cause.

    All of the photos with really long version name have the same symptom.

    Gererating thumbnail (or generating preview) for those pictures may crash Aperture.

    How long are the filenames in question? If your disk is formatted correctly, filenames up to 256 characters should be supported. Or are the filenames even longer?

     

    Is your Aperture library on an external drive, and is the drive fornatted MacOS X Extendended Journaled? Are your referenced original master image files on a drive formatted MacOS X extended Journaled?

    If your library or referenced files are on a drive formatted differently, reformat the drives with Disk Utility. Reformatting will erase the drive, so you need to backup all data, before you change the formatting.

  • chang k Level 1 Level 1 (0 points)

    Okay, after more tests, now I concluded the version name or file name length is not the problem,

    because it crashes even for short version name and short file name pictures.

     

    Exporting original from the problematic picture is okay.

    Exporting version from the problematic picture is okay, too.

     

    But "generating thumbnail" of the problematic picture crashes Aperture.

    Rebuilding library doesn't resolve this issue.

     

    Any idea?

  • Frank Caggiano Level 7 Level 7 (25,695 points)

    So there is or are images that if you select them and do Generate Preview will always cause Aperture to crash?

     

    If that is the case is there anything about these images that is different or unique? Format, size,  origin, etc?

     

    You should make a new empty library and import a few of these problem images into it and see if the problem still occurs.

     

    If it does make a new user, run Aperture as that user and import a few of these images into it and see what happens.

     

    Also would it be possible for you to put one of these files (the original) somewhere such as Dropbox so that it can be tested on another system?

     

    regards

  • chang k Level 1 Level 1 (0 points)

    Finally, I found both of the cause and the solution.

     

    The cause :

     

    (1) in Aperture, upload some photos to Facebook

    (2) in Facebook, update the photos's caption with long foreign characters.

    (3) in Aperture, synchronize the photos with Facebook again.

    This will rename the photo files in Aperture library, and eventually this will corrupt Database/ImageProxies.apdb inside Aperture library folder.

     

    when Aperture accesses this correupted Database/ImageProxies.apdb file, Aperture just crashes.

     

     

    The temporary solution :

     

    (1) quit Aperture

    (2) delete Database/ImageProxies.apdb file inside Aperture library folder.

    (3) start Aperture

    (4) it will be better rename the master files with only english alphabet to prevent future crash.

        (We can update all the master file names easily by using "Batch Change" menu.)

     

     

    Please someone let Aperture developer know this and fix it for next release.

    Regards

  • léonie Level 9 Level 9 (65,160 points)

    Finally, I found both of the cause and the solution.

     

    The cause :

     

    (1) in Aperture, upload some photos to Facebook

    (2) in Facebook, update the photos's caption with long foreign characters.

    (3) in Aperture, synchronize the photos with Facebook again.

    This will rename the photo files in Aperture library, and eventually this will corrupt Database/ImageProxies.apdb inside Aperture library folder.

     

    when Aperture accesses this correupted Database/ImageProxies.apdb file, Aperture just crashes.

     

     

    The temporary solution :

     

    (1) quit Aperture

    (2) delete Database/ImageProxies.apdb file inside Aperture library folder.

    (3) start Aperture

    (4) it will be better rename the master files with only english alphabet to prevent future crash.

        (We can update all the master file names easily by using "Batch Change" menu.)

     

     

    Please someone let Aperture developer know this and fix it for next release.

    Regards

    This will help until the next sync, if you do not also fix the captions on Facebook.

     

    But you never answered my question re the formatting of your drives:

    Are your referenced original master image files on a drive formatted MacOS X extended Journaled?

    Long filenames or ethnic characters in the captions and version names derived from the captions should only matter, if the drive is formatted incorrectly. It would really be good to know, for future similar cases, if all this happened with the library and /or the original files on a correctly formatted drive.

  • chang k Level 1 Level 1 (0 points)

    Right, I won't sync with facebook until Aperture gets fixed.

     

    My Aperture library contains all master files, and there is no referenced master.

    And the disk was formatted MacOS X extended Journal.

     

    Now Aperture developers have 2 homeworks :

     

    (1) fix the bug that Aperture crashes when Database/ImageProxies.apdb file has long ethnic texts.

        ( see the Backtrace in the first article in this discussion thread.)

     

    (2) "facebook sync" doesn't need to update both of version name and file name.

         I believe just updating version name is good enough, since "facebook photo caption" is supposed to be long description of a photo, which is not adequate for a file name.

  • léonie Level 9 Level 9 (65,160 points)

    Right on both accounts, but I'd prefer slightly different fixes:

     

    (1) fix the bug that Aperture crashes when Database/ImageProxies.apdb file has long ethnic texts.

    1. I'd prefer that they prevented Aperture from writing too long, ethnic texts to the database files in the first place.  But "Range Index Out of Bounds Errors" should be should not be allowed to crash a Pro Application. I hope the enxt release will fix that.

    "facebook sync" doesn't need to update both of version name and file name.

         I believe just updating version name is good enough, since "facebook photo caption" is supposed to be long description of a photo, which is not adequate for a file name.

    Why sync the captions to the version names and file names at all? That is not the proper place for that. Aperture manages the IPTC fields, and I'd prefer the Facebook captions to be mapped to the IPTC caption tag.  To clandestinely rename synced files is messing up the Aperture library. Version names and filenames are used for different purposes.

     

    Léonie