{"id":5215,"date":"2014-03-30T19:48:54","date_gmt":"2014-03-30T19:48:54","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/sporadic-crash-on-10-5-when-loading-ikimagebrowserviews-in-nib-collection-of-common-programming-errors\/"},"modified":"2014-03-30T19:48:54","modified_gmt":"2014-03-30T19:48:54","slug":"sporadic-crash-on-10-5-when-loading-ikimagebrowserviews-in-nib-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/sporadic-crash-on-10-5-when-loading-ikimagebrowserviews-in-nib-collection-of-common-programming-errors\/","title":{"rendered":"Sporadic crash on 10.5 when loading IKImageBrowserViews in nib-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m having a weird crashing problem with my app that only happens on 10.5. It doesn&#8217;t happen all the time, but it happens on startup, seemingly when the nib is loading. (BWTransparentScrollView appears in the crash report, but the crash there happens in initWithCoder:, and I can still trigger the crash if I remove BWToolkit from my project.)<\/p>\n<p>In fact, it seems there&#8217;s a problem with the two IKImageBrowserView objects in my nib. If I delete them from the nib, the crash seems to never happen (although my UI is messed up because these two views are essential to the interface).<\/p>\n<p>Interface Builder doesn&#8217;t notify me of any problems with the IKImageBrowserViews.<\/p>\n<p>Below is a typical crash report for this problem:<\/p>\n<pre><code>    Exception Type:  EXC_CRASH (SIGABRT)\nException Codes: 0x0000000000000000, 0x0000000000000000\nCrashed Thread:  0\n\nApplication Specific Information:\nobjc[22521]: garbage collection is ON\n*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFString objectForKey:]: unrecognized selector sent to instance 0x7fff704d15d0'\n\nThread 0 Crashed:\n0   libSystem.B.dylib               0x00007fff81da5f16 __kill + 10\n1   libstdc++.6.dylib               0x00007fff80b82085 dyld_stub__Unwind_DeleteException + 0\n2   libobjc.A.dylib                 0x00007fff80a4cadf _objc_terminate + 102\n3   libstdc++.6.dylib               0x00007fff80b80425 __gxx_personality_v0 + 1259\n4   libstdc++.6.dylib               0x00007fff80b8045b std::terminate() + 19\n5   libstdc++.6.dylib               0x00007fff80b8054c __cxa_rethrow + 0\n6   libobjc.A.dylib                 0x00007fff80a4c966 objc_exception_rethrow + 0\n7   com.apple.CoreFoundation        0x00007fff8218645b -[NSObject doesNotRecognizeSelector:] + 171\n8   com.apple.CoreFoundation        0x00007fff82184ae4 ___forwarding___ + 756\n9   com.apple.CoreFoundation        0x00007fff82184c38 _CF_forwarding_prep_0 + 232\n10  com.apple.CoreText              0x00007fff839f0f43 TDescriptor::CreateMatchingDescriptorInternal(__CFSet const*) const + 237\n11  com.apple.CoreText              0x00007fff839f0dd0 TDescriptor::InitBaseFont() + 30\n12  com.apple.CoreText              0x00007fff839f0d59 TDescriptor::CreateMatchingDescriptor(__CFSet const*) const + 47\n13  com.apple.AppKit                0x00007fff842df2d3 __NSFontFactoryWithName + 412\n14  com.apple.AppKit                0x00007fff842df075 +[NSFont fontWithName:size:] + 51\n15  com.apple.imageKit              0x00000001000d246b -[IKImageBrowserView _setDefaultTextAttributes] + 288\n16  com.apple.imageKit              0x00000001000d2936 -[IKImageBrowserView setAppearanceStyle:] + 42\n17  com.apple.imageKit              0x00000001000d0a88 -[IKImageBrowserView _ikCommonInit] + 2122\n18  com.apple.imageKit              0x00000001000d1470 -[IKImageBrowserView initWithCoder:] + 76\n19  com.apple.AppKit                0x00007fff8423f750 -[NSClassSwapper initWithCoder:] + 483\n20  com.apple.Foundation            0x00007fff80bc631e _decodeObjectBinary + 1214\n21  com.apple.Foundation            0x00007fff80bc7b33 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1363\n22  com.apple.Foundation            0x00007fff80bc7f91 -[NSArray(NSArray) initWithCoder:] + 385\n23  com.apple.Foundation            0x00007fff80bc631e _decodeObjectBinary + 1214\n24  com.apple.Foundation            0x00007fff80bc5de4 _decodeObject + 244\n25  com.apple.AppKit                0x00007fff841fe77a -[NSView initWithCoder:] + 367\n26  com.apple.AppKit                0x00007fff842406a0 -[NSClipView initWithCoder:] + 55\n27  com.apple.Foundation            0x00007fff80bc631e _decodeObjectBinary + 1214\n28  com.apple.Foundation            0x00007fff80bc7b33 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1363\n29  com.apple.Foundation            0x00007fff80bc7f91 -[NSArray(NSArray) initWithCoder:] + 385\n30  com.apple.Foundation            0x00007fff80bc631e _decodeObjectBinary + 1214\n31  com.apple.Foundation            0x00007fff80bc5de4 _decodeObject + 244\n32  com.apple.AppKit                0x00007fff841fe77a -[NSView initWithCoder:] + 367\n33  com.apple.AppKit                0x00007fff84240edd -[NSScrollView initWithCoder:] + 127\n34  ...onwalkin.BWToolkitFramework  0x00000001003bcb7d -[BWTransparentScrollView initWithCoder:] + 41\n35  com.apple.AppKit                0x00007fff8423f750 -[NSClassSwapper initWithCoder:] + 483\n36  com.apple.Foundation            0x00007fff80bc631e _decodeObjectBinary + 1214\n37  com.apple.Foundation            0x00007fff80bc7b33 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1363\n38  com.apple.Foundation            0x00007fff80bc7f91 -[NSArray(NSArray) initWithCoder:] + 385\n39  com.apple.Foundation            0x00007fff80bc631e _decodeObjectBinary + 1214\n40  com.apple.Foundation            0x00007fff80bc5de4 _decodeObject + 244\n41  com.apple.AppKit                0x00007fff841fe77a -[NSView initWithCoder:] + 367\n42  com.apple.AppKit                0x00007fff841ffc92 -[NSCustomView initWithCoder:] + 651\n43  com.apple.Foundation            0x00007fff80bc631e _decodeObjectBinary + 1214\n44  com.apple.Foundation            0x00007fff80bc5de4 _decodeObject + 244\n45  com.apple.AppKit                0x00007fff841f8928 -[NSNibConnector initWithCoder:] + 409\n46  com.apple.AppKit                0x00007fff841fd404 -[NSNibOutletConnector initWithCoder:] + 350\n47  com.apple.Foundation            0x00007fff80bc631e _decodeObjectBinary + 1214\n48  com.apple.Foundation            0x00007fff80bc7b33 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1363\n49  com.apple.Foundation            0x00007fff80bc7f91 -[NSArray(NSArray) initWithCoder:] + 385\n50  com.apple.Foundation            0x00007fff80bc631e _decodeObjectBinary + 1214\n51  com.apple.Foundation            0x00007fff80bc5de4 _decodeObject + 244\n52  com.apple.AppKit                0x00007fff841f784c -[NSIBObjectData initWithCoder:] + 2014\n53  com.apple.Foundation            0x00007fff80bc631e _decodeObjectBinary + 1214\n54  com.apple.Foundation            0x00007fff80bc5de4 _decodeObject + 244\n55  com.apple.AppKit                0x00007fff841f6f55 loadNib + 156\n56  com.apple.AppKit                0x00007fff841f698d +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 836\n57  com.apple.AppKit                0x00007fff841f6568 +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 355\n58  com.apple.AppKit                0x00007fff841f6299 NSApplicationMain + 286\n59  ...ittleappfactory.Tagalicious  0x00000001000015cc start + 52\n\nThread 1:\n0   libauto.dylib                   0x00007fff83fcfaae Auto::MemoryScanner::scan_range(Auto::Range const&amp;, Auto::WriteBarrier*) + 366\n1   libauto.dylib                   0x00007fff83fbe3df Auto::WriteBarrier::scan_ranges(void*, unsigned long, Auto::MemoryScanner&amp;) + 607\n2   libauto.dylib                   0x00007fff83fd10c7 bool Auto::visitAllocatedBlocks(Auto::Zone*, Auto::scan_retained_and_old_blocks_visitor&amp;) + 343\n3   libauto.dylib                   0x00007fff83fd080d Auto::MemoryScanner::scan_retained_and_old_blocks() + 29\n4   libauto.dylib                   0x00007fff83fc95d7 Auto::Collector::check_roots() + 23\n5   libauto.dylib                   0x00007fff83fd0b0d Auto::MemoryScanner::scan() + 45\n6   libauto.dylib                   0x00007fff83fc0a40 Auto::Zone::collect(bool, void*, unsigned long long*) + 496\n7   libauto.dylib                   0x00007fff83fae8fd auto_collect_internal(Auto::Zone*, unsigned int) + 381\n8   libauto.dylib                   0x00007fff83faf3b0 auto_collection_thread(void*) + 112\n9   libSystem.B.dylib               0x00007fff81d6ce8f _pthread_start + 316\n10  libSystem.B.dylib               0x00007fff81d6cd51 thread_start + 13\n\nThread 2:\n0   libSystem.B.dylib               0x00007fff81d45da2 __semwait_signal + 10\n1   libGLProgrammability.dylib      0x00007fff826d057b glvmDoWork + 155\n2   libSystem.B.dylib               0x00007fff81d6ce8f _pthread_start + 316\n3   libSystem.B.dylib               0x00007fff81d6cd51 thread_start + 13\n\nThread 0 crashed with X86 Thread State (64-bit):\n  rax: 0x0000000000000000  rbx: 0x00007fff702717d8  rcx: 0x00007fff5fbfb628  rdx: 0x0000000000000000\n  rdi: 0x00000000000057f9  rsi: 0x0000000000000006  rbp: 0x00007fff5fbfb640  rsp: 0x00007fff5fbfb628\n   r8: 0x00007fff5fbfb1b0   r9: 0x0000000000000000  r10: 0x00007fff81d7de36  r11: 0x0000000000000206\n  r12: 0x00007fff821aea28  r13: 0x0000000000000000  r14: 0x00007fff80a56d00  r15: 0x00007fff7032d0a0\n  rip: 0x00007fff81da5f16  rfl: 0x0000000000000206  cr2: 0x00007fff70093028\n<\/code><\/pre>\n<p>Any idea what could be happening?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m having a weird crashing problem with my app that only happens on 10.5. It doesn&#8217;t happen all the time, but it happens on startup, seemingly when the nib is loading. (BWTransparentScrollView appears in the crash report, but the crash there happens in initWithCoder:, and I can still trigger the crash if I remove BWToolkit [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5215","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5215","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5215"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5215\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5215"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5215"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5215"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}