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

My project works fine without errors or warnings in PIE, but I get this error when trying to package my project for Windows x64. I’m using UE 4.19.2 on Windows 10, and I’ve attached the log files for the build. I’ve tried deleting the Binaries, Intermediate, Saved folders, and I still haven’t had any success.

Any help is appreciated!

ProcessResult.StdOut:   LogOutputDevice: Error: begin: stack for UAT
ProcessResult.StdOut:   LogOutputDevice: Error: === Handled ensure: ===
ProcessResult.StdOut:   LogOutputDevice: Error:
ProcessResult.StdOut:   LogOutputDevice: Error: Ensure condition failed: ReferencingPin->LinkedTo.Num() > PinData.ArrayIdx [File:D:\Build\++UE4+Release-4.19+Compile\Sync\Engine\Source\Runtime\Engine\Private\EdGraph\EdGraphPin.cpp] [Line: 1708]
ProcessResult.StdOut:   LogOutputDevice: Error:
ProcessResult.StdOut:   LogOutputDevice: Error: Stack:
ProcessResult.StdOut:   LogOutputDevice: Error: [Callstack] 0x00000000CB49B706 UE4Editor-Core.dll!UnknownFunction []
ProcessResult.StdOut:   LogOutputDevice: Error: [Callstack] 0x00000000CB1FAE3A UE4Editor-Core.dll!UnknownFunction []
ProcessResult.StdOut:   LogOutputDevice: Error: [Callstack] 0x00000000CB20ECD6 UE4Editor-Core.dll!UnknownFunction []
ProcessResult.StdOut:   LogOutputDevice: Error: [Callstack] 0x00000000A20B50A1 UE4Editor-Engine.dll!UnknownFunction []
ProcessResult.StdOut:   LogOutputDevice: Error: [Callstack] 0x00000000A20B8A92 UE4Editor-Engine.dll!UnknownFunction []
ProcessResult.StdOut:   LogOutputDevice: Error: [Callstack] 0x00000000A20B96E3 UE4Editor-Engine.dll!UnknownFunction []
ProcessResult.StdOut:   LogOutputDevice: Error: [Callstack] 0x00000000A20B9CED UE4Editor-Engine.dll!UnknownFunction []
ProcessResult.StdOut:   LogOutputDevice: Error: [Callstack] 0x00000000A20B870B UE4Editor-Engine.dll!UnknownFunction []
ProcessResult.StdOut:   LogOutputDevice: Error: [Callstack] 0x00000000B90B48AC UE4Editor-BlueprintGraph.dll!UnknownFunction []
ProcessResult.StdOut:   LogOutputDevice: Error: [Callstack] 0x00000000B90B4CD7 UE4Editor-BlueprintGraph.dll!UnknownFunction []
ProcessResult.StdOut:   LogOutputDevice: Error: [Callstack] 0x00000000D5643FDC UE4Editor-CoreUObject.dll!UnknownFunction []
ProcessResult.StdOut:   LogOutputDevice: Error: [Callstack] 0x00000000D575AC32 UE4Editor-CoreUObject.dll!UnknownFunction []
ProcessResult.StdOut:   LogOutputDevice: Error: [Callstack] 0x00000000D5772F74 UE4Editor-CoreUObject.dll!UnknownFunction []
ProcessResult.StdOut:   LogOutputDevice: Error: [Callstack] 0x00000000D5772544 UE4Editor-CoreUObject.dll!UnknownFunction []
ProcessResult.StdOut:   LogOutputDevice: Error: [Callstack] 0x00000000C50C3F83 UE4Editor-UnrealEd.dll!UnknownFunction []
ProcessResult.StdOut:   LogOutputDevice: Error: [Callstack] 0x00000000C50FB05B UE4Editor-UnrealEd.dll!UnknownFunction []
ProcessResult.StdOut:   LogOutputDevice: Error: [Callstack] 0x00000000C4FAA580 UE4Editor-UnrealEd.dll!UnknownFunction []
ProcessResult.StdOut:   LogOutputDevice: Error: [Callstack] 0x00000000C4FD1CB0 UE4Editor-UnrealEd.dll!UnknownFunction []
ProcessResult.StdOut:   LogOutputDevice: Error: [Callstack] 0x000000001564EB20 UE4Editor-Cmd.exe!UnknownFunction []
ProcessResult.StdOut:   LogOutputDevice: Error: [Callstack] 0x00000000156469FA UE4Editor-Cmd.exe!UnknownFunction []
ProcessResult.StdOut:   LogOutputDevice: Error: [Callstack] 0x0000000015646C4A UE4Editor-Cmd.exe!UnknownFunction []
ProcessResult.StdOut:   LogOutputDevice: Error: [Callstack] 0x0000000015654177 UE4Editor-Cmd.exe!UnknownFunction []
ProcessResult.StdOut:   LogOutputDevice: Error: [Callstack] 0x0000000015654FBF UE4Editor-Cmd.exe!UnknownFunction []
ProcessResult.StdOut:   LogOutputDevice: Error: [Callstack] 0x00000000FDDC3034 KERNEL32.DLL!UnknownFunction []
ProcessResult.StdOut:   LogOutputDevice: Error: [Callstack] 0x00000000FEA31461 ntdll.dll!UnknownFunction []
ProcessResult.StdOut:   LogOutputDevice: Error:
ProcessResult.StdOut:   LogOutputDevice: Error: end: stack for UAT
ProcessResult.StdOut:   LogWindows: Error: begin: stack for UAT
ProcessResult.StdOut:   LogWindows: Error: === Critical error: ===
ProcessResult.StdOut:   LogWindows: Error:
ProcessResult.StdOut:   LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000000
ProcessResult.StdOut:   LogWindows: Error:
ProcessResult.StdOut:   LogWindows: Error: [Callstack] 0x00000000A20B537F UE4Editor-Engine.dll!UnknownFunction []
ProcessResult.StdOut:   LogWindows: Error: [Callstack] 0x00000000A20B8A92 UE4Editor-Engine.dll!UnknownFunction []
ProcessResult.StdOut:   LogWindows: Error: [Callstack] 0x00000000A20B96E3 UE4Editor-Engine.dll!UnknownFunction []
ProcessResult.StdOut:   LogWindows: Error: [Callstack] 0x00000000A20B9CED UE4Editor-Engine.dll!UnknownFunction []
ProcessResult.StdOut:   LogWindows: Error: [Callstack] 0x00000000A20B870B UE4Editor-Engine.dll!UnknownFunction []
ProcessResult.StdOut:   LogWindows: Error: [Callstack] 0x00000000B90B48AC UE4Editor-BlueprintGraph.dll!UnknownFunction []
ProcessResult.StdOut:   LogWindows: Error: [Callstack] 0x00000000B90B4CD7 UE4Editor-BlueprintGraph.dll!UnknownFunction []
ProcessResult.StdOut:   LogWindows: Error: [Callstack] 0x00000000D5643FDC UE4Editor-CoreUObject.dll!UnknownFunction []
ProcessResult.StdOut:   LogWindows: Error: [Callstack] 0x00000000D575AC32 UE4Editor-CoreUObject.dll!UnknownFunction []
ProcessResult.StdOut:   LogWindows: Error: [Callstack] 0x00000000D5772F74 UE4Editor-CoreUObject.dll!UnknownFunction []
ProcessResult.StdOut:   LogWindows: Error: [Callstack] 0x00000000D5772544 UE4Editor-CoreUObject.dll!UnknownFunction []
ProcessResult.StdOut:   LogWindows: Error: [Callstack] 0x00000000C50C3F83 UE4Editor-UnrealEd.dll!UnknownFunction []
ProcessResult.StdOut:   LogWindows: Error: [Callstack] 0x00000000C50FB05B UE4Editor-UnrealEd.dll!UnknownFunction []
ProcessResult.StdOut:   LogWindows: Error: [Callstack] 0x00000000C4FAA580 UE4Editor-UnrealEd.dll!UnknownFunction []
ProcessResult.StdOut:   LogWindows: Error: [Callstack] 0x00000000C4FD1CB0 UE4Editor-UnrealEd.dll!UnknownFunction []
ProcessResult.StdOut:   LogWindows: Error: [Callstack] 0x000000001564EB20 UE4Editor-Cmd.exe!UnknownFunction []
ProcessResult.StdOut:   LogWindows: Error: [Callstack] 0x00000000156469FA UE4Editor-Cmd.exe!UnknownFunction []
ProcessResult.StdOut:   LogWindows: Error: [Callstack] 0x0000000015646C4A UE4Editor-Cmd.exe!UnknownFunction []
ProcessResult.StdOut:   LogWindows: Error: [Callstack] 0x0000000015654177 UE4Editor-Cmd.exe!UnknownFunction []
ProcessResult.StdOut:   LogWindows: Error: [Callstack] 0x0000000015654FBF UE4Editor-Cmd.exe!UnknownFunction []
ProcessResult.StdOut:   LogWindows: Error: [Callstack] 0x00000000FDDC3034 KERNEL32.DLL!UnknownFunction []
ProcessResult.StdOut:   LogWindows: Error: [Callstack] 0x00000000FEA31461 ntdll.dll!UnknownFunction []
ProcessResult.StdOut:   LogWindows: Error: [Callstack] 0x00000000FEA31461 ntdll.dll!UnknownFunction []
ProcessResult.StdOut:   LogWindows: Error:
ProcessResult.StdOut:   LogWindows: Error: end: stack for UAT
CommandUtils.Run: Took 58.018992s to run UE4Editor-Cmd.exe, ExitCode=3
InternalUtils.SafeDeleteFile: SafeDeleteFile C:\Users\david\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.19\Cook-2018.10.22-20.22.36.txt
InternalUtils.SafeCopyFile: SafeCopyFile C:\Program Files\Epic Games\UE_4.19\Engine\Programs\AutomationTool\Saved\Cook-2018.10.22-20.21.38.txt C:\Users\david\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.19\Cook-2018.10.22-20.22.36.txt
InternalUtils.SafeDeleteFile: SafeDeleteFile C:\Program Files\Epic Games\UE_4.19\Engine\Programs\AutomationTool\Saved\Cook-2018.10.22-20.21.38.txt
ExceptionUtils.PrintExceptionInfo: ==============================================================================
ExceptionUtils.PrintExceptionInfo: ERROR: Cook failed.
ExceptionUtils.PrintExceptionInfo:        (see C:\Users\david\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.19\UAT_Log.txt for full exception trace)
ExceptionUtils.PrintExceptionInfo: 
ExceptionUtils.PrintExceptionInfo: CommandletException: Editor terminated with exit code 3 while running Cook for C:\Users\david\Documents\Unreal Projects\hoftgames\FloodFlow.uproject; see log C:\Users\david\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.19\Cook-2018.10.22-20.22.36.txt
ExceptionUtils.PrintExceptionInfo:    at AutomationTool.CommandUtils.RunCommandlet(FileReference ProjectName, String UE4Exe, String Commandlet, String Parameters)
ExceptionUtils.PrintExceptionInfo:    at AutomationTool.CommandUtils.CookCommandlet(FileReference ProjectName, String UE4Exe, String[] Maps, String[] Dirs, String InternationalizationPreset, String[] CulturesToCook, String TargetPlatform, String Parameters)
ExceptionUtils.PrintExceptionInfo:    at Project.Cook(ProjectParams Params)
ExceptionUtils.PrintExceptionInfo: Wrapped by AutomationException: Cook failed.
ExceptionUtils.PrintExceptionInfo:    at Project.Cook(ProjectParams Params)
ExceptionUtils.PrintExceptionInfo:    at BuildCookRun.DoBuildCookRun(ProjectParams Params)
ExceptionUtils.PrintExceptionInfo:    at BuildCookRun.ExecuteBuild()
ExceptionUtils.PrintExceptionInfo:    at AutomationTool.BuildCommand.Execute()
ExceptionUtils.PrintExceptionInfo:    at AutomationTool.Automation.Execute(List`1 CommandsToExecute, Dictionary`2 Commands)
ExceptionUtils.PrintExceptionInfo:    at AutomationTool.Automation.Process(String[] Arguments)
ExceptionUtils.PrintExceptionInfo:    at AutomationTool.Program.MainProc(Object Param)
ExceptionUtils.PrintExceptionInfo:    at AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)
ExceptionUtils.PrintExceptionInfo:    at AutomationTool.Program.Main()
ExceptionUtils.PrintExceptionInfo: ==============================================================================
Program.Main: AutomationTool exiting with ExitCode=25 (Error_UnknownCookFailure)

we found the specific blueprint that was breaking the packaging process, and reverted it. We don’t know what about the blueprint caused the packaging to fail, but at least we worked around it. I really wish that unreal told us which blueprint it was failing on at least: it would have saved us hours of searching.