Hello,
Not sure if this is the proper spot to report (potential) bugs, but I've run into a problem when using child defs. This is my situation:
TRY_REGISTER(pEngine->RegisterObjectType("MyTemp<class T>", 0, asOBJ_REF | asOBJ_TEMPLATE | asOBJ_GC));
TRY_REGISTER(pEngine->RegisterFuncdef("void MyTemp<T>::Func(const T&in if_handle_then_const param)"));
I then register a specialization, like so:
TRY_REGISTER(pEngine->RegisterObjectType("MyTemp<void>", 0, asOBJ_REF | asOBJ_GC));
TRY_REGISTER(pEngine->RegisterFuncdef("void MyTemp<void>::Func()"));
Now when shutting down the engine, this crashes my application, because asCScriptEngine::RemoveFuncdef is called for my second funcDef and this will remove it from the funcDef list of the engine, but it is kept inside the defaultGroup.types list. So when the engine does defaultGroup.RemoveConfiguration it crashes when it tries to access the deleted funcdef.
To fix this locally, I just removed the funcdef from any group type lists as well in asCScriptEngine::RemoveFuncdef, but this rather looks like a ref count gone wrong somewhere.
Am I missing something? I don't need to use the type to repro this crash, so it doesn't look like I'm messing up my ref counts on the application side. Just registering the funcdef and not using it anywhere as part of any function declarations is enough to trigger this crash.
Regards,
Bert