Custom GameInstance causes PIE to crash when pressing Stop

Hi there,

I’m having an issue wherein the editor crashes immediately after I press stop when playing in-editor.

This has only begun to happen after I have inherited GameInstance. Previously, I had a custom GameMode class that contained two objects which themselves held TMaps containing a custom ability class and one containing animations. I have moved these to the new GameInstance class.

The output does not yield any meaningful information, and the call stack simply suggests it crashes in the engine Tick function.

I think it is possible that it crashes because certain actors in my game are holding references to objects in these TMaps - at what point should I drop these references to ensure it does not crash when pressing stop?

Worth noting that this only happens when the GameInstance has these two members in:


Any ideas? It’s extremely frustrating

Out of interest, try going into the ‘Advanced Options’ and unchecking ‘Use Single process’.

We’ve had an issue before where running in PIE would cause us to crash on Stop, something to do with PIE only creating one Game Instance for everybody.

Is it crashing in EndPlayMap() by any chance? One level up from UEditorEngine::Tick() in the call stack.
I have recently started having a crash there when I press stop, and it’s definitely down to references, the output states there are remaining references to objects in the world.

I know what has caused it in my case - I have a details view customization which I guess is holding the references (even though they are not UPROPERTY so I’m not sure why). Unfortunately I really don’t know how I can work around this or why exactly I shouldn’t be doing it.