Jump to content
  • Advertisement
Sign in to follow this  
virious

Crash while closing application with the suspended context

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

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!

Share this post


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

Share this post


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

Share this post


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

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!