Hi Epic. This isn’t an actual question - more of an FYI. Thanks to Stomp2Malloc, I noticed that UCaptureManagerEditorSettings never removes its OnModularFeatureUnregistered lambda. When the editor exits, the dangling ‘this’ pointer captured by the lambda is being accessed, after UCaptureManagerEditorSettings has been destroyed.
It’s an easy fix. I added this method:
void UCaptureManagerEditorSettings::Destroy()
{
IModularFeatures::Get().OnModularFeatureUnregistered().Remove(OnModularFeatureUnregisteredHandle);
}
Combined with:
OnModularFeatureUnregisteredHandle = IModularFeatures::Get().OnModularFeatureUnregistered().AddLambda(…
and…
void FCaptureManagerEditorSettingsModule::EnginePreExit()
{
UCaptureManagerEditorSettings* Settings = GetMutableDefault<UCaptureManagerEditorSettings>();
check(Settings);
Settings->Destroy();
...
That’s it
. It would be good if you adopted this fix, so everyone will benefit, but also future merges of UE will be less painful on our side.
Thanks.