Bug report:load bytecode failure when take enum type variable as class member
in test.as: enum CREATOR_STATE { }; class C { CREATOR_STATE dd; } ////////////////////////////// comile it,save bytecode and load: Binder_I.CompileScript("GameModule","..\\AScript\\test.as"); CBytecodeStream stream("anglescript"); asIScriptModule *mod = engine->GetModule(module.c_str()); mod->SaveByteCode(&stream); mod = engine->GetModule(module.c_str(),asGM_ALWAYS_CREATE); mod->LoadByteCode(&stream); //////////////////////// and it fails in as_restore.cpp line 1004: if( typeName.GetLength() && typeName != "_builtin_object_" ) { // Find the object type ot = module->GetObjectType(typeName.AddressOf()); if( !ot ) ot = engine->GetObjectType(typeName.AddressOf()); asASSERT(ot);//fail here!!!!! } here ot==0,and typeName.dynamic="CREATOR_STATE"
Thanks. I'll look into this.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
I've checked in the fix for this bug in the SVN (revision 476). It was just a matter of changing asCRestore to store the enum types before the classes.
Diff for as_restore.cpp
Thanks,
Andreas
Diff for as_restore.cpp
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement