Advertisement

Crash on bytecode loading

Started by April 09, 2012 10:32 PM
1 comment, last by WitchLord 12 years, 7 months ago
Tested on rev 1176. Getting a null pointer access when loading bytecode with two modules, both containing the following:

shared class T
{
void f() { }
};

shared class T2 : T
{
};

class T3 : T
{
void f() { T::f(); }
};


Stack:

asCScriptFunction::AddReferences() Line 661 + 0x23 bytes C++
asCReader::Read() Line 366 C++
asCModule::LoadByteCode(asIBinaryStream * in) Line 1470 + 0xb bytes C++


Where:

case asBC_CALLINTF:
{
int func = asBC_INTARG(&byteCode[n]);
engine->scriptFunctions[func]->AddRef(); // func is 0 here and scriptFunctions[func] is NULL
}


Note: the crash goes away if T2 is removed or made nonshared.
Thanks for the report. 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

Advertisement
I've fixed this bug in revision 1266.

Thanks for providing the script to reproduce the error.

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