Fatal crash when clicking "package project" in editor

Seemingly random fatal crash when attempting to build project in the editor, selecting package project > win64 (either shipping or development)
This error has happend a few times at random since the 4.11 release. Most of the times it wont happen, and the project will build succesfully, the error is fairly unpredictable.

Currently using build 4.11.1 but this was also present in 4.11

Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:H:\UnrealEngine-release\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 785]
Array index out of bounds: 0 from an array of size 0

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000010

UE4Editor-Slate.dll!FMenuStack::DismissInternal() [h:\unrealengine-release\engine\source\runtime\slate\private\framework\application\menustack.cpp:582]
UE4Editor-Slate.dll!SMenuEntryBlock::OnClicked() [h:\unrealengine-release\engine\source\runtime\slate\private\framework\multibox\smenuentryblock.cpp:1025]
UE4Editor-Slate.dll!SMenuEntryBlock::OnMenuItemButtonClicked() [h:\unrealengine-release\engine\source\runtime\slate\private\framework\multibox\smenuentryblock.cpp:987]
UE4Editor-Slate.dll!TMemberFunctionCaller::operator()<>() [h:\unrealengine-release\engine\source\runtime\core\public\delegates\delegateinstanceinterface_variadics.h:161]
UE4Editor-Slate.dll!TTupleImpl >::ApplyAfter_ExplicitReturnType >() [h:\unrealengine-release\engine\source\runtime\core\public\delegates\tuple.h:128]
UE4Editor-Slate.dll!TBaseSPMethodDelegateInstance<0,SMenuEntryBlock,0,FReply __cdecl(void)>::Execute() [h:\unrealengine-release\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:321]
UE4Editor-Slate.dll!TBaseDelegate::Execute() [h:\unrealengine-release\engine\source\runtime\core\public\delegates\delegatesignatureimpl_variadics.inl:521]
UE4Editor-Slate.dll!SButton::OnMouseButtonUp() [h:\unrealengine-release\engine\source\runtime\slate\private\widgets\input\sbutton.cpp:273]
UE4Editor-Slate.dll!SMenuEntryButton::OnMouseButtonUp() [h:\unrealengine-release\engine\source\runtime\slate\private\framework\multibox\smenuentryblock.cpp:385]
UE4Editor-Slate.dll!::operator()() [h:\unrealengine-release\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:4540]
UE4Editor-Slate.dll!FEventRouter::Route >() [h:\unrealengine-release\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:214]
UE4Editor-Slate.dll!FSlateApplication::RoutePointerUpEvent() [h:\unrealengine-release\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:4530]
UE4Editor-Slate.dll!FSlateApplication::ProcessMouseButtonUpEvent() [h:\unrealengine-release\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:4947]
UE4Editor-Slate.dll!FSlateApplication::OnMouseUp() [h:\unrealengine-release\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:4923]
UE4Editor-Core.dll!FWindowsApplication::ProcessDeferredMessage() [h:\unrealengine-release\engine\source\runtime\core\private\windows\windowsapplication.cpp:1415]
UE4Editor-Core.dll!FWindowsApplication::DeferMessage() [h:\unrealengine-release\engine\source\runtime\core\private\windows\windowsapplication.cpp:1732]
UE4Editor-Core.dll!FWindowsApplication::ProcessMessage() [h:\unrealengine-release\engine\source\runtime\core\private\windows\windowsapplication.cpp:697]
UE4Editor-Core.dll!FWindowsApplication::AppWndProc() [h:\unrealengine-release\engine\source\runtime\core\private\windows\windowsapplication.cpp:619]
USER32.dll
USER32.dll
UE4Editor-Core.dll!FWindowsPlatformMisc::PumpMessages() [h:\unrealengine-release\engine\source\runtime\core\private\windows\windowsplatformmisc.cpp:884]
UE4Editor.exe!FEngineLoop::Tick() [h:\unrealengine-release\engine\source\runtime\launch\private\launchengineloop.cpp:2610]
UE4Editor.exe!GuardedMain() [h:\unrealengine-release\engine\source\runtime\launch\private\launch.cpp:142]
UE4Editor.exe!GuardedMainWrapper() [h:\unrealengine-release\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor.exe!WinMain() [h:\unrealengine-release\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]
UE4Editor.exe!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:255]
kernel32.dll
ntdll.dll
ntdll.dll

Hey MADHOUSE,

How often does this crash occur? Is this happening on the source or binary version of the engine? Are you simply going to File > Package Project and clicking on Package Project?

Thanks!

Hi. This is occuring with the source built version of the engine, (win64), yes the crash happens when clicking on File > Package Project >Windows>Windows (64bit). The crash has occured between 4-5 times but is pretty rare. I am using Windows 7 64bit.

If the crash happens, then it happens as soon as I click to package the project, and it will crash before ever displaying the folder browser window for chosing packing destination.

Cheers

MADHOUSE,

After reviewing this crash further, I went ahead and put a into the system. UE-29547 has been entered for this specific crash. I was not able to reproduce it, but hopefully we can get more information once it’s investigated more.

Thanks!

FWIW I’m having the exact same issue when trying to package my project for Windows (64 bit). I have a few other engineers working on the project and they aren’t having the issue when checking out of perforce so I assume it’s something to do with my local environment.

I’ve tried blowing away the perforce client and building from scratch to no avail.

To clarify this is 100% reproducable for me on my workstation.

Additional info:

I put a BP on FMenuStack::DismissInternal() at the point in time where the menu item is clicked. It’s being called twice - whether that’s the bug or not I do not have enough context currently to say, however it matches the seen behavior that on the first call we have 3 entries in ‘Stack’:

Stack
Num=3
[0]: Ptr=0x000001e5d13b4f40, SharedRefs=2, WeakRefs=3, Object={Window=Ptr=0x000001e545ac7580, SharedRefs=1, WeakRefs=9, Object={MoveResizeZone=-842150451 MoveResizeStart={X=-431602080. Y=-431602080. } MoveResizeRect={Left=-1.00000000 …} …} }
Ptr=0x000001e5eb6f8280, SharedRefs=2, WeakRefs=3, Object={Window=Ptr=0x000001e5f419d600, SharedRefs=1, WeakRefs=9, Object={MoveResizeZone=-842150451 MoveResizeStart={X=-431602080. Y=-431602080. } MoveResizeRect={Left=-1.00000000 …} …} }
[2]: Ptr=0x000001e5a4e82140, SharedRefs=2, WeakRefs=3, Object={Window=Ptr=0x000001e5f410c100, SharedRefs=4, WeakRefs=28, Object={MoveResizeZone=-842150451 MoveResizeStart={X=-431602080. Y=-431602080. } MoveResizeRect={Left=-1.00000000 …} …} }
[Raw View]: {AllocatorInstance={Data=0x000001e544bc0580 {…} } ArrayNum=3 ArrayMax=4 }

Once DismissInternal() has completed Stack is empty. Then badness seems to ensue when it is called again for the same object (with what looks to be an identical call-stack) and runs off the beginning of the zero sized Stack collection:

Stack
Empty
[Raw View]: {AllocatorInstance={Data=0x0000000000000000 } ArrayNum=0 ArrayMax=0 }

Hope this helps
-San

Er - please disregard my last comment about ‘similar callstacks’ - as it turns out it looks like the second call is happening due to some other as yet unknown (to me) async path. It may or may not be a the issue but hopefully will provide a hint / breadcrumb to whomever is digging into it.

UE-29547 has been resolved and should’ve been implemented into 4.11.2.

Thanks!