Error when use replaceScene method

Error when use replaceScene method
0.0 0


Hi everyone,
I try to use the following method to change scenes in my game.


But I receive a crash with the following error:

Assertion Failed!

Program: ...pcwin8\cocos2d-x-2.1.1\Debug.win32\...(more text)...\ccdirector.cpp
Line: 608

Expression: m_pRunningScene

For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts.

Press retry to debug the application - JIT must be enabled

Its very strange this error, because I think exist some error in my code, but I change the method from AppDelegate.ccp to redirect my game to another scene and all scenes works perfectly. This same code works on Mac, iOS and android. Only windows get problems.

The AppDelegate.cpp utilize the runWithScene() method, it’s different from the traditional replaceScene method that I use.

Any help will be appreciated.