Jump to content
  • Advertisement
Sign in to follow this  
cvet

Crash during Build

This topic is 3365 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

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

Share this post


Link to post
Share on other sites
Advertisement
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

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!