title: What is SKSpinLockSync in Sprite Kit and how do I fix it
body: <p>I am receiving a bug report with the following stack trace and I have no idea what the problem is.  I've seen suggestions that this could be caused by having an emitter's image in a texture atlas or by removing an emitter in the same run loop as it is added but I don't think either of these is happening.  It's a sporadic issue and I can't recreate it.  I only see it in bug reports.  I would love any help.</p>
  
  <pre><code>0    libsystem_platform.dylib    OSSpinLockLock + 1
  1    SpriteKit   SKSpinLockSync(int*, void ()() block_pointer) + 92
  2    SpriteKit   -[SKTexture loadImageData] + 300
  3    SpriteKit   -[SKTexture size] + 42
  4    SpriteKit   SKCEmitterSprite::update(double) + 3136
  5    SpriteKit   SKCSprite::update(double) + 354
  6    SpriteKit   SKCSprite::update(double) + 354
  7    SpriteKit   -[SKScene _update:] + 174
  8    SpriteKit   -[SKView(Private) _update:] + 324
  9    SpriteKit   -[SKView renderCallback:] + 820
  10   SpriteKit   __29-[SKView setUpRenderCallback]_block_invoke + 130
  11   SpriteKit   -[SKDisplayLink _callbackForNextFrame:] + 254
  12   QuartzCore  CA::Display::DisplayLinkItem::dispatch() + 98
  13   QuartzCore  CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 344
  14   IOMobileFramebuffer     IOMobileFramebufferVsyncNotifyFunc + 104
  15   IOKit   IODispatchCalloutFromCFMessage + 248
  16 ...   CoreFoundation  __CFMachPortPerform + 136
  17   CoreFoundation  __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 34
  18   CoreFoundation  __CFRunLoopDoSource1 + 346
  19   CoreFoundation  __CFRunLoopRun + 1406
  20   CoreFoundation  CFRunLoopRunSpecific + 524
  21   CoreFoundation  CFRunLoopRunInMode + 106
  22   GraphicsServices    GSEventRunModal + 138
  23   UIKit   UIApplicationMain + 1136
  24   myApplication  main.m line 16  main
  </code></pre>
  
  <p>EDIT: I'm now realizing that I get the SKSpinLockSync problem in a few different situations and not always with the emitters.  I think that the only reason that I see it so often with the emitter is because that is the lions share of the image loading in the app so it's just the statistically most likely.  The top four lines of the stack trace are always the same.  So, up to and including <code>[SKTexture Size]</code>. </p>