Hi slembcke, thanks for your good hints.
The bb param is indeed infinite. It is a static body which I'm trying to create. This code has been working for years on iPad and now it gets stuck if I run it under RELEASE on MAC.
This is the static body "cushion" which I'm trying to create. It gets stuck only for the top part. The other bottom,left and right passes always fine (when I change the order).
Code: Select all
// bottom
shape = cpSegmentShapeNew(staticBody, ccp(0.0f,0.0f), ccp(1024.0f,0.0f), 0.0f);
shape->e = 1.0f; shape->u = 1.0f;
cpSpaceAddStaticShape(space, shape);
// top
shape = cpSegmentShapeNew(staticBody, ccp(0.0f,700.0f), ccp(1024.0f,700.0f), 0.0f);
shape->e = 1.0f; shape->u = 1.0f;
// <X><Pp><PROD><BUG> hangs here
cpSpaceAddStaticShape(space, shape);
// left
shape = cpSegmentShapeNew(staticBody, ccp(0,0), ccp(0,wins.height), 0.0f);
shape->e = 1.0f; shape->u = 1.0f;
cpSpaceAddStaticShape(space, shape);
// right
shape = cpSegmentShapeNew(staticBody, ccp(wins.width,0), ccp(wins.width,wins.height), 0.0f);
shape->e = 1.0f; shape->u = 1.0f;
cpSpaceAddStaticShape(space, shape);
To make it complete, this is how I initiate the body prior to the above:
Code: Select all
cpBody *staticBody = cpBodyNew(INFINITY, INFINITY);
space = cpSpaceNew();
cpSpaceResizeStaticHash(space, 400.0f, 40);
cpSpaceResizeActiveHash(space, 100, 600);
space->gravity = ccp(0, 0);
space->elasticIterations = space->iterations;
Thanks again for your help!
--Josef