title: SpriteKit presentScene crash app
body: <p>I am navigating between SK scenes using the following code:</p>
  
  <pre><code>        SKScene *newScene = [[MyScene alloc] initWithSize:self.size state:state];
  
          float duration = 1;
  
          SKTransition *transition = [SKTransition fadeWithDuration:duration];
  
          [self.view presentScene:newScene transition:transition];
  </code></pre>
  
  <p>Regardless the type of scene I am trying to present, the app crashes every time with EXC_BAD_ACCESS (code 1) without any zombies.. It looks like the "present scene won't work correctly on xcode6, it did work before I upgraded from xcode5</p>
  
  <hr>
  
  <p>edit: this is the initWithSize code:</p>
  
  <pre><code>-(id)initWithSize:(CGSize)size state:(GameState)state{
      if (self = [super initWithSize:size]) {
  
      [self setupScene];
  
      if (state == GameStateLaunch) {
  
          [self setupLoadingScreen];
  
          [self switchToLaunch];
  
      } else if (state == GameStateTutorial || state == GameStateReplay) {
  
          [self switchToTutorial];
  
      } else if (state== GameStateMainMenu) {
  
  
          [self switchToMainMenu];
      }
  
  }
      return self;
  }
  </code></pre>
  
  <p>I managed to make it work partially by removing all children before presenting the new scene:</p>
  
  <pre><code>- (void)cleanUpChildrenAndRemove {
      for (SKNode *child in self.children) {
          [child removeFromParent];
      }
      [self removeFromParent];
  }
  </code></pre>
  
  <p>However, this is crazy. There must be a better solution!</p>