I'm getting crashes every few minutes. It happens when I try to remove a
child from a batchnode. I'm getting these errors:
Exception: Child not found: <cocos.sprite.Sprite object at 0x0C8E3E90>
This is my traceback:
Traceback (most recent call last):
File "main.py", line 212, in <module>
director.run(Scene(ScrollerManager(Game())))
File
"C:\Python27\lib\site-packages\cocos2d-0.6.3-py2.7.egg\cocos\director.py",
line 404, in run
event_loop.run()
File "_build\bdist.win32\egg\pyglet\app\base.py", line 136, in run
File "_build\bdist.win32\egg\pyglet\app\base.py", line 165, in
_run_estimated
File "_build\bdist.win32\egg\pyglet\app\base.py", line 274, in idle
File "_build\bdist.win32\egg\pyglet\clock.py", line 300, in
call_scheduled_functions
File
"C:\Python27\lib\site-packages\cocos2d-0.6.3-py2.7.egg\cocos\cocosnode.py",
line 833, in _step
action.step(dt)
File
"C:\Python27\lib\site-packages\cocos2d-0.6.3-py2.7.egg\cocos\actions\base_actions.py"
, line 525, in step
self.update(min(1, self._elapsed / self.duration))
File
"C:\Python27\lib\site-packages\cocos2d-0.6.3-py2.7.egg\cocos\actions\base_actions.py"
, line 857, in update
self.actions[self.last].start()
File
"C:\Python27\lib\site-packages\cocos2d-0.6.3-py2.7.egg\cocos\actions\instant_actions.py"
, line 141, in start
self.func(*self.args, **self.kwargs)
File
"C:\Python27\lib\site-packages\cocos2d-0.6.3-py2.7.egg\cocos\batch.py",
line 89, in remove
super(BatchNode, self).remove(child)
File
"C:\Python27\lib\site-packages\cocos2d-0.6.3-py2.7.egg\cocos\cocosnode.py",
line 505, in remove
self._remove(obj)
File
"C:\Python27\lib\site-packages\cocos2d-0.6.3-py2.7.egg\cocos\cocosnode.py",
line 512, in _remove
raise Exception("Child not found: %s" % str(child))
Exception: Child not found: <cocos.sprite.Sprite object at 0x0C8E3E90>
I have no idea what's wrong here, my code seems fine. and the issue only
rises sometimes, usually it's okay. so maybe there's a memory leak here,
coming from the batchnode code?
Or maybe I'm using batchnodes incorrectly. is it okay to add and remove
objects from different update functions? or are they not thread safe?
Has anyone else had this problem?
--
You received this message because you are subscribed to the Google Groups
"cocos2d discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cocos-discuss.
For more options, visit https://groups.google.com/d/optout.