Advertisement

Assertion failure in Engine Destructor

Started by November 20, 2010 10:00 AM
4 comments, last by Friggle 14 years ago
I introduced the use of config groups in my software which basically works just as I thought it should.
However, I get an assertion failure raised now during the call of the engine's destructor when my software exits.
The assertion failure occurs while executing


asCScriptEngine::~asCScriptEngine()
-->
defaultGroup.RemoveConfiguration(this);
-->
engine->objectTypes.RemoveIndex(idx);
-->
void asCConfigGroup::ValidateNoUsage(asCScriptEngine *engine, asCObjectType *type)
-->
asASSERT(func->parameterTypes

.GetObjectType() != type);

What I do:

I register several items in default config group (i.e. without beginning any group explicitly). Then I begin a config group, register several items, end the config group and set its default state to 'false'.

When I then exit my software then first all contexts get released then the engine gets released (call to --> Release()).

The engine->Release() call finally triggers the process where the assertion failure happens.

Any idea? What other information would you need to provide assistance?
The code works if I don't use the config group, i.e. register all elements in the default config group.

I'm using AngelScript 2.20.0

Many thanks!

Does this happen even without compiling any scripts? I.e. register everything then and then releasing the engine?

What type and what function is it that cause the assert failure? You should be able to see this in the debugger.

Does the problem also occur in the latest version from SVN?

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
Yes, this also happens without any script compilation.
I also removed the call to set the default value of the group to 'false' with no effect, assertion failure still raised.

I reduced the code so that it just creates one context, it never uses it up to the point where the Release() of the engine is executed, still the assertion is raised.

I even removed creation of the context. No effect, assertion still raised when releasing the engine.

The 'type' in the debugger is 'string', the function name is 'SaveLesson'.
I have two versions of this function registered:

"void SaveLesson()"
and
"void SaveLesson(const string ∈ fileName)"

The 'parameterTypes' member of the function shows an array length of '1' in the debugger, I can see an 'objectType' entry in the associated array of 'string'.

I haven't tried with the latest code from the SVN repo yet, will do as soon as possible.

Many thanks so far,

Thomas
Thanks,

I managed to reproduce the problem with this information. No need to download the latest revision from the SVN. It happens with that version too.

I'll work on a fix for this, and let you know as soon as I have it checked in.

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 is now fixed in revision 758 of the SVN.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Just tried it, works now.

Thanks so much!

This topic is closed to new replies.

Advertisement