Stacking Issue while packing

Hi, so I have been trying to export a build of my game but I end up getting this same error everytime I package the game. I have no idea why it keeps on appearing. If anyone could please explain to me how to fix it and why it is an error I would greatly appreciate it. Here is the section of the log that I am having an issue with

UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error: begin: stack for UAT
UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error: === Handled ensure: ===
UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error:
UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error: Ensure condition failed: Lhs.Array.Num() == Lhs.InitialNum [File:D:\Build++UE4+Release-4.18+Compile\Sync\Engine\Source\Runtime\Core\Public\Containers/SparseArray.h] [Line: 781]
UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error: Container has changed during ranged-for iteration!
UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error: Stack:
UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error: [Callstack] 0x0000000080CC2786 UE4Editor-Core.dll!FWindowsPlatformStackWalk::StackWalkAndDump() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\core\private\windows\windowsplatformstackwalk.cpp:200]
UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error: [Callstack] 0x0000000080A6123A UE4Editor-Core.dll!FDebug::EnsureFailed() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\core\private\misc\assertionmacros.cpp:298]
UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error: [Callstack] 0x0000000080A7B906 UE4Editor-Core.dll!FDebug::OptionallyLogFormattedEnsureMessageReturningFalse() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\core\private\misc\assertionmacros.cpp:425]
UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error: [Callstack] 0x0000000077F05855 UE4Editor-Foliage.dll!AInstancedFoliageActor::PostLoad() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\foliage\private\instancedfoliage.cpp:2649]
UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error: [Callstack] 0x0000000091D8E8FD UE4Editor-CoreUObject.dll!UObject::ConditionalPostLoad() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\obj.cpp:988]
UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error: [Callstack] 0x0000000091DB4CC8 UE4Editor-CoreUObject.dll!UObject::PostLoadSubobjects() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\obj.cpp:1023]
UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error: [Callstack] 0x0000000091D8E86C UE4Editor-CoreUObject.dll!UObject::ConditionalPostLoad() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\obj.cpp:974]
UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error: [Callstack] 0x0000000091E4DABC UE4Editor-CoreUObject.dll!EndLoad() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1588]
UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error: [Callstack] 0x0000000091E65259 UE4Editor-CoreUObject.dll!LoadPackageInternal() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1333]
UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error: [Callstack] 0x0000000091E64774 UE4Editor-CoreUObject.dll!LoadPackage() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1430]
UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error: [Callstack] 0x000000007AA868B3 UE4Editor-UnrealEd.dll!UCookOnTheFlyServer::LoadPackageForCooking() [d:\build++ue4+release-4.18+compile\sync\engine\source\editor\unrealed\private\cookontheflyserver.cpp:2000]
UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error: [Callstack] 0x000000007AABD7BB UE4Editor-UnrealEd.dll!UCookOnTheFlyServer::TickCookOnTheSide() [d:\build++ue4+release-4.18+compile\sync\engine\source\editor\unrealed\private\cookontheflyserver.cpp:1609]
UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error: [Callstack] 0x000000007A957D61 UE4Editor-UnrealEd.dll!UCookCommandlet::CookByTheBook() [d:\build++ue4+release-4.18+compile\sync\engine\source\editor\unrealed\private\commandlets\cookcommandlet.cpp:902]
UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error: [Callstack] 0x000000007A97F391 UE4Editor-UnrealEd.dll!UCookCommandlet::Main() [d:\build++ue4+release-4.18+compile\sync\engine\source\editor\unrealed\private\commandlets\cookcommandlet.cpp:583]
UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error: [Callstack] 0x00000000999FD25F UE4Editor-Cmd.exe!FEngineLoop::PreInit() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:2167]
UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error: [Callstack] 0x00000000999F525A UE4Editor-Cmd.exe!GuardedMain() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\launch\private\launch.cpp:127]
UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error: [Callstack] 0x00000000999F54AA UE4Editor-Cmd.exe!GuardedMainWrapper() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:134]
UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error: [Callstack] 0x0000000099A02379 UE4Editor-Cmd.exe!WinMain() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:210]
UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error: [Callstack] 0x0000000099A03193 UE4Editor-Cmd.exe!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253]
UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error: [Callstack] 0x00000000BDC81FE4 KERNEL32.DLL!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error: [Callstack] 0x00000000BE8FEF91 ntdll.dll!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error:
UATHelper: Packaging (Windows (64-bit)): LogOutputDevice: Error: end: stack for UAT

Having the same issue, did you ever find a solution?

Hello Anders. So I solved the problem and was successfully able to package my project. Check through all of your folders and files in your game folder of that particular project and make sure you compile everything and that nothing is left undone. The reason why this error occurs is that either one or multiple blueprints or maps are not able to compile which halts the packaging process. So just check your game directory and make sure every folder and asset is in working condition. Also, if you want to exclude certain folders from being in the packaging process you can edit that in the project settings before you package it. Hope this helps.

Best of Luck,
Gabriel Cortinas

I’ll make a pass on all our assets in that case. Was a bit unsure if this came from our 4.18 upgrade or if the timing was just coincidence.

I must admit I didn’t expect to get an answer, so thank you very much for taking the time to give me one! :slight_smile: