Editor Crash on toggling level visibility

I’m using UE4.12 with Win10 and built the engine from the github source.

I am experiencing a consistent crash on “EditorLevelUtils.cpp” on line 727 with the following error message:
[2016.06.03-04.22.31:500][344]LogContentBrowser: Native class hierarchy updated for ‘WorldBrowser’ in 0.0036 seconds. Added 1 classes and 3 folders.
Assertion failed: Level->bIsVisible == bShouldBeVisible [File:C:\UE412\Engine\Source\Editor\UnrealEd\Private\EditorLevelUtils.cpp] [Line: 727]

UE4Editor.exe has triggered a breakpoint.

Here is my call stack:

UE4Editor-UnrealEd.dll!EditorLevelUtils::SetLevelVisibility(ULevel * Level, bool bShouldBeVisible, bool bForceLayersVisible) Line 727	C++

UE4Editor-WorldBrowser.dll!FLevelModel::SetVisible(bool bVisible) Line 221 C++
UE4Editor-WorldBrowser.dll!FLevelCollectionModel::HideLevels(const TArray<TSharedPtr<FLevelModel,0>,FDefaultAllocator> & InLevelList) Line 422 C++
UE4Editor-WorldBrowser.dll!SWorldHierarchyItem::OnToggleVisibility() Line 246 C++
UE4Editor-WorldBrowser.dll!TMemberFunctionCaller<SWorldHierarchyItem,FReply (__cdecl SWorldHierarchyItem::)(void) __ptr64>::operator()<>() Line 161 C++
UE4Editor-WorldBrowser.dll!TTupleImpl<TIntegerSequence >::ApplyAfter_ExplicitReturnType<FReply,TMemberFunctionCaller<SWorldHierarchyItem,FReply (__cdecl SWorldHierarchyItem::
)(void) __ptr64> >(TMemberFunctionCaller<SWorldHierarchyItem,FReply (__cdecl SWorldHierarchyItem::*)(void)> && Func) Line 128 C++
UE4Editor-WorldBrowser.dll!TBaseSPMethodDelegateInstance<0,SWorldHierarchyItem,0,FReply __cdecl(void)>::Execute() Line 321 C++
UE4Editor-Slate.dll!TBaseDelegate::Execute() Line 521 C++
UE4Editor-Slate.dll!SButton::OnMouseButtonUp(const FGeometry & MyGeometry, const FPointerEvent & MouseEvent) Line 275 C++
UE4Editor-Slate.dll!FSlateApplication::RoutePointerUpEvent::__l8::(const FArrangedWidget & TargetWidget, const FPointerEvent & Event) Line 4598 C++
UE4Editor-Slate.dll!FEventRouter::Route<FReply,FEventRouter::FToLeafmostPolicy,FPointerEvent,FReply (const FArrangedWidget &, const FPointerEvent &) >(FSlateApplication * ThisApplication, FEventRouter::FToLeafmostPolicy RoutingPolicy, FPointerEvent EventCopy, const FSlateApplication::RoutePointerUpEvent::l8::FReply (const FArrangedWidget &, const FPointerEvent &) & Lambda) Line 215 C++
UE4Editor-Slate.dll!FSlateApplication::RoutePointerUpEvent(FWidgetPath & WidgetsUnderPointer, FPointerEvent & PointerEvent) Line 4587 C++
UE4Editor-Slate.dll!FSlateApplication::ProcessMouseButtonUpEvent(FPointerEvent & MouseEvent) Line 5041 C++
UE4Editor-Slate.dll!FSlateApplication::OnMouseUp(const EMouseButtons::Type Button, const FVector2D CursorPos) Line 5021 C++
UE4Editor-Core.dll!FWindowsApplication::ProcessDeferredMessage(const FDeferredWindowsMessage & DeferredMessage) Line 1507 C++
UE4Editor-Core.dll!FWindowsApplication::DeferMessage(TSharedPtr<FWindowsWindow,0> & NativeWindow, HWND
* InHWnd, unsigned int InMessage, unsigned int64 InWParam, int64 InLParam, int MouseX, int MouseY, unsigned int RawInputFlags) Line 1847 C++
UE4Editor-Core.dll!FWindowsApplication::ProcessMessage(HWND
* hwnd, unsigned int msg, unsigned int64 wParam, int64 lParam) Line 742 C++
UE4Editor-Core.dll!FWindowsApplication::AppWndProc(HWND
* hwnd, unsigned int msg, unsigned int64 wParam, int64 lParam) Line 664 C++
[External Code]
UE4Editor-Core.dll!FWindowsPlatformMisc::PumpMessages(bool bFromMainLoop) Line 903 C++
UE4Editor.exe!FEngineLoop::Tick() Line 2728 C++
UE4Editor.exe!GuardedMain(const wchar_t * CmdLine, HINSTANCE
* hInInstance, HINSTANCE
* hPrevInstance, int nCmdShow) Line 148 C++
UE4Editor.exe!WinMain(HINSTANCE
* hInInstance, HINSTANCE
* hPrevInstance, char * __formal, int nCmdShow) Line 189 C++

Repro steps:

I have a somewhat small level with about 697 objects. I have a persistent level with about 5 sublevels. When I try to toggle the visibility of a specific sublevel, the editor crashes every time. Usually it involves something like moving an actor from one sublevel to another and then toggling the visibility of that sublevel.

Hi Slayemin,

  • Does this occur in a clean, blank project with no additional content or is it limited to one project?
  • What steps can I take to reproduce this on my end?
  • Can you post your crash logs? They can be found at \Unreal Projects\PROJECTNAME\saved\logs\
  • Is this a c++ or blueprint project?

I will have to reproduce the error and submit the crash logs later. But I can provide answers to the other questions:

Does this occur in a clean, blank
project with no additional content or
is it limited to one project?

I have not tested this, though I imagine it does.

What steps can I take to reproduce
this on my end?
Create about 3-4 sub levels in a level, then populate each of those levels with static meshes (such as rocks, bricks, etc). Then, move those actors from one level to another level (use Ctrl + M). Save each level. Then toggle the visibility of a sub level which had actors moved out of it. There’s a good chance you’ll get a crash. Alternatively, you can move actors from one level to the other without saving and then toggle level visibility, and that too should generate a crash somewhat reliably.

Can you post your crash logs? They can
be found at \Unreal
Projects\PROJECTNAME\saved\logs
I will have to reproduce the error and get back to you on this, but I’m confident I can reproduce it reliably.

Is this a c++ or blueprint project?
This is a C++ project with blueprints. I built the engine from source and have made no modifications to the engine.

Here’s my latest error log. I didn’t even move anything around, I just started toggling the visibility of sub levels.link text

Do you have any references to sublevel actors within the persistent level or other sublevels? Do you have a sample project I can take a look at to see what may be occurring?

Hi Slayemin,

We have not heard from you in several days. I am marking this as answered for tracking purposes. If you are still experiencing this error, please comment with the requested information.

If I need to reference an actor in a level, I place it into the persistent level and script out anything in the level blueprint. Basically, there are no dependencies between objects between levels. All I do is toggle visibility on a level and I get crashes.

I don’t have a sample project for you at the moment, but I can generate one in a few days (I’m short on time, trying to ship a game asap).

I will leave this post open for a few days to give you time to upload the sample project. Once it is here I will be happy to attempt to reproduce this again.