Page 1 of 1

ChipmunkMultiGrab problem

Posted: Mon Jul 09, 2012 3:34 am
by Demos
Hi! I have this code in init method:

1: multiGrab = [[ChipmunkMultiGrab alloc] initForSpace:space withSmoothing:cpfpow(0.8, 60.0) withGrabForce:1000];
2: multiGrab.layers = GRABABLE_LAYER;
3: multiGrab.grabRotaryFriction = 100;

Programm crashes after line 3. I have no idea what's the reason. Could you help me?

PS: I have iOS 6 beta 2 and XCode 4.5

Re: ChipmunkMultiGrab problem

Posted: Mon Jul 09, 2012 9:11 am
by slembcke
Can you give any more information about the crash? What kind of crash was it? What does the debugger/log say?

layers and grabRotaryFriction are both just simple synthesized properties. There isn't really a reason why one should crash and the other wouldn't.

Re: ChipmunkMultiGrab problem

Posted: Tue Jul 10, 2012 6:22 am
by Demos
-[ChipmunkMultiGrab setGrabRotaryFriction:]: unrecognized selector sent to instance 0x1edee0d0

The same problem with setGrabFriction, setGrabRadius and getters for these methods.

Re: ChipmunkMultiGrab problem

Posted: Tue Jul 10, 2012 9:08 am
by slembcke
What version do you have? The push mode and rotary friction was added in 6.1.0.

Re: ChipmunkMultiGrab problem

Posted: Tue Jul 10, 2012 9:22 am
by Demos
I have last version: Chipmunk Pro 6.1.1 trial

Re: ChipmunkMultiGrab problem

Posted: Wed Jul 11, 2012 10:52 am
by slembcke
Hmm. Something is definitely messed up with the build (or download link on the website?). I just got another similar bug about this last night.

I have a deadline that I need to make for a contract project tonight, but will look at this first thing tomorrow morning.

Re: ChipmunkMultiGrab problem

Posted: Thu Jul 12, 2012 4:27 pm
by slembcke
Ok. Sorry about the delay. I worked out the issue with the other person having troubles. It turns out he had two copies of the library code in the project, so it was linking to an older version and causing weird issues.

I checked a fresh download of the Chipmunk Pro 6.1.1 trial from the website and was unable to reproduce the issue. The method signature shows up in the symbol dump of the library as well for both armv6 and armv7 architectures. So I'm not quite sure what your issue could be.

Is it possible that you have a duplicate as well? The linker simply picks the first one it can find when searching the library paths. Just to be sure, try removing all of the Chipmunk library code from your project (including the header and library search paths in the target build settings). It shouldn't compile at this point unless it's finding a library hiding somewhere else in your project. Then download a fresh copy of the 6.1.1 trial and re-adding it.

Other than that, I'm not sure what the issue could be.

Re: ChipmunkMultiGrab problem

Posted: Fri Jul 13, 2012 2:19 am
by Demos
slembcke wrote:Ok. Sorry about the delay. I worked out the issue with the other person having troubles. It turns out he had two copies of the library code in the project, so it was linking to an older version and causing weird issues.

I checked a fresh download of the Chipmunk Pro 6.1.1 trial from the website and was unable to reproduce the issue. The method signature shows up in the symbol dump of the library as well for both armv6 and armv7 architectures. So I'm not quite sure what your issue could be.

Is it possible that you have a duplicate as well? The linker simply picks the first one it can find when searching the library paths. Just to be sure, try removing all of the Chipmunk library code from your project (including the header and library search paths in the target build settings). It shouldn't compile at this point unless it's finding a library hiding somewhere else in your project. Then download a fresh copy of the 6.1.1 trial and re-adding it.

Other than that, I'm not sure what the issue could be.
Thank you very much. It helped me.