🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Loading bytecode bug

Started by
1 comment, last by WitchLord 9 years, 11 months ago

AngelScript revision 1979.

How to reproduce:

Engine:

engine->SetDefaultNamespace( "reflection" );

...

engine->RegisterObjectType( "type", sizeof( ScriptType ), asOBJ_VALUE | asOBJ_POD | asOBJ_APP_CLASS );

...

engine->RegisterObjectType( "typeof<class T>", sizeof( ScriptTypeOf ), asOBJ_REF | asOBJ_TEMPLATE );

...

engine->SetDefaultNamespace( "" );

Script:

reflection::type = reflection::typeof<A>();

Loading from source is good, loading from bytecode gives

Template type 'typeof' doesn't exist : 0, 0.

and crash on memcpy.

Stack trace:

LeadDownVec + 127, memcpy.asm (501)
CBytecodeStream::Read + 35, script.h (218)
asCReader::ReadString + 95, as_restore.cpp (1490)
asCReader::ReadFunction + 928, as_restore.cpp (867)
asCReader::ReadObjectTypeDeclaration + 3317, as_restore.cpp (1320)
asCReader::ReadInner + 1423, as_restore.cpp (287)
asCReader::Read + 24, as_restore.cpp (73)
asCModule::LoadByteCode + 97, as_module.cpp (1242)

Advertisement

Thanks. I'll investigate 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

Fixed in revision 1981.

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