Closed GoogleCodeExporter closed 8 years ago
[deleted comment]
Here's the attached patch file (I accidentally used diff before)
Original comment by rocif...@gmail.com
on 29 Aug 2011 at 3:13
Attachments:
I'm not seeing this problem. I have a query in PolyShapes.h than can handle
more than 10 overlapping shapes. I have never seen this crash.
Original comment by erinca...@gmail.com
on 29 Aug 2011 at 8:06
How can I view good debug information on the broadphase tree etc? I might be
able to come up with a proper test that fails, since I can produce the bug on
demand using some trial-and-error in my game setup.
Original comment by rocif...@gmail.com
on 30 Aug 2011 at 8:37
You could try uncommenting Validate in the insert/remove leaf functions in
b2DynamicTree.cpp.
Does your code modify the world inside a callback?
Original comment by erinca...@gmail.com
on 1 Sep 2011 at 7:59
My code isn't modifying the world in callbacks, I specifically avoided this
after getting assertion failures telling me I can't do that. I uncommented
those two Validate() calls but they don't cause any assertions when my code
fails. I'm going to do some more digging and try to generate a solid test case
that fails every time.
Original comment by rocif...@gmail.com
on 1 Sep 2011 at 12:17
Here's my watch display for a failed node from within
b2DynamicTree::GetUserData(int32 proxyId) eventually called from Query in
b2DynamicTree.h
It seems like the variables have data that's intact but the userData is not a
valid pointer. Is there anything that might explain this inconsistency?
- m_nodes[proxyId] {aabb={...} userData=0x10d80d18 parent=384} b2TreeNode
- aabb {lowerBound={...} upperBound={...} } b2AABB
+ lowerBound {x=5.3394465 y=15.581806 } b2Vec2
+ upperBound {x=7.5034966 y=18.216160 } b2Vec2
userData 0x10d80d18 void *
parent 384 int
next 384 int
child1 -1 int
child2 -1 int
height -1 int
Original comment by rocif...@gmail.com
on 1 Sep 2011 at 12:26
[deleted comment]
Hmm, this may be a multi-threaded issue with my app, but I don't think so. I
added a whole bunch of asserts in to test whether the world is locked when I am
making relevant changes to it, and none of them fire. I'll have to try again
tomorrow..
Original comment by rocif...@gmail.com
on 1 Sep 2011 at 1:27
Box2D is not thread safe. You need to use a critical section when you do
anything that might modify the broad-phase.
Original comment by erinca...@gmail.com
on 2 Sep 2011 at 5:42
Ah, sorry Erin, I've finally discovered my code is actually modifying the world
during a world step by deleting a body. Gee, this took a long time to find! I
don't know why the assertion wasn't being triggered in b2World::DestroyBody()...
Original comment by rocif...@gmail.com
on 12 Sep 2011 at 1:50
Were you running a debug build of Box2D?
Original comment by erinca...@gmail.com
on 12 Sep 2011 at 5:51
Yes
Original comment by rocif...@gmail.com
on 13 Sep 2011 at 12:45
Well b2Assert just maps to the standard assert. Shrug. I'm closing this.
Original comment by erinca...@gmail.com
on 17 Sep 2011 at 6:15
Original issue reported on code.google.com by
rocif...@gmail.com
on 29 Aug 2011 at 2:57