!space->locked. Crash in the project.

Discuss any Chipmunk bugs here.
Post Reply
yomanx
Posts: 7
Joined: Fri Dec 19, 2014 6:17 pm
Contact:

!space->locked. Crash in the project.

Post by yomanx »

hi friends!

In my game i meet different crashes because:

in debug info i can see:

Code: Select all

cpAssertHard(!space->locked, "You cannot manually reindex objects while the space is locked. Wait until the current query or step is complete.");
* cocos2d makes impossible to control the locks.

1. How correctly to wait when the SPACE will be unlocked?

2. when we have collision we continue to control the body or sprite with body
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: !space->locked. Crash in the project.

Post by slembcke »

The API Chipmunk provides to handle this sort of thing natively is called post step callbacks. Is that exposed at all?

Otherwise you'll need to build a list of actions or something that you need to handle later after the collision phase has ended. It's not hard, but it is quite tedious.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests