Skip to main content
gamedev.net
🔒 Locked

Loading bytecode bug

Started by cvet 1 reply 1.3k views
Original Post
cvet
cvet

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", sizeof( ScriptTypeOf ), asOBJ_REF | asOBJ_TEMPLATE );

...

engine->SetDefaultNamespace( "" );

Script:

reflection::type = reflection::typeof();

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)

WitchLord
WitchLord

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 - <a href="http://www.angelcode.com/tower" rel
WitchLord
WitchLord

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 - <a href="http://www.angelcode.com/tower" rel

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.