Advertisement

asCWriter::WriteObjectTypeDeclaration Access violation

Started by June 03, 2014 04:52 PM
3 comments, last by cvet 10 years, 5 months ago

AngelScript revision 1932.

Access violation.

Attempted to read to an 0x00000000.

Stack trace:

asCWriter::WriteObjectTypeDeclaration + 334, as_restore.cpp (3585)
asCWriter::Write + 309, as_restore.cpp (3185)
asCModule::SaveByteCode + 125, as_module.cpp (1224)

Library code:

int size = (asUINT)ot->interfaces.GetLength();
WriteEncodedInt64(size);
asUINT n;
for( n = 0; n < ot->interfaces.GetLength(); n++ )
{
WriteObjectType(ot->interfaces[n]);
WriteEncodedInt64(ot->interfaceVFTOffsets[n]); <- here, interfaceVFTOffsets length is 0.
}

Script code is too complex, but if you need, then i trying to localize problem.

Can you at least tell me what object type that is being written when this access violation occurs? Examining the content of the ot variable should allow you to determine what object it is.

It would be easy to add a check for an empty interfaceVFTOffsets array, but I need a little bit more information to make sure this is actually the problem and not just a consequence of another bug in the library.

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

shared interface.

I'll need help in figuring out how to reproduce this.

It shouldn't be possible for the two arrays ot->interfaces and ot->interfaceVFTOffsets to have different sizes when saving the bytecode. It's not correct to simply check for the an empty interfaceVFTOffsets array, instead I need to figure out why it is empty in the first place.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

I rework my code and now not see this crash.

I try revert code and trying reproduce later, on next week.

This topic is closed to new replies.

Advertisement