title: What is this error message? (Objective-C)
body: <p>I'm working on a sprite-kit game, and I keep getting this error message when trying to transition from the Menu scene to the Game scene, I keep getting the following: </p>
  
  <pre><code>2014-03-27 13:02:54.737 SpriteEzee[1723:60b] 
  *** Terminating app due to uncaught exception
  'Attemped to add nil node', reason: 'Attemped to add nil node to parent: 
  &lt;SKNode&gt; name:'(null)' position:{0, 0} accumulatedFrame:{{inf, inf}, {inf, inf}}'
  
      *** First throw call stack:
  (
      0   CoreFoundation                      0x019141e4 __exceptionPreprocess + 180
      1   libobjc.A.dylib                     0x016938e5 objc_exception_throw + 44
      2   CoreFoundation                      0x01913fbb +[NSException raise:format:] + 139
      3   SpriteKit                           0x0117afca -[SKNode addChild:] + 175
      4   SpriteEzee                          0x00002b98 -[MyScene initWithSize:] + 1768
      5   SpriteEzee                          0x00005ddf -[MenuScene touchesEnded:withEvent:] + 191
      6   SpriteKit                           0x0116cace -[SKView touchesEnded:withEvent:] + 680
      7   UIKit                               0x00272ddd -[UIWindow _sendTouchesForEvent:] + 852
      8   UIKit                               0x002739d1 -[UIWindow sendEvent:] + 1117
      9   UIKit                               0x002455f2 -[UIApplication sendEvent:] + 242
      10  UIKit                               0x0022f353 _UIApplicationHandleEventQueue + 11455
      11  CoreFoundation                      0x0189d77f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
      12  CoreFoundation                      0x0189d10b __CFRunLoopDoSources0 + 235
      13  CoreFoundation                      0x018ba1ae __CFRunLoopRun + 910
      14  CoreFoundation                      0x018b99d3 CFRunLoopRunSpecific + 467
      15  CoreFoundation                      0x018b97eb CFRunLoopRunInMode + 123
      16  GraphicsServices                    0x039085ee GSEventRunModal + 192
      17  GraphicsServices                    0x0390842b GSEventRun + 104
      18  UIKit                               0x00231f9b UIApplicationMain + 1225
      19  SpriteEzee                          0x0000653d main + 141
      20  libdyld.dylib                       0x01f5b701 start + 1
  )
  libc++abi.dylib: terminating with uncaught exception of type NSException
  (lldb) 
  </code></pre>
  
  <p>This is my transition:</p>
  
  <pre><code>-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
  MyScene *game = [[MyScene alloc] initWithSize:self.size];
  [self.view presentScene:game transition:[SKTransition doorsOpenHorizontalWithDuration:0.5]];
  </code></pre>
  
  <p>}</p>
  
  <p>Which I think is correctly written. So I'm not sure why it's giving me that error. </p>
  
  <p>This is the games initWithSize method:</p>
  
  <pre><code>-(id)initWithSize:(CGSize)size{
      if (self = [super initWithSize:size]) {
          self.backgroundColor = [SKColor blackColor];
  
          self.physicsWorld.gravity = CGVectorMake(0, 0);
          self.physicsWorld.contactDelegate = self;
  
          _enemies = [NSMutableArray new];
  
          _player = [SKNode node];
          SKShapeNode *circle = [SKShapeNode node];
          circle.path = [UIBezierPath bezierPathWithOvalInRect:CGRectMake(0, 0, 20, 20)].CGPath;
          circle.fillColor = [UIColor blueColor];
          circle.strokeColor = [UIColor blueColor];
          circle.glowWidth = 5;
  
          SKEmitterNode *trail = [SKEmitterNode orb_emitterNamed:@"Trail"];
          trail.targetNode = self;
          trail.position = CGPointMake(CGRectGetMidX(circle.frame), CGRectGetMidY(circle.frame));
          [_player addChild:trail];
  
          _player.physicsBody = [SKPhysicsBody bodyWithCircleOfRadius:10];
          _player.physicsBody.mass = 100000;
          _player.physicsBody.categoryBitMask = CollisionPlayer;
          _player.physicsBody.contactTestBitMask = CollisionEnemy;
  
          _player.position = CGPointMake(size.width/2, size.height/2);
  
          SKEmitterNode *background = [SKEmitterNode orb_emitterNamed:@"Background"];
          background.particlePositionRange = CGVectorMake(self.size.width*2, self.size.height*2);
          [background advanceSimulationTime:10];
  
          [self addChild:background];
          [self addChild:_player];
      }
      return self;
  }
  </code></pre>