[BUG 4.4] UMG - Loading Level W/ UMG on Viewport Causes Crash

Using the Blueprint 2D Side Scroller, if you call a UMG to be attached to a viewport in a level, then load a new level without removing that UMG, the client will crash. The exact crash can be found at the bottom of the bug. Here are the repro steps:

  1. Create a new project that is a Blueprint 2D Side Scroller
  2. Have a UMG be created and added to the viewport on Event Begin Play. It can just be a UMG w/ plain text.
  3. Open a level when the player runs into a trigger volume OR just use a console command to open a new level.
  4. Observe that, because you did not remove the UMG from the viewport, your game will crash.

Workaround:

  • If you manually remove the UMG from the viewport before you load the level, the crash will not happen.

Suggestion:
I can undertsand why we would have to make sure the UMG is removed before loading a level. If this is WAI, then it would be great to either get a more concise crash message, “You must remove all UMG from the level before opening a new one”, or have the Open Level function checks if any UMG are active and remove them before creating a new level.

Below is a a sample of the crash that I received when doing this.

!Id:38a25820a8c1cc80bf6cdfd0fbe50dcb

Unknown exception - code 00000001 (first/second not available)

World //Temp//Autosaves//Game//Maps//UEDPCExample_Map.Example_Map not cleaned up by garbage collection!
(Object is not currently rooted)

KERNELBASE + 37901 bytes
UE4Editor_Core + 3095148 bytes
UE4Editor_Core + 1661722 bytes
UE4Editor_Engine + 9135690 bytes
UE4Editor_Engine + 9028703 bytes
UE4Editor_Engine + 8826998 bytes
UE4Editor_Engine + 9122557 bytes
UE4Editor_Engine + 3687115 bytes
UE4Editor!FEngineLoop::Tick() + 3294 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.4\engine\source\runtime\launch\private\launchengineloop.cpp:2098]
UE4Editor!GuardedMain() + 476 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.4\engine\source\runtime\launch\private\launch.cpp:133]
UE4Editor!GuardedMainWrapper() + 26 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.4\engine\source\runtime\launch\private\windows\launchwindows.cpp:125]
UE4Editor!WinMain() + 249 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.4\engine\source\runtime\launch\private\windows\launchwindows.cpp:201]
UE4Editor!__tmainCRTStartup() + 329 bytes [f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618]

Hi McSean,

While working on a different UMG issue, we discovered this crash as well. It has since been reported to our developers to be fixed. Sorry for any inconvenience. Thank you for helping improve UMG while it is experimental. Please let us know if you encounter any other unexpected behavior.

Great, thank you so much, !

Hey, that workaround does not work for me. Any idea?

I removed all widgets from the viewport. I thought it is not enough time between removing and level loading, so I put a delay, but it still doesn’t work.

Hi,

If the workaround is not working for you, then it sounds like this may be a different, but related issue. Could you post a new bug report and link to it here? That will allow me to easily assign someone to look into your particular questions and help you get to a workaround that functions for you.

Thanks!