!space->locked. Crash in the project.

Discuss any Chipmunk bugs here.

!space->locked. Crash in the project.

Postby yomanx » Tue Aug 09, 2016 12:31 pm

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
yomanx
 
Posts: 7
Joined: Fri Dec 19, 2014 6:17 pm

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

Postby slembcke » Tue Aug 09, 2016 3:45 pm

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/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm


Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest

cron