BUG, C++, OpenLevel freeez, if i try to open streaming level

If Level2 is in streaming list of loaded map Level1 (Editor->Window->Levels), then if i try to use: UGameplayStatics::OpenLevel(…Level2…), then editor freezes.

PlayInEditor.

PS: i am expecting Log warning message (like when i LoadStreamLevel on non-stream level), but not freez.

Hey newbprofi-

Does the editor crash or simply become unresponsive? If it is crashing can you post the logs from the crash for me to see? If it is only freezing without crashing can you try running the project through Visual Studio’s debugger and causing the freeze then?

Additionally, does the crash happen in a new project with no extra content other than the multiple levels? Here are the steps I took to test this myself, let me know if this is what you’re doing or if there’s something I’m missing.

  • Create two new levels
  • With Level1 as the current level, I went to Window->Levels
  • Drag Level2 from content browser to Levels list to add it below Persistent Level
  • Open Level Blueprint and add call to Open Level Node set to Level2.
  • Play in Editor and use call to Open Level

Cheers

Doug Wilson

Yes, exactly that steps.
But i dont use blueprints, i call UGameplayStatics::OpenLevel from C++, i simply create Button in MyHUD with OnClicked event, MyHUD is inside Level1 PlayerController. Then i press PIE, Level1 is loaded with my button, i press button and: Editor is freezed, if i open WindowsProcessManager i see that UE4Editor continue allocating memory, like when memory leak, so i just close process. (i dont wait crash, its too long, and i dont want to have 0 free memory).

I’ve tested Blueprint version with same scenario, i created trigger volume and use OpenLevel with begin overlap event. When i overlap trigger, I’ve got not feeez, but crash instead:

"Assertion failed: (CastChecked(WorldContext.World()->GetOutermost())->PackageFlags & PKG_PlayInEditor) == PKG_PlayInEditor [File:D:\GitHub\UE4.8.1\Engine\Source\Runtime\Engine\Private\U

KERNELBASE
UE4Editor_Core!FOutputDeviceWindowsError::Serialize() [d:\github\ue4.8.1\engine\source\runtime\core\private\windows\windowsplatformoutputdevices.cpp:95]
UE4Editor_Core!FOutputDevice::Logf__VA() [d:\github\ue4.8.1\engine\source\runtime\core\private\misc\outputdevice.cpp:144]
UE4Editor_Core!FDebug::AssertFailed() [d:\github\ue4.8.1\engine\source\runtime\core\private\misc\outputdevice.cpp:355]
UE4Editor_Engine!UEngine::LoadMap() [d:\github\ue4.8.1\engine\source\runtime\engine\private\unrealengine.cpp:9186]
UE4Editor_Engine!UEngine::Browse() [d:\github\ue4.8.1\engine\source\runtime\engine\private\unrealengine.cpp:8360]
UE4Editor_Engine!UEngine::TickWorldTravel() [d:\github\ue4.8.1\engine\source\runtime\engine\private\unrealengine.cpp:8535]
UE4Editor_UnrealEd!UEditorEngine::Tick() [d:\github\ue4.8.1\engine\source\editor\unrealed\private\editorengine.cpp:1277]
UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [d:\github\ue4.8.1\engine\source\editor\unrealed\private\unrealedengine.cpp:366]
UE4Editor!FEngineLoop::Tick() [d:\github\ue4.8.1\engine\source\runtime\launch\private\launchengineloop.cpp:2359]
UE4Editor!GuardedMain() [d:\github\ue4.8.1\engine\source\runtime\launch\private\launch.cpp:142]
UE4Editor!GuardedMainWrapper() [d:\github\ue4.8.1\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() [d:\github\ue4.8.1\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]

Hey newbprofi-

I have bugged the behavior of Open Level (freezing/crashing when called) for investigation. (UE-18588) Though the behavior is slightly different it’s likely that both the freeze and crash are related

Cheers

Doug Wilson