Advertisement

Crash while closing application with the suspended context

Started by January 19, 2012 03:27 PM
2 comments, last by WitchLord 12 years, 6 months ago
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!
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

Advertisement
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

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

This topic is closed to new replies.

Advertisement