Cooking failed in 4.18 with Ensure

After migration to 4.18 we can’t pakage our project.
We are pkaging our project with jenkins here is the comand that we use:

c:\jenkins\workspace\STARFALL_Server_And_Client>“c:\jenkins\UnrealEngine-4.18\Engine\Build\BatchFiles\RunUAT.bat”
BuildCookRun -nocompileeditor -nop4
-project=“c:\jenkins\workspace\STARFALL_Server_And_Client\Starfall.uproject”
-cook -stage -serverconfig=Development -clientconfig=Development -pak -prereqs -nodebuginfo -serverplatform=Linux -server -noclient -build -utf8output

Error in log:

c:/jenkins/workspace/STARFALL_Server_And_Client/Saved/Cooked/LinuxServer/Starfall/Content/assets/ui/battle/shipinfo_thumbnail_nomand.uasset
LogSavePackage: Display: Finished
SavePackage
c:/jenkins/workspace/STARFALL_Server_And_Client/Saved/Cooked/LinuxServer/Starfall/Content/assets/ui/battle/shipinfo_thumbnail_nomand.uasset
LogCook: Display: Cooking
/Game/assets/ui/shipeditor/equipment/nomand_Blueprint
→ c:/jenkins/workspace/STARFALL_Server_And_Client/Saved/Cooked/LinuxServer/Starfall/Content/assets/ui/shipeditor/equipment/nomand_Blueprint.uasset
LogSavePackage: Display: Finished
SavePackage
c:/jenkins/workspace/STARFALL_Server_And_Client/Saved/Cooked/LinuxServer/Starfall/Content/assets/ui/shipeditor/equipment/nomand_Blueprint.uasset
LogOutputDevice: Error: begin: stack
for UAT LogOutputDevice: Error: ===
Handled ensure: === LogOutputDevice:
Error: LogOutputDevice: Error:
Ensure condition failed:
Lhs.CurrentNum == Lhs.InitialNum
[File:C:\jenkins\UnrealEngine-4.18\Engine\Source\Runtime\Core\Public\Containers/Array.h]
[Line: 206] LogOutputDevice: Error:
Array has changed during ranged-for
iteration! LogOutputDevice: Error:
Stack: LogOutputDevice: Error:
[Callstack] 0x00000000DC818E96
UE4Editor-Core.dll!FWindowsPlatformStackWalk::StackWalkAndDump()
[c:\jenkins\unrealengine-4.18\engine\source\runtime\core\private\windows\windowsplatformstackwalk.cpp:200]
LogOutputDevice: Error: [Callstack]
0x00000000DC5A541C
UE4Editor-Core.dll!FDebug::EnsureFailed()
[c:\jenkins\unrealengine-4.18\engine\source\runtime\core\private\misc\assertionmacros.cpp:298]
LogOutputDevice: Error: [Callstack]
0x00000000DC5BFCE6
UE4Editor-Core.dll!FDebug::OptionallyLogFormattedEnsureMessageReturningFalse()
[c:\jenkins\unrealengine-4.18\engine\source\runtime\core\private\misc\assertionmacros.cpp:428]
LogOutputDevice: Error: [Callstack]
0x00000000D4C19157
UE4Editor-BlueprintGraph.dll!UK2Node_MakeContainer::PropagatePinType()
[c:\jenkins\unrealengine-4.18\engine\source\editor\blueprintgraph\private\k2node_makecontainer.cpp:346]
LogOutputDevice: Error: [Callstack]
0x00000000D4C17A67
UE4Editor-BlueprintGraph.dll!UK2Node_MakeContainer::PostReconstructNode()
[c:\jenkins\unrealengine-4.18\engine\source\editor\blueprintgraph\private\k2node_makecontainer.cpp:477]
LogOutputDevice: Error: [Callstack]
0x00000000D4B6D1AB
UE4Editor-BlueprintGraph.dll!UK2Node::ReconstructNode()
[c:\jenkins\unrealengine-4.18\engine\source\editor\blueprintgraph\private\k2node.cpp:590]
LogOutputDevice: Error: [Callstack]
0x00000000D4B09397
UE4Editor-BlueprintGraph.dll!UEdGraphSchema_K2::ReconstructNode()
[c:\jenkins\unrealengine-4.18\engine\source\editor\blueprintgraph\private\edgraphschema_k2.cpp:4398]
LogOutputDevice: Error: [Callstack]
0x00000000D613727C
UE4Editor-UnrealEd.dll!FBlueprintEditorUtils::ReconstructAllNodes()
[c:\jenkins\unrealengine-4.18\engine\source\editor\unrealed\private\kismet2\blueprinteditorutils.cpp:565]
LogOutputDevice: Error: [Callstack]
0x00000000D4191517
UE4Editor-Kismet.dll!FBlueprintCompilationManagerImpl::FlushCompilationQueueImpl()
[c:\jenkins\unrealengine-4.18\engine\source\editor\kismet\private\blueprintcompilationmanager.cpp:700]
LogOutputDevice: Error: [Callstack]
0x00000000D418F8FE
UE4Editor-Kismet.dll!FBlueprintCompilationManager::FlushCompilationQueue()
[c:\jenkins\unrealengine-4.18\engine\source\editor\kismet\private\blueprintcompilationmanager.cpp:2128]
LogOutputDevice: Error: [Callstack]
0x00000000D9EBC77F
UE4Editor-Engine.dll!UBlueprintGeneratedClass::ConditionalRecompileClass()
[c:\jenkins\unrealengine-4.18\engine\source\runtime\engine\private\blueprintgeneratedclass.cpp:259]
LogOutputDevice: Error: [Callstack]
0x00000000E0E902E5
UE4Editor-CoreUObject.dll!FScopedClassDependencyGather::~FScopedClassDependencyGather()
[c:\jenkins\unrealengine-4.18\engine\source\runtime\coreuobject\private\blueprint\blueprintsupport.cpp:376]
LogOutputDevice: Error: [Callstack]
0x00000000E103F3E1
UE4Editor-CoreUObject.dll!FLinkerLoad::CreateExport()
[c:\jenkins\unrealengine-4.18\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:4024]
LogOutputDevice: Error: [Callstack]
0x00000000E1067862
UE4Editor-CoreUObject.dll!FLinkerLoad::IndexToObject()
[c:\jenkins\unrealengine-4.18\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:4241]
LogOutputDevice: Error: [Callstack]
0x00000000E103E30E
UE4Editor-CoreUObject.dll!FLinkerLoad::CreateExport()
[c:\jenkins\unrealengine-4.18\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3711]
LogOutputDevice: Error: [Callstack]
0x00000000E1067862
UE4Editor-CoreUObject.dll!FLinkerLoad::IndexToObject()
[c:\jenkins\unrealengine-4.18\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:4241]
LogOutputDevice: Error: [Callstack]
0x00000000E103E30E
UE4Editor-CoreUObject.dll!FLinkerLoad::CreateExport()
[c:\jenkins\unrealengine-4.18\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3711]
LogOutputDevice: Error: [Callstack]
0x00000000E1067862
UE4Editor-CoreUObject.dll!FLinkerLoad::IndexToObject()
[c:\jenkins\unrealengine-4.18\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:4241]
LogOutputDevice: Error: [Callstack]
0x00000000E103E30E
UE4Editor-CoreUObject.dll!FLinkerLoad::CreateExport()
[c:\jenkins\unrealengine-4.18\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3711]
LogOutputDevice: Error: [Callstack]
0x00000000E103F82B
UE4Editor-CoreUObject.dll!FLinkerLoad::CreateExportAndPreload()
[c:\jenkins\unrealengine-4.18\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2744]
LogOutputDevice: Error: [Callstack]
0x00000000E106A5A9
UE4Editor-CoreUObject.dll!FLinkerLoad::LoadAllObjects()
[c:\jenkins\unrealengine-4.18\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2902]
LogOutputDevice: Error: [Callstack]
0x00000000E116E67F
UE4Editor-CoreUObject.dll!LoadPackageInternal() [c:\jenkins\unrealengine-4.18\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1322]
LogOutputDevice: Error: [Callstack]
0x00000000E116DB30
UE4Editor-CoreUObject.dll!LoadPackage()
[c:\jenkins\unrealengine-4.18\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1430]
LogOutputDevice: Error: [Callstack]
0x00000000D5BEC9C3
UE4Editor-UnrealEd.dll!UCookOnTheFlyServer::LoadPackageForCooking()
[c:\jenkins\unrealengine-4.18\engine\source\editor\unrealed\private\cookontheflyserver.cpp:2000]
LogOutputDevice: Error: [Callstack]
0x00000000D5C278E4
UE4Editor-UnrealEd.dll!UCookOnTheFlyServer::TickCookOnTheSide()
[c:\jenkins\unrealengine-4.18\engine\source\editor\unrealed\private\cookontheflyserver.cpp:1609]
LogOutputDevice: Error: [Callstack]
0x00000000D5A9D2CD
UE4Editor-UnrealEd.dll!UCookCommandlet::CookByTheBook()
[c:\jenkins\unrealengine-4.18\engine\source\editor\unrealed\private\commandlets\cookcommandlet.cpp:902]
LogOutputDevice: Error: [Callstack]
0x00000000D5ACE95A
UE4Editor-UnrealEd.dll!UCookCommandlet::Main()
[c:\jenkins\unrealengine-4.18\engine\source\editor\unrealed\private\commandlets\cookcommandlet.cpp:583]
LogOutputDevice: Error: [Callstack]
0x000000003FF8CD82
UE4Editor-Cmd.exe!FEngineLoop::PreInit()
[c:\jenkins\unrealengine-4.18\engine\source\runtime\launch\private\launchengineloop.cpp:2167]
LogOutputDevice: Error: [Callstack]
0x000000003FF83EA7
UE4Editor-Cmd.exe!GuardedMain()
[c:\jenkins\unrealengine-4.18\engine\source\runtime\launch\private\launch.cpp:127]
LogOutputDevice: Error: [Callstack]
0x000000003FF8410A
UE4Editor-Cmd.exe!GuardedMainWrapper()
[c:\jenkins\unrealengine-4.18\engine\source\runtime\launch\private\windows\launchwindows.cpp:134]
LogOutputDevice: Error: [Callstack]
0x000000003FF91C5B
UE4Editor-Cmd.exe!WinMain()
[c:\jenkins\unrealengine-4.18\engine\source\runtime\launch\private\windows\launchwindows.cpp:210]
LogOutputDevice: Error: [Callstack]
0x000000003FF92B0B
UE4Editor-Cmd.exe!__scrt_common_main_seh()
[f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:283]
LogOutputDevice: Error: [Callstack]
0x00000000771159ED
kernel32.dll!UnknownFunction
LogOutputDevice: Error: [Callstack]
0x000000007734B831
ntdll.dll!UnknownFunction
LogOutputDevice: Error:
LogOutputDevice: Error: end: stack for
UAT

Full UAT log is Attachedlink text

Resolved by resaving asset that leads to crash.

alternatively you can hotfix it in the source code, see my answer here 4.17 Child Actors Issues Con't (Packaging) - Programming & Scripting - Unreal Engine Forums

Is there an easy way to figure out which asset causes this issue? We have exactly the same stack trace…