This isn't normally an issue, but I'm throwing all the data at the frame process at the moment.
If you exit whilst the processing is in progress, you get this exception:
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000025b4b06e908
UnrealEditor_AudioAnalysisTools!CalculateButterfly_Generic() [\Plugins\AudioAnalysisTools\Source\AudioAnalysisTools\Private\Analyzers\FFTAnalyzer.cpp:247]
UnrealEditor_AudioAnalysisTools!DoWork() [\Plugins\AudioAnalysisTools\Source\AudioAnalysisTools\Private\Analyzers\FFTAnalyzer.cpp:316]
UnrealEditor_AudioAnalysisTools!DoWork() [\Plugins\AudioAnalysisTools\Source\AudioAnalysisTools\Private\Analyzers\FFTAnalyzer.cpp:291]
UnrealEditor_AudioAnalysisTools!DoWork() [\Plugins\AudioAnalysisTools\Source\AudioAnalysisTools\Private\Analyzers\FFTAnalyzer.cpp:291]
UnrealEditor_AudioAnalysisTools!DoWork() [\Plugins\AudioAnalysisTools\Source\AudioAnalysisTools\Private\Analyzers\FFTAnalyzer.cpp:291]
UnrealEditor_AudioAnalysisTools!DoWork() [\Plugins\AudioAnalysisTools\Source\AudioAnalysisTools\Private\Analyzers\FFTAnalyzer.cpp:291]
UnrealEditor_AudioAnalysisTools!DoWork() [\Plugins\AudioAnalysisTools\Source\AudioAnalysisTools\Private\Analyzers\FFTAnalyzer.cpp:291]
UnrealEditor_AudioAnalysisTools!DoWork() [\Plugins\AudioAnalysisTools\Source\AudioAnalysisTools\Private\Analyzers\FFTAnalyzer.cpp:291]
UnrealEditor_AudioAnalysisTools!DoWork() [\Plugins\AudioAnalysisTools\Source\AudioAnalysisTools\Private\Analyzers\FFTAnalyzer.cpp:291]
UnrealEditor_AudioAnalysisTools!<lambda_bc65446df753adec24c1f5a4d0787a41>::operator()() [\Plugins\AudioAnalysisTools\Source\AudioAnalysisTools\Private\Analyzers\FFTAnalyzer.cpp:272]
UnrealEditor_AudioAnalysisTools!ParallelForImpl::NewParallelForInternal<TFunctionRef<void __cdecl(int)>,<lambda_06f0d5d1c5fc9bccb0e7d1fd1e70ca42>,std::nullptr_t>'::
2'::FParallelExecutor::operator()() [C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\Core\Public\Async\ParallelFor.h:566]
UnrealEditor_AudioAnalysisTools!LowLevelTasks::TTaskDelegate<void __cdecl(bool),48>::TTaskDelegateImpl<<lambda_1bf4a01354d569cb2631b3617c09e35e>,0>::CallAndMove() [C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\Core\Public\Async\Fundamental\TaskDelegate.h:171]
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
kernel32
The fix is to check whether the engine is still running, I had the same issue with a plugin I made, I tried a number of things, checking to see if GEngine was valid, whether I could get a valid world pointer, the only thing that reliably worked was a bool, that would be checked before taking action, and set when the destructor was called, for example.
I had to use this for the editor preview, otherwise it skipped my destructor:
#if WITH_EDITOR
void OnPreEndPIE(const bool bWasSimulatingInEditor) { // Do your thing here }
#endif
If you have/find a better solution, I'd love to know, my bool workaround feels very "hacky"!