Packaged Game Crashing due to MallocBinned2.cpp FreeBundles function throwing Read Access Violation Exception

My packaged game is crashing and I cannot replicate this in PIE or Stand Alone mode in the editor. It is crashing after idling for a minute or so. I packaged the game with .pdb debug files and attached VS Studio and the screenshot below has the details.

It looks like the GarbageCollector is calling down to MallocBinned2.cpp and the LinkedList of Bundles of memory to release points to a memory location that cannot be accessed. I think the VSStudio knows it should be a Struct but I think the pointer is bad or it has already been collected.

I’ve read that in Unreal Engine C++ properties that don’t use the UPROPERTY can get garbage collected from under you. My project doesn’t have much c++ though. It’s mainly Blueprint project that has been built from Engine and Project Source with some Steam helpers and Blueprint Function libraries.

Does anyone have any ideas on how to debug further? I tell the Engine to do a Full Rebuild everytime and recently I deleted the DerivedDataCache since I upgraded to 5.5.4.


This is the case for UObject pointers. Those need to be marked UPROPERTY. I suppose this is true as well when you have a struct property containing a UObject pointer.

The reason is that the garbage collector builds a tree of UObject referencing other UObjects. The moment one UObject is not referenced by another, it is treated as garbage.

The garbage collector can run at configurable intervals. The default might be 30 sec or 1 minute if I remember. Debugging this can be hard, as any cause of the problem might have happened time ago, not visible on the stack to debug.

What I’m hoping for, is that you can find the name of that property (or more info) by travelling the call stack in VS, not just the pointer address? While you travel the stack you will be able to read some of the properties in methods called.