On 03/06/2012, at 4:54 PM, Kyle Sluder wrote: > If IKImageView's architecture is proving to be a problem, perhaps it's time > to consider ditching IKImageView.
I'm certainly going to give that some serious thought. In fact my scheme is now working fairly well, at least when I run it from Xcode. But run it directly from Finder (either as a debug or a release build) and it gets into all sorts of trouble, which is most puzzling. Deep inside the IKImageBrowserView I get this crash: Crashed Thread: 8 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Application Specific Information: objc[2081]: garbage collection is OFF Assertion failed: (!"CantHappenCB"), function CantHappenCB, file /private/var/tmp/PSNormalizerCore/PSNormalizerCore-10.8.2~1/packages/produtil/sources/psrip.c, line 231. Thread 8 Crashed: 0 libsystem_kernel.dylib 0x00007fff8700ece2 __pthread_kill + 10 1 libsystem_c.dylib 0x00007fff882517d2 pthread_kill + 95 2 libsystem_c.dylib 0x00007fff88242a7a abort + 143 3 libsystem_c.dylib 0x00007fff882755de __assert_rtn + 146 4 libnserverlite.dylib 0x000000010c351d52 0x10c34a000 + 32082 5 libnserverlite.dylib 0x000000010c557b8d 0x10c34a000 + 2153357 6 libnserverlite.dylib 0x000000010c53a36c 0x10c34a000 + 2032492 7 libnserverlite.dylib 0x000000010c350522 0x10c34a000 + 25890 8 libnserverlite.dylib 0x000000010c51c8e3 0x10c34a000 + 1911011 9 libnserverlite.dylib 0x000000010c51bd88 0x10c34a000 + 1908104 10 libnserverlite.dylib 0x000000010c51b6f2 0x10c34a000 + 1906418 11 libnserverlite.dylib 0x000000010c351fc9 0x10c34a000 + 32713 12 libnserverlite.dylib 0x000000010c34b724 NormalizerServerInit + 1512 13 com.apple.normalizer.privateframework 0x0000000106e74ba3 doNormalizeWithMutex + 3588 14 com.apple.normalizer.privateframework 0x0000000106e74faa normalize + 200 15 com.apple.CoreGraphics 0x00007fff872bde14 sync_convert + 462 16 com.apple.CoreGraphics 0x00007fff8727ac89 CGPSConverterConvert + 11 17 com.apple.AppKit 0x00007fff8c69b31f -[NSEPSImageRep initWithData:] + 297 18 com.apple.AppKit 0x00007fff8c69adf5 +[NSEPSImageRep imageRepWithData:] + 47 19 com.apple.AppKit 0x00007fff8c33c2be +[NSImageRep _imageRepsWithContentsOfURL:expandImageContentNow:giveUpOnNetworkURLsWithoutGoodExtensions:] + 998 20 com.apple.AppKit 0x00007fff8c33be9a __-[NSImageURLReferencingRepProvider representations]_block_invoke_1 + 48 21 com.apple.Foundation 0x00007fff8f2d5347 _NSFaultInObject + 35 22 com.apple.AppKit 0x00007fff8c30cae7 -[NSImageURLReferencingRepProvider representations] + 80 23 com.apple.AppKit 0x00007fff8c33bd7e __-[NSImage size]_block_invoke_1 + 353 24 com.apple.AppKit 0x00007fff8c2c7825 -[NSImage _usingRepProviderPerformBlock:] + 37 25 com.apple.AppKit 0x00007fff8c2f56c2 -[NSImage size] + 129 26 com.apple.AppKit 0x00007fff8c6fe681 -[NSImage isValid] + 149 27 com.apple.imageKit 0x00007fff8ef281fa -[NSImage(IKAdditions) IKFixDPI] + 31 28 com.apple.imageKit 0x00007fff8ef2836a -[NSImage(IKAdditions) IKSize] + 35 29 com.apple.imageKit 0x00007fff8ef2cce8 -[IKImageWrapper _size] + 1666 30 com.apple.imageKit 0x00007fff8ef2c649 -[IKImageWrapper size] + 140 31 com.apple.imageKit 0x00007fff8f020b93 -[IKThumbnailBuilder computeThumbnail] + 75 32 com.apple.imageKit 0x00007fff8ef4eb08 -[IKImageBrowserView(ImageBrowserImport) startScrollPrefetchTask] + 629 33 com.apple.CoreFoundation 0x00007fff8ac9cfb1 -[NSObject performSelector:] + 49 34 com.apple.imageKit 0x00007fff8efeeddd -[IKTaskManager taskLoop] + 776 35 com.apple.Foundation 0x00007fff8f2f272a -[NSThread main] + 68 36 com.apple.Foundation 0x00007fff8f2f26a2 __NSThread__main__ + 1575 37 libsystem_c.dylib 0x00007fff8824f8bf _pthread_start + 335 38 libsystem_c.dylib 0x00007fff88252b75 thread_start + 13 This is for items which are not even part of my scheme, but are returned as a simple path to the image - in this case an EPS image. The assertion suggests "it can't happen", but it does, every bloody time. It never happens when I run it with the debugger, so it's proving exceedingly hard to do anything about. > Well, since we implemented it ourselves, our iPad document picker, which > prioritized previews of visible items, works quite well. I have another home-rolled view which does something similar and it works fine as well. It's just the ImageKit class that's a bitch and a half. The only reason I'm persisting with it is that for all the OTHER image types (notwithstanding the above crash), it handles it all for you. Replacing it is a big job. --Graham _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com