Build 619: "isBodyActive" now a post-resolution event? Bug?

Hello Ansca,
In Daily Build 2011.619 (2011.8.2), I am now getting the following error message in the console:

ERROR: display object property isBodyActive cannot be set when the world is locked and in the middle of number crunching, such as during a collision event

Is this intentional, or a bug specific to this build? Can we expect this to be the case going forward into the next official build?

I hope it’s not an upcoming “requirement”, becuase it’s somewhat frustrating. In my game, it’s useful to immediately set a physics body to inactive upon a collision, because I want to remove it from the simulation but not from the game entirely (these bodies get reactivated soon after). It would be quite bothersome if I now need to write a delayed timer function to call the “isBodyActive” function every time, which is fairly often in my game.

Any advice or updates on this, please let me know.

SIncerely,
Brent Sorrentino
Ignis Design
[import]uid: 9747 topic_id: 15574 reply_id: 315574[/import]

It might be that your project has more collision events than it had before, and as a result, upped the chances for triggering the error?

You might want to read up on the following, which might help identify what-causes-the-error and find the work-around:

http://developer.anscamobile.com/forum/2011/02/15/assertion-error-because-bodyactive

http://jonbeebe.tumblr.com/post/2515495262/corona-collision-no-no

Good luck! [import]uid: 67217 topic_id: 15574 reply_id: 57517[/import]

Unfortunately, this is absolutely a “change” between the last official build (.591) and Daily Buld .619. I have both versions installed, and if I run the exact same code in the official build, I never get the described error. In the newer daily build, it happens consistently, on every collision.

Resolution of certain collision “events” has occurred in the past, requiring a delay timer on the next game cycle… but to my knowledge (and experience) it has never occurred with “isBodyActive” until Build 619.

As Jon Beebe details, the most “obvious” solution (and the one I mentioned in my initial post) is to perform the necessary action using a delayed timer, even if it’s 1 millisecond (personally I would favor 10+ milliseconds, just to be safe). But this is really a bothersome programming technique, especially when it occurs in multiple scenarios and in multiple collision events within a game… I notice with further observation, this also seems to occur on “removeSelf” in Build 619.

I truly hope Ansca can find a solid, core solution to bypass this Box2D core issue (assuming that’s the issue) to spare us Corona developers from programming a delay timer on nearly every collision event.

Brent Sorrentino
Ignis Design
[import]uid: 9747 topic_id: 15574 reply_id: 57527[/import]

“Warning: could not load the font helvetica-bold.”
how to get rid of it?
I want to use helvetica-bold.
please help. [import]uid: 176812 topic_id: 15574 reply_id: 129355[/import]

And another problem is that until the car collides with the middle point of the bunnies or hurdles the collusion occurs only then. I want it to occur even if the player object hits the bunnies. kindly help me in this regard. It will be deeply appreciated! Thanks.
[import]uid: 176812 topic_id: 15574 reply_id: 129356[/import]

“Warning: could not load the font helvetica-bold.”
how to get rid of it?
I want to use helvetica-bold.
please help. [import]uid: 176812 topic_id: 15574 reply_id: 129355[/import]

And another problem is that until the car collides with the middle point of the bunnies or hurdles the collusion occurs only then. I want it to occur even if the player object hits the bunnies. kindly help me in this regard. It will be deeply appreciated! Thanks.
[import]uid: 176812 topic_id: 15574 reply_id: 129356[/import]

Hello @s.arsalan.k,

Is “Helvetica Bold” included as a font in your project directory? If so, this might not be the exact “name” that Corona requires. You also need to define this as an allowable font in your “build.settings” file. Read this document for more details:

http://www.coronalabs.com/blog/2011/07/13/custom-fonts-corona/

Brent
[import]uid: 9747 topic_id: 15574 reply_id: 129619[/import]

Hello @s.arsalan.k,

Is “Helvetica Bold” included as a font in your project directory? If so, this might not be the exact “name” that Corona requires. You also need to define this as an allowable font in your “build.settings” file. Read this document for more details:

http://www.coronalabs.com/blog/2011/07/13/custom-fonts-corona/

Brent
[import]uid: 9747 topic_id: 15574 reply_id: 129619[/import]