Teleporting objects in 64bit Release mode (OSX)

Discuss any Chipmunk bugs here.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Teleporting objects in 64bit Release mode (OSX)

Post by slembcke »

Ok, filed a bug with Clang and Apple.

The best workaround I see is to set -O0 on the per-file compiler flag settings for cpVect.c. It shouldn't measurably affect the performance, but I didn't actually check. Not sure what else to do. Somebody suggested adding some inline assembly for it, but I've never actually written x86-64 assembly before and would need to do some brushing up.

Anyway. That's the best answer I can give right now.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
shoggoth
Posts: 4
Joined: Sat Aug 13, 2011 6:56 am
Contact:

Re: Teleporting objects in 64bit Release mode (OSX)

Post by shoggoth »

Thanks for looking into this. I think the inline assembly route is a bit overkill as Apple will fix this shortly (we hope :))

I was just going to set the project's optimisation to -O1 for the OSX/64 build so this is a much nicer solution.

Thanks again.
QuantumDoja
Posts: 5
Joined: Tue Jul 24, 2012 5:14 pm
Contact:

Re: Teleporting objects in 64bit Release mode (OSX)

Post by QuantumDoja »

Hi,

I just came across the same issue, everything works fine in debug, but in release on my Mac, everything fails, I set -O0 on cpVect and now it works fine.

Thanks

Chris
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Teleporting objects in 64bit Release mode (OSX)

Post by slembcke »

I think that issue might be fixed in Git... I didn't test it very well, but I made cpvforangle() into an inline function. The compiler bug is also fixed as of Xcode 4.4.1 for sure.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests