We have an extremely similar crash related to loading a map via console command while UMG is being used that is already being investigated (UE-1226). I have added the information you provided to that report. Unfortunately I do not know when we might have this corrected.
I have similiar bug, crash when reloading level from umg but I’ve narrowed it down:
When player takes damage some blood splats are being spawned with small delay one after another and with lifespan set to about 2 seconds.
When he dies game is paused instantly and show ‘try again’ button, clicking it causes crash. Removing the part of bp that spawns those actors fixes it
Is this crash something that is happening only in your project, or can you reproduce it in a brand new project as well? Can you provide some idea of how you have your UMG widgets added to and removed from the viewport when the crash is happening?
I’m actually starting to encounter this as well in 4.6.1. I am not using UMG in this case but what I’ve added recently is the following…
I added a custom BP based off of an actor with a USceneComponent and an attached ParticleSystemComponent. In my custom GameInstance class, I hold a reference to this particular BP however if I try to call it at any point, I have made sure I am using an ‘IsValid’ node before calling the appropriate function on the BP in question.
I have two levels that have this BP within them and both load one after another. In the second level, it does get the current GameInstance and store the reference of it in there but the first level is simply just rendering the custom BP standalone.
At first I thought this is because it’s storing a reference and maybe is still holding on to it but that only happens in the level that follows and not the one that was showing right before it. The crash in my case is upon calling the ‘Open Level’ node to load the second level.
I’ll see if I can figure some stuff out but wanted to let you know just in case this info helps you dig deeper into the issue. Thanks.
BTW… as a heads up, this is not happening on restarting but starting the level for the first time.
Also , as a feature request, it would be great if the GameInstance class since it’s persistent across the entire game, could provide Events for Level Loaded and Level Destroyed and maybe have return values be the name of the persistent level that was just created or destroyed. Thanks again!
As a heads up, I fixed the issue by calling ‘Destroy Actor’ on both levels that use this BP. Not sure why the GC missed it but keep me posted if you need me to try a couple things out for you, thanks.
I had this problem on two separate occasions for 2 different reasons. The first time was because I wasn’t removing the HUD widgets when changing levels. The other was because I was using the GameInstance to store an array of object references to objects that were destroyed on the level change. When I added a clear command to the array on EndPlay it stopped crashing. I don’t know if this helps anyone else but it was a bit of a “Huzzah!” moment for me.
It’s back in 4.9.1 ? … Everything crashes for me when reloading a map…
[2015.09.26-19.47.26:608][ 4]LogReferenceChain: (PendingKill) SupraballHUDBP_C /Game/Maps/Pitch.Pitch:PersistentLevel.SupraballHUDBP_C_0->Outer
[2015.09.26-19.47.26:608][ 4]LogReferenceChain: (PendingKill) Level /Game/Maps/Pitch.Pitch:PersistentLevel->OwningWorld
[2015.09.26-19.47.26:608][ 4]LogReferenceChain: (target) World /Game/Maps/Pitch.Pitch
[2015.09.26-19.47.26:919][ 4]LogLoad: (Object is not currently rooted)
[2015.09.26-19.47.26:919][ 4]LogMac:Error: appError called: Assertion failed: Assertion failed: [File:/Users/Shared/UnrealEngine/git-4.9.1/Engine/Source/Runtime/Engine/Private/UnrealEngine.cpp] [Line: 10258]
World /Game/Maps/Pitch.Pitch not cleaned up by garbage collection!
(Object is not currently rooted)
When I don’t use the UMG widgets it’s working. Will try removing on endplay.