Jump to content

  • Log In with Google      Sign In   
  • Create Account

- - - - -

Crash on bytecode loading


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 TheAtom   Members   -  Reputation: 330

Like
0Likes
Like

Posted 09 April 2012 - 04:32 PM

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.

Sponsor:

#2 Andreas Jonsson   Moderators   -  Reputation: 3352

Like
0Likes
Like

Posted 10 April 2012 - 07:25 AM

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

#3 Andreas Jonsson   Moderators   -  Reputation: 3352

Like
0Likes
Like

Posted 10 April 2012 - 08:16 PM

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




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS