How to do memory management using Chipmunk

Hello all.
I have a game created with Cocos2dx 2.x. In menu scene I create physics space and some physics objects. After pressing play I am loading Game Scene in which I create second space and all the physics game elements. Everything works good but only in the first play. After some deaths (after death player come backs to menu) I have following error on Android:

11-29 02:49:18.725: A/libc(22137): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 22160 (Thread-200310)

So my assumption is that the problem lays in memory management. I tried to play 30 times when after death I restart my app and error never occur in the first play. Only in the next one.

So I wonder how do you remove physics objects? - you can ask.
So I do it in that way:

   space.removeBody(body);
   space.removeShape(shape);
   physicsNode.setVisible(false);
   body = null;
   shape = null;
   false = null;

but this doesn’t help. Error still occurs. I was trying to use cp.spaceFree, cp.bodyFree, cp.shapeFree, cp.bodyDestroy, cp.shapeDestroy methods but every time I use it, I got “Error processing arguments” error.

I ask about this in cpp forum because here is more users, I really need the answer and I think the problem of memory management in physics engine can be similar for both cpp and javascript branches.

I will be very grateful for every help.
Kind regards.

Signal 11 means that your program accessed memory that is not allocated I think. From the error it looks like you are dereferencing a null pointer somewhere. Are you running this in the debugger? Does it not show you where the error occurs?