Jump to content
  • Advertisement
Sign in to follow this  

Crash on bytecode loading

This topic is 2751 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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(); }


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


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.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!