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:
- Create a new project that is a Blueprint 2D Side Scroller
- Have a UMG be created and added to the viewport on Event Begin Play. It can just be a UMG w/ plain text.
- Open a level when the player runs into a trigger volume OR just use a console command to open a new level.
- 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]