Ensure condition failed: ReferencingPin->LinkedTo.Num() > PinData.ArrayIdx

Error while packaging for windows:
I don’t know where to search. I cannot open any single blueprint. And the game work in the engine…

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: ReferencingPin->LinkedTo.Num() > PinData.ArrayIdx [File:D:\Build\++UE4+Release-4.18+Compile\Sync\Engine\Source\Runtime\Engine\Private\EdGraph\EdGraphPin.cpp] [Line: 1611]
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error:
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error: Stack:
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error: [Callstack] 0x0000000050892786 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] 0x000000005063123A 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] 0x000000005064B906 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] 0x000000004DC99461 UE4Editor-Engine.dll!UEdGraphPin::ResolveReferencesToPin() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\edgraph\edgraphpin.cpp:1611]
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error: [Callstack] 0x000000004DC9C91D UE4Editor-Engine.dll!UEdGraphPin::Serialize() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\edgraph\edgraphpin.cpp:1572]
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error: [Callstack] 0x000000004DC9D435 UE4Editor-Engine.dll!UEdGraphPin::SerializePin() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\edgraph\edgraphpin.cpp:1831]
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error: [Callstack] 0x000000004DC9D6DB UE4Editor-Engine.dll!UEdGraphPin::SerializePinArray() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\edgraph\edgraphpin.cpp:1671]
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error: [Callstack] 0x000000004DC9C63B UE4Editor-Engine.dll!UEdGraphNode::Serialize() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\edgraph\edgraphnode.cpp:443]
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error: [Callstack] 0x000000004A1A9892 UE4Editor-BlueprintGraph.dll!UK2Node::Serialize() [d:\build\++ue4+release-4.18+compile\sync\engine\source\editor\blueprintgraph\private\k2node.cpp:115]
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error: [Callstack] 0x000000004A1A9CC7 UE4Editor-BlueprintGraph.dll!UK2Node_CallFunction::Serialize() [d:\build\++ue4+release-4.18+compile\sync\engine\source\editor\blueprintgraph\private\k2node_callfunction.cpp:1873]
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error: [Callstack] 0x0000000050094A00 UE4Editor-CoreUObject.dll!FLinkerLoad::Preload() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3300]
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error: [Callstack] 0x000000005019D762 UE4Editor-CoreUObject.dll!EndLoad() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1554]
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error: [Callstack] 0x00000000501B5084 UE4Editor-CoreUObject.dll!LoadPackageInternal() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1282]
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error: [Callstack] 0x00000000501B4774 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] 0x000000004B5B68B3 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] 0x000000004B5ED7BB 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] 0x000000004B487D61 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] 0x000000004B4AF391 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] 0x00000000CFA8D25F 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] 0x00000000CFA8525A 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] 0x00000000CFA854AA 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] 0x00000000CFA92379 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] 0x00000000CFA93193 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] 0x00000000A8681FE4 KERNEL32.DLL!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error: [Callstack] 0x00000000A8ECEF91 ntdll.dll!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error:
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error: end: stack for UAT
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: GIsTransacting || Pin->LinkedTo.Contains(ReferencingPin) [File:D:\Build\++UE4+Release-4.18+Compile\Sync\Engine\Source\Runtime\Engine\Private\EdGraph\EdGraphPin.cpp] [Line: 1628]
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error:
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error: Stack:
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error: [Callstack] 0x0000000050892786 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] 0x000000005063123A 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] 0x000000005064B906 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] 0x000000004DC996EE UE4Editor-Engine.dll!UEdGraphPin::ResolveReferencesToPin() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\edgraph\edgraphpin.cpp:1628]
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error: [Callstack] 0x000000004DC9C91D UE4Editor-Engine.dll!UEdGraphPin::Serialize() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\edgraph\edgraphpin.cpp:1572]
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error: [Callstack] 0x000000004DC9D435 UE4Editor-Engine.dll!UEdGraphPin::SerializePin() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\edgraph\edgraphpin.cpp:1831]
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error: [Callstack] 0x000000004DC9D6DB UE4Editor-Engine.dll!UEdGraphPin::SerializePinArray() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\edgraph\edgraphpin.cpp:1671]
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error: [Callstack] 0x000000004DC9C63B UE4Editor-Engine.dll!UEdGraphNode::Serialize() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\edgraph\edgraphnode.cpp:443]
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error: [Callstack] 0x000000004A1A9892 UE4Editor-BlueprintGraph.dll!UK2Node::Serialize() [d:\build\++ue4+release-4.18+compile\sync\engine\source\editor\blueprintgraph\private\k2node.cpp:115]
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error: [Callstack] 0x000000004A1A9CC7 UE4Editor-BlueprintGraph.dll!UK2Node_CallFunction::Serialize() [d:\build\++ue4+release-4.18+compile\sync\engine\source\editor\blueprintgraph\private\k2node_callfunction.cpp:1873]
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error: [Callstack] 0x0000000050094A00 UE4Editor-CoreUObject.dll!FLinkerLoad::Preload() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3300]
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error: [Callstack] 0x000000005019D762 UE4Editor-CoreUObject.dll!EndLoad() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1554]
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error: [Callstack] 0x00000000501B5084 UE4Editor-CoreUObject.dll!LoadPackageInternal() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1282]
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error: [Callstack] 0x00000000501B4774 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] 0x000000004B5B68B3 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] 0x000000004B5ED7BB 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] 0x000000004B487D61 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] 0x000000004B4AF391 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] 0x00000000CFA8D25F 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] 0x00000000CFA8525A 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] 0x00000000CFA854AA 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] 0x00000000CFA92379 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] 0x00000000CFA93193 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] 0x00000000A8681FE4 KERNEL32.DLL!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error: [Callstack] 0x00000000A8ECEF91 ntdll.dll!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error:
UATHelper: Packaging (Windows (64-bit)):   LogOutputDevice: Error: end: stack for UAT

Fixed: it was an Actor Component that was working in PIE but failed to built. Deleting Intermediate and binaries files and recompiling all the blueprints of the project fixed the issue.