Sign in to follow this  

Crash during Build

Recommended Posts

Crash during Build. 2.16.3 WIP WinXP, MSVS8 Reproduce code:
void Func()

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++

Share this post

Link to post
Share on other sites
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
[<-- Add this]

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


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this