Hi!
We’re running into an intermittent cooking crash in the editor, about 3% of the time. The cook finishes successfully, but the editor crashes on shutdown due to a failed check(). We began to notice this crash about 8 months ago, and think it may have begun after we upgraded to 5.7, but are not sure.
The call stack for this failed check:
```
UnrealEditor-Core.dll!FDebug::CheckVerifyFailedImpl2(const char * Expr=0x00007ff96d6c42e8, const char * File=0x00007ff96d6268a0, int Line=209, const wchar_t * Format=0x00007ff96d624a74, …)
[Inline Frame] UnrealEditor-Core.dll!TLockFreeFixedSizeAllocator<65536,64,FThreadSafeCounter>::{dtor}()
[Inline Frame] UnrealEditor-Core.dll!FPageAllocator::{dtor}()
UnrealEditor-Core.dll!`FPageAllocator::Construct’::`2’::`dynamic atexit destructor for ‘PageAllocator’'()
UnrealEditor-Core.dll!dllmain_crt_process_detach(const bool is_terminating=true)
UnrealEditor-Core.dll!dllmain_dispatch(HINSTANCE__ * const instance=0x00007ff96c7b0000, const unsigned long reason=0, void * const reserved=0x0000000000000001)
UnrealEditor-Cmd.exe!00007ff7b8ba8378()
```
This is reporting that an FPageAllocator still has allocated memory, and there may be leaked/dangling pointers.
We were able to reproduce this in a build with the “memory” trace channel enabled, allowing us to investigate with Memory Insights. With that, we were able to see that there were 4 active FPageAllocator allocations using the MemStack LLM tag prior to the crash. 3 of these are in rendering code, while 1 is with a NetSerializer registered with Iris. We can’t be sure the NetSerializer is the source of the assert, but it seems likely because from the reading the code, it seems like it should have been freed earlier.
The callstack for this allocation is in an attached screenshot (I couldn’t figure out how to copy full callstack from Memory Insights)
The net serializer portion on the callstack is: C:/Specter//Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Private/Serialization/MinimalGameplayCueReplicationProxyNetSerializer.cpp (235)
The allocation ultimately comes from FPersistentNetDebugNames::CreatePersistentNetDebugName().
We have not been able to reproduce multiple instances of this with Memory tracing enabled, so we haven’t been able to confirm if other NetSerializers show up as well.
Are you aware of any crashes like this? Do you have any suggestions or ideas for how we should continue to debug this? If there’s any more information, files, or data that would be helpful, please let me know!
Thank you!
FullTraceCallstack.png(116 KB)