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)