I've started porting our game Dustforce to OS X, and it's going pretty well so far, the debug build is actually up and running.
But as soon as I try to run the game with a release build of AngelScript I get a null pointer access on the first reference the code comes across which has been returned from the application (i.e. script classes being instantiated seem to work fine).
And if I comment that code out, the next reference it tries to access is null, and so on.
It seems to be when I enable optimisations, even the first level, if I disable optimisations in the release build it works, or enable them in the debug build it fails.
To isolate the problem, I added the array add-on to the "tutorial" sample, and put this code in the script:
array<uint> arr; arr.resize(5);
And I get a null pointer access on arr.resize(5);
I stepped in to the factory function and confirmed that it's not returning null...
I'm using Xcode 4.2.1 and I've tried AngelScript 2.22.1 and 2.22.2
I've tried building from the included Xcode project file, and also just adding the AngelScript cpp files to the Dustforce project.
I'll keep trying, but much of the internals of AngelScript are a bit over my head.
Any help would be greatly appreciated.
Thanks.