Teleporting objects in 64bit Release mode (OSX)

Discuss any Chipmunk bugs here.

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

Postby slembcke » Wed May 16, 2012 3:50 pm

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/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

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

Postby shoggoth » Mon May 21, 2012 5:23 am

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.
shoggoth
 
Posts: 4
Joined: Sat Aug 13, 2011 6:56 am

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

Postby QuantumDoja » Sun Aug 19, 2012 8:49 am

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
QuantumDoja
 
Posts: 5
Joined: Tue Jul 24, 2012 5:14 pm

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

Postby slembcke » Sun Aug 19, 2012 4:06 pm

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/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Previous

Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest

cron