Jump to content

  • Log In with Google      Sign In   
  • Create Account

- - - - -

Crash while closing application with the suspended context


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
3 replies to this topic

#1 virious   Members   -  Reputation: 181

Like
0Likes
Like

Posted 19 January 2012 - 09:27 AM

When I suspend the as context and try to close my application I have crash in:
void asCScriptEngine::CallFree(void *obj) const

It's trying to free something that's already freed (feeefeee).

Short callstack (I hope it will help):
asCScriptEngine::CallFree(void * obj=0x0ed5a350)  Line 3317 + 0xc bytes	C++
asCContext::CleanStackFrame()  Line 3860	C++
asCContext::CleanStack()  Line 3602	C++
asCContext::Unprepare()  Line 400	C++
asCContext::DetachEngine()  Line 210 + 0xf bytes	C++
asCContext::~asCContext()  Line 182	C++
asCContext::`scalar deleting destructor'()  + 0x2b bytes	C++
asCContext::Release()  Line 195 + 0x1a bytes	C++

My AngelScript version:
#define ANGELSCRIPT_VERSION		22201
#define ANGELSCRIPT_VERSION_STRING "2.22.1 WIP"

Thanks in advance!

Sponsor:

#2 Andreas Jonsson   Moderators   -  Reputation: 3444

Like
0Likes
Like

Posted 20 January 2012 - 02:45 PM

I'll look into this.

Does it happen with any script you suspend, or must it for example be a call to an class method, or perhaps the function needs to have a specific parameter?
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

#3 Andreas Jonsson   Moderators   -  Reputation: 3444

Like
0Likes
Like

Posted 21 January 2012 - 09:50 AM

I've not been able to reproduce this problem.

The context shouldn't attempt to free anything that has already been freed, unless there is some object that is freed before it's refcounter reaches 0, or the refcounter is forced to 0 too early by calling Release() multiple times.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

#4 Andreas Jonsson   Moderators   -  Reputation: 3444

Like
0Likes
Like

Posted 06 June 2012 - 01:05 PM

I fixed a bug in revision 1323 that may have been what was causing this crash.

When a context was suspended in a function that returned a value type by value, the context would incorrectly try to cleanup the return value, even though it was never actually created.

I'm not sure if this is the exact same situation that you reported, but as I have not been able to reproduce it in any other way I'll consider this bug fixed.

Regards,
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




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