title: Bad access crash while decoding a storyboard
body: <p>I have received 2 crash report from where the back traces seems to suggest there is a problem decoding images references in a storyboard.  It was reported on this device</p>
  
  <p><img src="https://i.stack.imgur.com/YaR31.png" alt="enter image description here"></p>
  
  <p>I cant reproduce it on my iPhone 5 running 7.1  nor in the simulator running 7.0.  I am using the 7.1 SDK, storyboards and asset catalogs.</p>
  
  <p>The first log looks like this:</p>
  
  <pre><code>EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x9000000c
  
  Thread : Crashed: com.apple.main-thread
  0  libobjc.A.dylib  0x39c9ab66 objc_msgSend + 5
  1  CoreGraphics     0x2f9bbc09 CGImageRetain + 16
  2  UIKit            0x320d742b -[UIImage initWithCGImage:scale:orientation:] + 114
  3  UIKit            0x320d739f +[UIImage imageWithCGImage:scale:orientation:] + 62
  4  UIKit            0x320e2c4b -[_UIAssetManager imageNamed:scale:idiom:subtype:cachingOptions:] + 334
  5  UIKit            0x320e2af7 -[_UIAssetManager imageNamed:scale:idiom:subtype:] + 38
  6  UIKit            0x320e2acd -[_UIAssetManager imageNamed:idiom:subtype:] + 44
  ...
  </code></pre>
  
  <p>The second is slightly different:</p>
  
  <pre><code>Thread : Crashed: com.apple.main-thread
  0  libobjc.A.dylib  0x39c9ab66 objc_msgSend + 5
  1  CoreUI           0x33a7bd0d -[CUIStructuredThemeStore renditionWithKey:] + 1052
  2  CoreUI           0x33a850af -[CUINamedImage _renditionForSpecificKey:] + 170
  3  CoreUI           0x33a850fd -[CUINamedImage image] + 20
  4  UIKit            0x320e2c01 -[_UIAssetManager imageNamed:scale:idiom:subtype:cachingOptions:] + 260
  5  UIKit            0x320e2af7 -[_UIAssetManager imageNamed:scale:idiom:subtype:] + 38
  6  UIKit            0x320e2acd -[_UIAssetManager imageNamed:idiom:subtype:] + 44
  </code></pre>
  
  <p>The rest of the trace from lines 6 onwards is common to both crash logs.</p>
  
  <pre><code>7  UIKit            0x320e2a9b -[_UIAssetManager imageNamed:idiom:] + 46
  8  UIKit            0x32427ab1 -[UIImageNibPlaceholder initWithCoder:] + 288
  9  UIKit            0x324bd1d9 UINibDecoderDecodeObjectForValue + 740
  10 UIKit            0x324bceef -[UINibDecoder decodeObjectForKey:] + 90
  11 UIKit            0x3241b4bd -[UIButtonContent initWithCoder:] + 296
  12 UIKit            0x324bd1d9 UINibDecoderDecodeObjectForValue + 740
  13 UIKit            0x324bd557 UINibDecoderDecodeObjectForValue + 1634
  14 UIKit            0x324bceef -[UINibDecoder decodeObjectForKey:] + 90
  15 UIKit            0x3241d613 -[UIButton initWithCoder:] + 594
  16 UIKit            0x324bd1d9 UINibDecoderDecodeObjectForValue + 740
  17 UIKit            0x324bceef -[UINibDecoder decodeObjectForKey:] + 90
  18 UIKit            0x32426bf9 -[UIRuntimeConnection initWithCoder:] + 112
  19 UIKit            0x3242723f -[UIRuntimeEventConnection initWithCoder:] + 42
  20 UIKit            0x324bd1d9 UINibDecoderDecodeObjectForValue + 740
  21 UIKit            0x324bd179 UINibDecoderDecodeObjectForValue + 644
  22 UIKit            0x324bceef -[UINibDecoder decodeObjectForKey:] + 90
  23 UIKit            0x324263f5 -[UINib instantiateWithOwner:options:] + 888
  24 UIKit            0x323880fb -[UIViewController _loadViewFromNibNamed:bundle:] + 234
  25 UIKit            0x321e9b59 -[UIViewController loadView] + 92
  26 UIKit            0x320cb79d -[UIViewController loadViewIfRequired] + 72
  27 UIKit            0x320cb719 -[UIViewController view] + 24
  28 UIKit            0x321412a3 -[UIViewController viewControllerForRotation] + 58
  29 UIKit            0x32141209 -[UIViewController _visibleView] + 76
  30 UIKit            0x321b0fb5 -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:animation:] + 4604
  31 UIKit            0x321af631 -[UIViewController presentViewController:withTransition:completion:] + 4676
  32 FaceInvaders     0x0000e885 -[RSHomeViewController tableView:didSelectRowAtIndexPath:] (RSHomeViewController.m:93)
  33 UIKit            0x321e40cb -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1078
  34 UIKit            0x32297863 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 214
  35 UIKit            0x32147781 _applyBlockToCFArrayCopiedToStack + 316
  36 UIKit            0x320bf7bb _afterCACommitHandler + 430
  37 CoreFoundation   0x2f90df69 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 20
  38 CoreFoundation   0x2f90b8f7 __CFRunLoopDoObservers + 286
  39 CoreFoundation   0x2f90bc43 __CFRunLoopRun + 738
  40 CoreFoundation   0x2f876471 CFRunLoopRunSpecific + 524
  41 CoreFoundation   0x2f876253 CFRunLoopRunInMode + 106
  42 GraphicsServices 0x345b02eb GSEventRunModal + 138
  43 UIKit            0x3212b845 UIApplicationMain + 1136
  44 FaceInvaders     0x00017fa1 main (main.m:16)
  </code></pre>
  
  <p>Any ideas what might be causing this or just how I could debug it?</p>