Jump to content

  • Log In with Google      Sign In   
  • Create Account


- - - - -

crash on asCContext::CleanStackFrame()


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
1 reply to this topic

#1 _Engine_   Members   -  Reputation: 167

Like
0Likes
Like

Posted 10 December 2012 - 02:51 PM

Hi!

We encountered with crash in

as_context.cpp, line: 4159

// Only destroy the object if it is truly alive
if( liveObjects[n] > 0 )
{
asSTypeBehaviour *beh = &m_currentFunction->objVariableTypes[n]->beh;
if( beh->destruct )
m_engine->CallObjectMethod((void*)(asPWORD*)&m_regs.stackFramePointer[-pos], beh->destruct); // crash here
}

looks like problem occurs when using script function like

string FormatInt(int val)
{
if (val < 10) return "0" + val;

return "" + val;
}

void SomeFunc()
{
...
Log(FormatInt(a) + ":" + FormatInt(b) + ":" + FormatInt(d));
...
}

so problem definitely in returning string in function as result. That's lead to illegal stack and crash.

And worse of all of this - crash occures on IOS and on Android and not on PC. SO we can't provide sample to you.

Edited by _Engine_, 10 December 2012 - 02:52 PM.


Sponsor:

#2 Andreas Jonsson   Moderators   -  Reputation: 3220

Like
0Likes
Like

Posted 10 December 2012 - 03:59 PM

What version of AngelScript are you using?

Does the crash always happen in the same place? Or is it an intermittent problem?

What was the reason for the script exception to begin with? Can you print the callstack of the context before releasing? (See helper function PrintException() for aid).
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