Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#ActualAndreas Jonsson

Posted 07 March 2012 - 11:54 AM

Hey,
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.

#4Andreas Jonsson

Posted 05 March 2012 - 08:15 AM

Hey,
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.

#3m4ttbush

Posted 05 March 2012 - 02:19 AM

Hey,
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.

#2m4ttbush

Posted 05 March 2012 - 02:19 AM

Hey,
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 is a bit over my head.
Any help would be greatly appreciated.

Thanks.

#1m4ttbush

Posted 05 March 2012 - 02:14 AM

Hey,
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'll keep trying, but much of the internals of AngelScript is a bit over my head.
Any help would be greatly appreciated.

Thanks.

PARTNERS