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?
Infinite loop on FloodFillComponent
-
- Posts: 5
- Joined: Thu Jun 19, 2014 1:26 am
- Contact:
-
- Posts: 5
- Joined: Thu Jun 19, 2014 1:26 am
- Contact:
Re: Infinite loop on FloodFillComponent
I was wrong, it doesn't go into an infinite loop after the sleep threshold time. It happens when the dynamic user ball:
- bounces off the rogue body twice in a row, or
- after bouncing off the rogue body, touches the static body
Any hints on what might be the problem?
- bounces off the rogue body twice in a row, or
- after bouncing off the rogue body, touches the static body
Any hints on what might be the problem?
Who is online
Users browsing this forum: No registered users and 2 guests