Jump to content
  • Advertisement
Sign in to follow this  

bytecode save/restore cause exception!

This topic is 3260 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I try to upgrade 2.17.0 from 2.16.0. but I found a bug about asIScriptArray bytecode save/restore. try this simple code in C++ asIScriptArray* GlobalCharArray = (asIScriptArray*) engine->CreateScriptObject(engine->GetTypeIdByDecl("uint8[]")); GlobalCharArray->Resize(256); r = engine->RegisterGlobalProperty("uint8[] GlobalCharArray", GlobalCharArray); assert( r >= 0 ); and in script side void main() { GlobalCharArray[1] = 10; print(string(GlobalCharArray[1])); } it could be bulided and run with right result. But when I save the bytecode to file and restore it, it will raise exception in as_restore.cpp It seems that, any registered functions with asIScriptArray would raise the same exception. ex: r = engine->RegisterGlobalFunction("string@ ARRAYTOHEX(uint8[] &in)", asFUNCTION(ArrayToHexStr), asCALL_CDECL); assert( r >= 0 ); asString* ArrayToHexStr(asIScriptArray *arr) { ...... } Thanks a lot. lobo

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!