Projects > cpp > Issues > Bug #306

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

invoking CCDirector::sharedDirector()->end() in schedule leads to crashes

Bug #306 [Closed]
walzer@cocos2d-x.org 2011-01-06 21:54 . Updated over 4 years ago

I believe that end() release all resources while schedule will proceed to use these resources’ pointer.
In objc, call [nil method] is safe, but in c++ it will cause crash.

Maybe set a flag in end(), then release resource in the next message loop is a better design.

walzer@cocos2d-x.org 2011-01-06 21:56
  • Subject changed from call CCDirector::sharedDirector()->end() in schedule crashes to invoking CCDirector::sharedDirector()->end() in schedule leads to crashes
walzer@cocos2d-x.org 2011-01-16 22:06
  • Target version set to cocos2d-0.99.5-x-0.7.2
walzer@cocos2d-x.org 2011-01-16 22:07
  • Assignee set to walzer@cocos2d-x.org
walzer@cocos2d-x.org 2011-01-17 07:55
  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Applied in changeset commit:“29a6a593fc8e66f31daec5bbf5a273f82b2a3ef0”.

walzer@cocos2d-x.org 2011-01-17 10:09

Applied in changeset commit:“29a6a593fc8e66f31daec5bbf5a273f82b2a3ef0”.

walzer@cocos2d-x.org 2011-01-17 11:16

Applied in changeset commit:“29a6a593fc8e66f31daec5bbf5a273f82b2a3ef0”.

walzer@cocos2d-x.org 2011-01-19 19:56
  • Status changed from Resolved to Closed
walzer@cocos2d-x.org 2012-05-25 08:18
  • Project changed from cocos2d-x to cpp
  • Target version deleted (cocos2d-0.99.5-x-0.7.2)

Atom PDF

Status:Closed
Start date:2011-01-06
Priority:Normal
Due date:
Assignee:walzer@cocos2d-x.org
% Done:

100%

Category:-
Target version:-

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.