Unable to release - Physics Collision Crash unable to trace

I’ve got a weapon that shoots a ball and hits a little box. The box is a sensor and I have 3 filters set up:
EverythingCollisionFilter = { categoryBits = 1, maskBits = 65535 }
LampCollisionFilter = { categoryBits = 2, maskBits = 3 }
PowerUpCollisionFilter = { categoryBits = 4, maskBits = 1 }

The idea is that the lamp and powerup will not collide but everything else will collide with each other.

The bug occurs at random. If I play for a few mins shooting it will eventually hit a powerup and the simulator locks up. It used to give me some sort of error about “locked and somethingAABB” in the older version of Corona (purchased and downloaded the new version today). I now only get the crash report from apple which I’ve included below.

I really am looking to figure out what is going on here as I have no idea how to track this one down. Can anyone make sense of this?

Thanks for any and all help!
Process: Corona Simulator [15347]
Path: /Applications/CoronaSDK/Corona Simulator.app/Contents/MacOS/Corona Simulator
Identifier: com.anscamobile.Corona_Simulator
Version: ??? (2011.591)
Code Type: X86 (Native)
Parent Process: Corona Project Manager [15308]

Date/Time: 2011-08-02 14:27:47.978 -0400
OS Version: Mac OS X 10.7 (11A511)
Report Version: 9

Interval Since Last Report: 535742 sec
Crashes Since Last Report: 65
Per-App Interval Since Last Report: 1659 sec
Per-App Crashes Since Last Report: 2
Anonymous UUID: 0D2FE95C-DFA2-47B9-9450-0BDE07B72C2E

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000006 [import]uid: 27681 topic_id: 13193 reply_id: 313193[/import]

Crash problems in Physics is generally caused by removing Physics objects in the collision events. If you need to remove objects, set a timer to call a function to remove it later. When you remove or alter an open in the collision event, Box2D is still attempting to resolve the collision so you need to be careful how objects are removed. [import]uid: 7559 topic_id: 13193 reply_id: 48443[/import]

Tom,

At first I felt stupid for asking that question as I already knew that was a problem. So I looked back into it and saw that I was already doing what you had recommended. And just to be safe I got rid of removing the physics object all together. I set the isBodyActive to false, and make it invisible but never remove it.

I remembered I still had Corona.268 in my trash can so I loaded that back up as it gave me more feedback on what was going on:

Assertion failed: (0 <= proxyId && proxyId < m_nodeCapacity), function GetFatAABB, file /Users/ansca/.hudson/jobs/Main-DMG/workspace/platform/mac/build/Release/Box2D.framework/Headers/Collision/b2DynamicTree.h, line 141.

This error does not show up in the latest version and I instead just get a Apple Application Crash dialog.

Does this message help shed some light on what’s going on for anyone?

Thanks again!

David [import]uid: 27681 topic_id: 13193 reply_id: 48930[/import]