Description

When using the Python plugin to add an existing level as a streaming level, the editor crashes. It seems that this happens regardless of what level is added or what the contents of that level are. Additionally, the level crashes regardless of what LevelStreaming class is used. 

 

Tested in //UE4/Release-4.25 @ CL 14469661 but it seems the add_level_to_world method isn't implemented in 4.25, so not marking as a Regression.

Steps to Reproduce
  1. Open any project
  2. Enable the Python Editor Script Plugin
  3. Restart the Editor
  4. Create a new level and save it
  5. Press ~ to bring up the cmd window
  6. Change the cmd window to Python by clicking the dropdown
  7. Type the following unreal.EditorLevelUtils.add_level_to_world(unreal.World(), "<PathToLevel>", unreal.LevelStreamingAlwaysLoaded)

RESULT:

The editor crashes

EXPECTED:

The level would be added to the world as a streaming object

Callstack
=== Critical error: ===

Fatal error!

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000028

[Callstack] 0x00007ff80bd76ac4 UE4Editor-CoreUObject.dll!UObjectBase::GetExternalPackage() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectBase.cpp:223]
[Callstack] 0x00007ff80bdd175e UE4Editor-CoreUObject.dll!UObjectBaseUtility::GetOutermost() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectBaseUtility.cpp:198]
[Callstack] 0x00007fffca13f849 UE4Editor-UnrealEd.dll!UEditorLevelUtils::AddLevelToWorld_Internal() [D:\Build\++UE4\Sync\Engine\Source\Editor\UnrealEd\Private\EditorLevelUtils.cpp:394]
[Callstack] 0x00007fffca13f650 UE4Editor-UnrealEd.dll!UEditorLevelUtils::AddLevelToWorld() [D:\Build\++UE4\Sync\Engine\Source\Editor\UnrealEd\Private\EditorLevelUtils.cpp:354]
[Callstack] 0x00007fffcaa782b8 UE4Editor-UnrealEd.dll!UEditorLevelUtils::execK2_AddLevelToWorld() [D:\Build\++UE4\Sync\Engine\Intermediate\Build\Win64\UE4Editor\Inc\UnrealEd\EditorLevelUtils.gen.cpp:126]
[Callstack] 0x00007ff80baf2604 UE4Editor-CoreUObject.dll!UFunction::Invoke() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\Class.cpp:5588]
[Callstack] 0x00007ff80bd80e63 UE4Editor-CoreUObject.dll!UObject::ProcessEvent() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1992]
[Callstack] 0x00007fffb6c37ea1 UE4Editor-PythonScriptPlugin.dll!PyUtil::InvokeFunctionCall() [D:\Build\++UE4\Sync\Engine\Plugins\Experimental\PythonScriptPlugin\Source\PythonScriptPlugin\Private\PyUtil.cpp:582]
[Callstack] 0x00007fffb6c1967f UE4Editor-PythonScriptPlugin.dll!FPyWrapperObject::CallFunction_Impl() [D:\Build\++UE4\Sync\Engine\Plugins\Experimental\PythonScriptPlugin\Source\PythonScriptPlugin\Private\PyWrapperObject.cpp:301]
[Callstack] 0x00007fffb6c17ee8 UE4Editor-PythonScriptPlugin.dll!FPyWrapperObject::CallClassMethodWithArgs_Impl() [D:\Build\++UE4\Sync\Engine\Plugins\Experimental\PythonScriptPlugin\Source\PythonScriptPlugin\Private\PyWrapperObject.cpp:320]
[Callstack] 0x00007fffb6bcab4c UE4Editor-PythonScriptPlugin.dll!FPyMethodWithClosureDef::Call() [D:\Build\++UE4\Sync\Engine\Plugins\Experimental\PythonScriptPlugin\Source\PythonScriptPlugin\Private\PyMethodWithClosure.cpp:160]
[Callstack] 0x00007fffadbcf2b6 python37.dll!_PyObject_FastCallKeywords() [c:\a\18\s\objects\call.c:199]
[Callstack] 0x00007fffadbcdc3b python37.dll!call_function() [c:\a\18\s\python\ceval.c:4619]
[Callstack] 0x00007fffadbd53b8 python37.dll!_PyEval_EvalFrameDefault() [c:\a\18\s\python\ceval.c:3095]
[Callstack] 0x00007fffadbce3ac python37.dll!_PyEval_EvalCodeWithName() [c:\a\18\s\python\ceval.c:3930]
[Callstack] 0x00007fffadbdb573 python37.dll!PyEval_EvalCodeEx() [c:\a\18\s\python\ceval.c:3966]
[Callstack] 0x00007fffadbdb4d1 python37.dll!PyEval_EvalCode() [c:\a\18\s\python\ceval.c:530]
[Callstack] 0x00007fffb6bd0395 UE4Editor-PythonScriptPlugin.dll!FPythonScriptPlugin::EvalString() [D:\Build\++UE4\Sync\Engine\Plugins\Experimental\PythonScriptPlugin\Source\PythonScriptPlugin\Private\PythonScriptPlugin.cpp:1148]
[Callstack] 0x00007fffb6c02667 UE4Editor-PythonScriptPlugin.dll!FPythonScriptPlugin::RunString() [D:\Build\++UE4\Sync\Engine\Plugins\Experimental\PythonScriptPlugin\Source\PythonScriptPlugin\Private\PythonScriptPlugin.cpp:1176]
[Callstack] 0x00007fffb6bd095d UE4Editor-PythonScriptPlugin.dll!FPythonScriptPlugin::ExecPythonCommandEx() [D:\Build\++UE4\Sync\Engine\Plugins\Experimental\PythonScriptPlugin\Source\PythonScriptPlugin\Private\PythonScriptPlugin.cpp:476]
[Callstack] 0x00007fffb6bd07fa UE4Editor-PythonScriptPlugin.dll!FPythonScriptPlugin::ExecPythonCommand() [D:\Build\++UE4\Sync\Engine\Plugins\Experimental\PythonScriptPlugin\Source\PythonScriptPlugin\Private\PythonScriptPlugin.cpp:453]
[Callstack] 0x00007fffb6bd04d6 UE4Editor-PythonScriptPlugin.dll!FPythonCommandExecutor::Exec() [D:\Build\++UE4\Sync\Engine\Plugins\Experimental\PythonScriptPlugin\Source\PythonScriptPlugin\Private\PythonScriptPlugin.cpp:143]
[Callstack] 0x00007fffb20f7815 UE4Editor-OutputLog.dll!SConsoleInputBox::OnTextCommitted() [D:\Build\++UE4\Sync\Engine\Source\Developer\OutputLog\Private\SOutputLog.cpp:302]
[Callstack] 0x00007fffb20e58e3 UE4Editor-OutputLog.dll!TBaseSPMethodDelegateInstance<0,SConsoleInputBox,0,void __cdecl(FText const &,enum ETextCommit::Type),FDefaultDelegateUserPolicy>::ExecuteIfSafe() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:307]
[Callstack] 0x00007ff805563c06 UE4Editor-Slate.dll!FSlateEditableTextLayout::HandleCarriageReturn() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Slate\Private\Widgets\Text\SlateEditableTextLayout.cpp:1519]
[Callstack] 0x00007ff805565018 UE4Editor-Slate.dll!FSlateEditableTextLayout::HandleKeyDown() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Slate\Private\Widgets\Text\SlateEditableTextLayout.cpp:967]
[Callstack] 0x00007ff80556e774 UE4Editor-Slate.dll!SMultiLineEditableText::OnKeyDown() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Slate\Private\Widgets\Text\SMultiLineEditableText.cpp:637]
[Callstack] 0x00007ff8052a25b2 UE4Editor-Slate.dll!FEventRouter::Route<FReply,FEventRouter::FBubblePolicy,FKeyEvent,<lambda_f630e7f24dbef73857a69219e32f2d96> >() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Slate\Private\Framework\Application\SlateApplication.cpp:383]
[Callstack] 0x00007ff80530e368 UE4Editor-Slate.dll!FSlateApplication::ProcessKeyDownEvent() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Slate\Private\Framework\Application\SlateApplication.cpp:4325]
[Callstack] 0x00007ff805302226 UE4Editor-Slate.dll!FSlateApplication::OnKeyDown() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Slate\Private\Framework\Application\SlateApplication.cpp:4222]
[Callstack] 0x00007ff81fe7b958 UE4Editor-ApplicationCore.dll!FWindowsApplication::ProcessDeferredMessage() [D:\Build\++UE4\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:2013]
[Callstack] 0x00007ff81fe69197 UE4Editor-ApplicationCore.dll!FWindowsApplication::DeferMessage() [D:\Build\++UE4\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:2642]
[Callstack] 0x00007ff81fe7e389 UE4Editor-ApplicationCore.dll!FWindowsApplication::ProcessMessage() [D:\Build\++UE4\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:1046]
[Callstack] 0x00007ff81fe64310 UE4Editor-ApplicationCore.dll!FWindowsApplication::AppWndProc() [D:\Build\++UE4\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:878]
[Callstack] 0x00007ff84a3e5c1d USER32.dll!UnknownFunction []
[Callstack] 0x00007ff84a3e5612 USER32.dll!UnknownFunction []
[Callstack] 0x00007ff81fe7f914 UE4Editor-ApplicationCore.dll!FWindowsPlatformApplicationMisc::PumpMessages() [D:\Build\++UE4\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsPlatformApplicationMisc.cpp:130]
[Callstack] 0x00007ff642d38848 UE4Editor.exe!FEngineLoop::Tick() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:4748]
[Callstack] 0x00007ff642d5117c UE4Editor.exe!GuardedMain() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Launch\Private\Launch.cpp:169]
[Callstack] 0x00007ff642d5125a UE4Editor.exe!GuardedMainWrapper() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:137]
[Callstack] 0x00007ff642d652bd UE4Editor.exe!WinMain() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:268]
[Callstack] 0x00007ff642d67fea UE4Editor.exe!__scrt_common_main_seh() [d:\agent\_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
[Callstack] 0x00007ff84a307c24 KERNEL32.DLL!UnknownFunction []
[Callstack] 0x00007ff84ba4d721 ntdll.dll!UnknownFunction []

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-120878 in the post.

2
Login to Vote

Unresolved
CreatedAug 3, 2021
UpdatedFeb 13, 2024