Sign in to follow this  
iram

invalid pointer to class registered

Recommended Posts

i encountered errors with registered classes in angelscript 2.5c. C3D p3D; r = engine->RegisterGlobalProperty ("sr3D STARX", &p3D); assert(r >= 0); STARX.printf ("abc"); i get a null pointer exception during execution. is it because i registered too many classes?

Share this post


Link to post
Share on other sites

i am using another 3D library to provide all the rendering functions, but this library exposes these functions to AngelScript too, via a method call.

what happened is i need to expose my own version of the functions, so i just register the relevant classes i needed to AngelScript.

so if i run my sample without the 3D library exposed to AngelScript, i can get the sr3D pointer and everything is working fine.

just by exposing the 3D library, my sr3D pointer will be invalid. i have debug and found that it points to another address.

how can i check whatever is registered ? i want to trace them and see when the values are altered.


Share this post


Link to post
Share on other sites
Sounds strange to me that the object address would be different just because you expose the 3D library or not. Are you checking all the return codes from AngelScript?

What 3D library are you using? Perhaps there is some known problem with it.

In my design I assumed that the application would know what was registered with the library, therefore there is no existing way of enumerating what is already registered. I'll have to rethink this in a future version and expose methods to do that.

In the meantime you could probably debug the library itself and check what is registered by setting breakpoints in the Register methods.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this