Infinite loop on FloodFillComponent
Posted: Fri Jun 27, 2014 2:19 am
I have an infinite loop.
In the stack trace:
cpSpaceStep
cpSpaceProcessComponents
FloodFillComponent
CP_BODY_FOREACH_ARBITER(body, arb) FloodFillComponent(root, (body == arb->body_a ? arb->body_b : arb->body_a));
There is one cpArbiter whose thread_a.prev and thread_a.next are himself. Hence, CP_BODY_FOREACH_ARBITER never returns.
In my case I can reproduce this every time. I set
cpSpaceSetSleepTimeThreshold( pSpace, 10.0 );
when the sleep threshold occurs, Chipmunk goes into infinite loop. My space consists of:
- 1 static body, a planet.
- 1 rogue body, a paddle, never in contact with the planet.
- 1 dynamic body, the user ball. The user uses the paddle to bounce the ball towards the planet.
- 10 dynamic bodies, balls resting on the planet, the targets of the user ball.
Any hints on why this might be happening?
In the stack trace:
cpSpaceStep
cpSpaceProcessComponents
FloodFillComponent
CP_BODY_FOREACH_ARBITER(body, arb) FloodFillComponent(root, (body == arb->body_a ? arb->body_b : arb->body_a));
There is one cpArbiter whose thread_a.prev and thread_a.next are himself. Hence, CP_BODY_FOREACH_ARBITER never returns.
In my case I can reproduce this every time. I set
cpSpaceSetSleepTimeThreshold( pSpace, 10.0 );
when the sleep threshold occurs, Chipmunk goes into infinite loop. My space consists of:
- 1 static body, a planet.
- 1 rogue body, a paddle, never in contact with the planet.
- 1 dynamic body, the user ball. The user uses the paddle to bounce the ball towards the planet.
- 10 dynamic bodies, balls resting on the planet, the targets of the user ball.
Any hints on why this might be happening?