Hello everyone! Recently I got a strange issue and I don’t know how to fix and reproduce it… This happens randomly from time to time. In TArray destructor:
/** Destructor. /
~TArray()
{
#if UE_BUILD_DEBUG || UE_BUILD_DEVELOPMENT
#if defined(_MSC_VER) && !defined(clang) // Relies on MSVC-specific lazy template instantiation to support arrays of incomplete types
// ensure that DebugGet gets instantiated.
// this is done to ensure DebugGet is available for the debugger watch window
//@todo it would be nice if we had a cleaner solution for DebugGet
volatile const ElementType Dummy = &DebugGet(0);
#endif
#endif
DestructItems(GetData(), ArrayNum); // Exception thrown: read access violation.
this was 0xFFFFFFFFFFFFFFF7.
// note ArrayNum, ArrayMax and data pointer are not invalidated
// they are left unchanged and use-after-destruct will see them the same as before destruct
}
call stack:
UnrealEditor-Engine.dll!TArray<TDelegateBase,TSizedHeapAllocator<32,FMemory>>:: ~TArray<TDelegateBase,TSizedHeapAllocator<32,FMemory>>() Line 692
UnrealEditor-Engine.dll!FBodyInstance::~FBodyInstance() Line 357
UnrealEditor-Engine.dll!UPrimitiveComponent::~UPrimitiveComponent() Line 283
UnrealEditor-Engine.dll!UStaticMeshComponent::`vector deleting destructor’(unsigned int)
UnrealEditor-CoreUObject.dll!FAsyncPurge::TickDestroyGameThreadObjects(bool bUseTimeLimit, double TimeLimit, double StartTime) Line 566
[Inline Frame] UnrealEditor-CoreUObject.dll!FAsyncPurge::TickPurge(bool StartTime, double) Line 688
UnrealEditor-CoreUObject.dll!IncrementalDestroyGarbage(bool bUseTimeLimit, double TimeLimit) Line 4261
UnrealEditor-CoreUObject.dll!IncrementalPurgeGarbage(bool bUseTimeLimit, double TimeLimit) Line 3957
UnrealEditor-Engine.dll!UEngine::ConditionalCollectGarbage() Line 1848
UnrealEditor-Engine.dll!UWorld::Tick(ELevelTick TickType, float DeltaSeconds) Line 1716
UnrealEditor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 1714
UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 531
UnrealEditor.exe!FEngineLoop::Tick() Line 5825
[Inline Frame] UnrealEditor.exe!EngineTick() Line 61
UnrealEditor.exe!GuardedMain(const wchar_t * CmdLine) Line 188
UnrealEditor.exe!LaunchWindowsStartup(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * formal, int nCmdShow, const wchar_t * CmdLine) Line 247
UnrealEditor.exe!WinMain(HINSTANCE * hInInstance, HINSTANCE__ * hPrevInstance, char * pCmdLine, int nCmdShow) Line 298
[Inline Frame] UnrealEditor.exe!invoke_main() Line 102
UnrealEditor.exe!__scrt_common_main_seh() Line 288
kernel32.dll!00007ff9bf39257d()
ntdll.dll!00007ff9c158aa58()
It would be great if someone could help me