Advertisement

CScriptAny crashes when storing value types?

Started by June 13, 2011 10:08 AM
1 comment, last by WitchLord 13 years, 8 months ago
I'm probably doing something horribly wrong, but I'm getting a crash when attempting to store a vector3 (from the scriptmath3d add on) in a CScriptAny object in script. Basically:

any storage;
storage.store(vector3(1,1,1));


The issue seems to be with the reference pointer coming out of the script being invalid (in one case it was 0x01)

Although this may be less a CScriptAny problem and more an issue with returning value types via a method with variable parameters. This is with version 2.20.3, VS2010, x86 compile.
This may very well be a bug in AngelScript. I'll investigate it.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Advertisement
This has now been fixed in revision 898.

Thanks,
Andreas

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Seems that this problem still exists. I've just built the latest version and CScriptAny::store(void *ref, int refTypeId) crashes when trying to store a value type. I run it through the debugger and when the argument is a value type, this method is called with a NULL parameter on ref. I can post this particular type's registration and my script code if it would help you track down the issue.

This topic is closed to new replies.

Advertisement