Crash during Build

Started by
2 comments, last by cvet 14 years, 8 months ago
Crash during Build. 2.16.3 WIP WinXP, MSVS8 Reproduce code:

void Func()
{
	(aaa.AnyName())==0?1:0;
}

Call stack asCArray<asCObjectType *>::GetLength() C++ asCObjectType::Implements() + 0x1e bytes C++ asCCompiler::ImplicitConvObjectToObject() + 0x9e bytes C++ asCCompiler::ImplicitConversion() + 0xb8 bytes C++ asCCompiler::MatchArgument() + 0x129 bytes C++ asCCompiler::CompileOverloadedDualOperator() + 0x17f bytes C++ asCCompiler::CompileOperator() + 0x8b bytes C++ asCCompiler::CompilePostFixExpression() + 0x138 bytes C++ asCCompiler::CompileExpression() + 0x15a bytes C++ asCCompiler::CompileCondition() + 0x99 bytes C++ asCCompiler::CompileAssignment() + 0x165 bytes C++ asCCompiler::CompileExpressionStatement() + 0x76 bytes C++ asCCompiler::CompileStatement() + 0x86 bytes C++ asCCompiler::CompileStatementBlock() + 0xd9 bytes C++ asCCompiler::CompileFunction() + 0x698 bytes C++ asCBuilder::CompileFunctions() + 0x17d bytes C++ asCBuilder::Build() + 0x2e bytes C++ asCModule::Build() + 0x129 bytes C++
Advertisement
I'll look into this. Thanks.

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 think I found the problem for this. The crash isn't reproduced with the latest SVN, but the probable cause for it was still there.

To fix it, just make a minor change to the asCCompiler::CompileExpressionTerm() method.

int asCCompiler::CompileExpressionTerm(asCScriptNode *node, asSExprContext *ctx){	// Shouldn't send any byte code	asASSERT(ctx->bc.GetLastInstr() == -1);[Add this -->]	// Set the type as a dummy by default, in case of any compiler errors	ctx->type.SetDummy();[<-- Add this]        ...}


Let me know if the problem persists after this fix, and I'll have a closer look.

Thanks,
Andreas

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

All ok, thanks.

This topic is closed to new replies.

Advertisement