Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Aperture crashes upon opening certain library

Basic info: OS X 10.7.5 and Aperture 3.4.4 on mid-2010 27-inch iMac


Story: I force quitted Aperture when it was trying to import from my camera (It somehow wasn't responding). My library seemed to be corrupted from then on.


What I've tried:

1. Searching through various forums to no avail

2. Creating a new library. This one works as I'm now working with a new library, but 177GB worth of photos are still out for now. And I've been pulling my hair hard trying to recover it.

3. Repairing permissions, repairing database, and rebuilding database. All three solutions were able to run to completion but wouldn't fix the library.

4. Deleting Preferences

5. Deleting photos that seemed to be imported prior to the force quit

6. Holding 'Shift' when opening Aperture

7. Reinstalling Aperture

8. Deleting ImageProxies.apdb as suggested in this discussion since he has a very similar error report to mine.


Any suggestions will be deeply appreciated.


Here's part of my crash report (if full version is needed please tell me immediately):


Crashed Thread: 11



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'

*** First throw call stack:

(

0 CoreFoundation 0x00007fff909a7f56 __exceptionPreprocess + 198

1 libobjc.A.dylib 0x00007fff98747d5e objc_exception_throw + 43

2 CoreFoundation 0x00007fff909a7d8a +[NSException raise:format:arguments:] + 106

3 CoreFoundation 0x00007fff909a7d14 +[NSException raise:format:] + 116

4 Foundation 0x00007fff8edd7bbc -[NSString substringWithRange:] + 109

5 RedRock 0x000000010cd4293f +[RKFileNamingPolicy fileSafeName:] + 136

6 RedRock 0x000000010ceed958 -[RKVersion(Imaging) proxyWritePath:] + 141

7 RedRock 0x000000010ceededf -[RKVersion(Imaging) absoluteProxyWritePath:] + 28

8 RedRock 0x000000010cee1b97 -[JPEGFileCacheStore filePathForVersion:key:withWrite:] + 51

9 RedRock 0x000000010cfb5d64 -[IPMiniJPEGFileCacheStore newCachePageLookupForRequest:] + 428

10 ProXTCore 0x000000010e51d14e -[XTCachePersistentPolicy newCachePageOnLookupForRequest:] + 136

11 ProXTCore 0x000000010e5144e1 -[XTCacheEvictionPolicy newCachePageLookupForRequest:] + 23

12 ProXTCore 0x000000010e51a32a -[XTCacheStore newObjectLookupInEvictionPolicyForRequest:] + 44

13 ProXTCore 0x000000010e51a524 -[XTCacheStore newObjectLookupRequest:rootStore:] + 39

14 ProXTCore 0x000000010e51b28e -[XTCacheStore newObjectForRequest:] + 65

15 Geode 0x000000010e2bbfc0 -[DGTier2Factory readRequest:intoPageRef:] + 482

16 Geode 0x000000010e2bc604 -[DGTier2Factory cache:cacheStore:onFulfillRequest:intoPageRef:] + 589

17 ProXTCore 0x000000010e514f47 -[XTCacheFactory backgroundFulfillment:] + 532

18 CoreFoundation 0x00007fff9099770d -[NSObject performSelector:withObject:] + 61

19 ProXTCore 0x000000010e4f5736 -[XTDistributor distributeMessage:] + 444

20 ProXTCore 0x000000010e4f50fa -[XTThread handleMessage:] + 342

21 ProXTCore 0x000000010e4f3eb3 -[XTThread run:] + 345

22 Foundation 0x00007fff8ee2972a -[NSThread main] + 68

23 Foundation 0x00007fff8ee296a2 __NSThread__main__ + 1575

24 libsystem_c.dylib 0x00007fff99f458bf _pthread_start + 335

25 libsystem_c.dylib 0x00007fff99f48b75 thread_start + 13

)


[snip]


Thread 11 Crashed:

0 libsystem_kernel.dylib 0x00007fff98b38ce2 __pthread_kill + 10

1 libsystem_c.dylib 0x00007fff99f477d2 pthread_kill + 95

2 libsystem_c.dylib 0x00007fff99f38a7a abort + 143

3 libc++abi.dylib 0x00007fff9026e7bc abort_message + 214

4 libc++abi.dylib 0x00007fff9026bfcf default_terminate() + 28

5 libobjc.A.dylib 0x00007fff987481b9 _objc_terminate + 94

6 libc++abi.dylib 0x00007fff9026c001 safe_handler_caller(void (*)()) + 11

7 libc++abi.dylib 0x00007fff9026c05c std::terminate() + 16

8 libc++abi.dylib 0x00007fff9026d152 __cxa_throw + 114

9 libobjc.A.dylib 0x00007fff98747e7a objc_exception_throw + 327

10 com.apple.CoreFoundation 0x00007fff90a321b9 -[NSException raise] + 9

11 com.apple.proxtcore 0x000000010e4f53b3 -[XTThread handleMessage:] + 1039

12 com.apple.proxtcore 0x000000010e4f3eb3 -[XTThread run:] + 345

13 com.apple.Foundation 0x00007fff8ee2972a -[NSThread main] + 68

14 com.apple.Foundation 0x00007fff8ee296a2 __NSThread__main__ + 1575

15 libsystem_c.dylib 0x00007fff99f458bf _pthread_start + 335

16 libsystem_c.dylib 0x00007fff99f48b75 thread_start + 13

iMac (27-inch Mid 2010), Mac OS X (10.7.5), Aperture 3.4.4

Posted on May 17, 2013 1:44 PM

Reply
11 replies

May 18, 2013 8:09 AM in response to exFictZ

When do the crashes occur? Immediately when you try to launch Aperture on the Aperture library or when you are browsing or editing images?


Is your library referenced or managed? And where is it located? If referenced, where are the original image files stored? Are you syncing with Facebook or Flickr?


The crash shows a problem creating URLs:

"[JPEGFileCacheStore filePathForVersion:key:withWrite:]"


One of the filenames in your library may be problematic - ethnic characters or illegal characters, filenames that are too long. This can happen when syncing with services that generate version names from captions.


Regards

Léonie

May 18, 2013 11:11 AM in response to léonie

The crash occurs within 5 seconds of opening the problematic library which is managed. It is located on the 2nd partition of the primary hard drive inside iMac. And yes, I did sync it with Facebook.


With your assistance in mind, do I now proceed with divide & conquer method of identifying the problematic filename, or are there other suggestions?


Best regards,

May 18, 2013 11:28 AM in response to exFictZ

And yes, I did sync it with Facebook.

When images are synced back from Facebook, the captions will be used as version names. This way the version names may be too long or can contain illegal characters. You may want to manually edit the captions on Facebook to remove ethnic characters and to shorten the captions, if any of your Facebook captions are very long.


With your assistance in mind, do I now proceed with divide & conquer method of identifying the problematic filename, or are there other suggestions?

That method requires that you can launch Aperture with the Shift key held down and are able to browse; can you do that, after deleting ImageProxies.apdb ?

May 21, 2013 11:36 AM in response to léonie

I've tried deleting ImageProxies.apdb and holding Shift when opening the library but Aperture still crashes within 5 seconds. Do you know if renaming files in Facebook will help, since my speculation is that with the names and characters synced back as it is now, the library will continue to crash before Aperture has a chance to sync the names again even if I rename them?


Regards,

May 21, 2013 11:48 AM in response to exFictZ

Do you know if renaming files in Facebook will help, since my speculation is that with the names and characters synced back as it is now, the library will continue to crash before Aperture has a chance to sync the names again even if I rename them?


Yes, that is what I meant, when I suggested to change the captions on Facebook. First change the captions, then delete ImageProxies.apdb, take your Mac offline, before you launch Aperture with the Shift-key held down. Can you now open your Aperture Library long enough to remove the Facebook images?

May 21, 2013 12:31 PM in response to exFictZ

Maybe the Facebook issue is a wildgoose chase.

Does Aperture work at all in your account?

Can you import into a new, empty Aperture library?


If yes, try once again to rebuild your library and to repair the preferences.

3. Repairing permissions, repairing database, and rebuilding database. All three solutions were able to run to completion but wouldn't fix the library.

Have you tried that again after removing the " ImageProxies.apdb"?



If you cannot even work with an empty new library, check if you can work from a different user account. See: Isolating an issue by using another user account


If Aperture works from a different user account, check again the preferences and presets in your account:

4. Deleting Preferences

Have you only deleted the file "com.apple.aperture.plist" from ~/Library/Preferences?

Or also the mirrored files in the sandbox:

~Library/Containers/com.apple.Aperture/Data/Library/Caches/com.apple.Aperture/

May 24, 2013 6:44 AM in response to léonie

Done!


Finally recovered 16,605 photos from the seemingly corrupted library. This is what I did:


1. Imported my corrupted library into a new one.

2. Upon completing the import, Aperture crashed.

3. Opening the newly created library again was fine, didn't crash Aperture immediately. However the new library's size is about the same as the corrupted one, but I couldn't see anything: no projects, no photos, no nothing. But hey, it didn't make too much sense having ~100GB library with nothing inside, did it?

4. So I rebuilt the database of the new seemingly empty library...

5. And voila! Every photo came back to me, although not structured into projects separated by date, but rather one big project containing all of them.

6. And I couldn't care less about that! Everything is back, and I couldn't have wished for more.


Lesson learnt is that syncing with Facebook is a perilous act...


Thank you again leonieDF. I wish I could hug you right now.


Best regards,

May 24, 2013 7:03 AM in response to exFictZ

You are welcome! I am glad you could fix it. Thanks for the hug! 😍




5. And voila! Every photo came back to me, although not structured into projects separated by date, but rather one big project containing all of them.


Cheers

Léonie


To separate again by date - if you want it -, I'd use smart searches or albums, with a Date rule " Capture month/Year is" or a Calendar Rule and then create new projects from the selection.

May 24, 2013 9:27 AM in response to léonie

The recovered photos date back to 2008. It'd be a lot of work to manually split these into projects day by day. On the plus side, there are no versions to worry about. I've checked using smart search "Adjustments: are applied" and verified that only masters survived the catastrophe. That made things easier on reorganising aspect; I exported all masters and re-imported them with "split projects by date" checked.


Thanks again Leonie

Best regards,

Aperture crashes upon opening certain library

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.