Packaging project error

Today I started getting a weird error when packaging. I can still run the game normally with “play”, but I get an error when I try to create a package. Both Windows 64-bit and Android All used to work, but now they get an error

[link text][1]

103890-cook-2016.08.21-23.39.36.txt (281 KB)

Looking at my log… It’s not clear what “Error Unknown Cook Failure” means. So I’m looking through the log for other errors, and I see some warnings referencing “/Game/HUD/HqGameModeBp”. At one point I made an HqGameModeBp when experimenting with HUD, but then I deleted it and used UMG. But it appears something somewhere must still be referencing HqGameModeBp? How can I find this reference and remove it? I checked project settings but I don’t see it…

MainFrameActions: Packaging (Windows (64-bit)): UE4Editor-Cmd:
MainFrameActions: Packaging (Windows (64-bit)): UE4Editor-Cmd: [2016.08.23-03.35.31:904][ 0]LogInit:Display: CookResults:Warning: Warning Unable to find package for cooking /Game/HUD/HqGameModeBp
MainFrameActions: Packaging (Windows (64-bit)): UE4Editor-Cmd: [2016.08.23-03.35.31:905][ 0]LogInit:Display: LogCook:Warning: Unable to find package for cooking /Game/HUD/HqGameModeBp
MainFrameActions: Packaging (Windows (64-bit)): UE4Editor-Cmd: [2016.08.23-03.35.31:905][ 0]LogInit:Display: LogLinker:Warning: Can’t find file ‘/Game/HUD/HqGameModeBp’
MainFrameActions: Packaging (Windows (64-bit)): UE4Editor-Cmd: [2016.08.23-03.35.31:905][ 0]LogInit:Display: LogUObjectGlobals:Warning: Failed to load ‘/Game/HUD/HqGameModeBp’: Can’t find file ‘/Game/HUD/HqGameModeBp’
MainFrameActions: Packaging (Windows (64-bit)): UE4Editor-Cmd: [2016.08.23-03.35.31:906][ 0]LogInit:Display: LogUObjectGlobals:Warning: Failed to find object ‘Object /Game/HUD/HqGameModeBp.HqGameModeBp_C’
MainFrameActions: Packaging (Windows (64-bit)): UE4Editor-Cmd: [2016.08.23-03.35.31:906][ 0]LogInit:Display: LogRedirectors:Warning: String Asset Reference ‘/Game/HUD/HqGameModeBp.HqGameModeBp_C’ was not found! (Referencer ‘Unknown’)
MainFrameActions: Packaging (Windows (64-bit)): UE4Editor-Cmd: [2016.08.23-03.35.31:906][ 0]LogInit:Display:
MainFrameActions: Packaging (Windows (64-bit)): UE4Editor-Cmd: [2016.08.23-03.35.31:906][ 0]LogInit:Display: Failure - 2 error(s), 9 warning(s)

Edit I just realized something about this warning. /Game/HUD/HqGameModeBp does not exist. However, /Game/Blueprints/HqGameModeBp does exist. Maybe I have an old reference to /Game/HUD/HqGameModeBp somewhere somehow?

C:\Users\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+4.12\Cook-2016.08.21-23.39.36.txt
MainFrameActions: Packaging (Windows (64-bit)): at AutomationTool.CommandUtils.RunCommandlet(FileReference ProjectName, String UE4Exe, String Commandlet, String Parameters)
MainFrameActions: Packaging (Windows (64-bit)): at Project.Cook(ProjectParams Params)
MainFrameActions: Packaging (Windows (64-bit)): — End of inner exception stack trace —
MainFrameActions: Packaging (Windows (64-bit)): at Project.Cook(ProjectParams Params)
MainFrameActions: Packaging (Windows (64-bit)): at BuildCookRun.DoBuildCookRun(ProjectParams Params)
MainFrameActions: Packaging (Windows (64-bit)): at AutomationTool.BuildCommand.Execute()
MainFrameActions: Packaging (Windows (64-bit)): at AutomationTool.Automation.Execute(List1 CommandsToExecute, CaselessDictionary1 Commands)
MainFrameActions: Packaging (Windows (64-bit)): at AutomationTool.Automation.Process(String[] CommandLine)
MainFrameActions: Packaging (Windows (64-bit)): at AutomationTool.Program.MainProc(Object Param)
MainFrameActions: Packaging (Windows (64-bit)): at AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)
MainFrameActions: Packaging (Windows (64-bit)): at AutomationTool.Program.Main()
MainFrameActions: Packaging (Windows (64-bit)): Program.Main: AutomationTool exiting with ExitCode=25 (Error_UnknownCookFailure)
MainFrameActions: Packaging (Windows (64-bit)): Domain_ProcessExit
MainFrameActions: Packaging (Windows (64-bit)): copying UAT log files…
MainFrameActions: Packaging (Windows (64-bit)): BUILD FAILED
PackagingResults:Error: Error Unknown Cook Failure

Reverting my project (in perforce) to an earlier revision did not fix the problem… So I don’t think it’s anything I changed in terms of Blueprints or C++ code… Very strange!

Pemcode,

Here is the error within your logs:

[2016.08.22-04.37.36:531][  0]LogInit:Display: Warning/Error Summary (Unique only)
[2016.08.22-04.37.36:532][  0]LogInit:Display: -----------------------------------
[2016.08.22-04.37.36:532][  0]LogInit:Display: LogOutputDevice:Error: 
begin: stack for UAT
[2016.08.22-04.37.36:532][  0]LogInit:Display: LogOutputDevice:Error: 
end: stack for UAT
[2016.08.22-04.37.36:534][  0]LogInit:Display: LogOutputDevice:Warning: === Handled error: ===

Ensure condition failed: AttachmentRules.LocationRule == EAttachmentRule::KeepRelative && AttachmentRules.RotationRule == EAttachmentRule::KeepRelative && AttachmentRules.ScaleRule == EAttachmentRule::KeepRelative [File:D:\Build\++UE4+Release-4.12+Compile\Sync\Engine\Source\Runtime\Engine\Private\Components\SceneComponent.cpp] [Line: 1482]
AttachToComponent when called from a constructor is only setting up attachment and will always be treated as KeepRelative. Consider calling SetupAttachment directly instead.
Stack: 
UE4Editor-Core.dll
UE4Editor-Core.dll
UE4Editor-Core.dll
UE4Editor-Engine.dll
UE4Editor-HeroQuest-5633.dll
UE4Editor-CoreUObject.dll
UE4Editor-CoreUObject.dll
UE4Editor-CoreUObject.dll
UE4Editor-CoreUObject.dll
UE4Editor-Core.dll
UE4Editor-Core.dll
UE4Editor-Projects.dll
UE4Editor-Projects.dll
UE4Editor-Cmd.exe
UE4Editor-Cmd.exe
UE4Editor-Cmd.exe
UE4Editor-Cmd.exe
UE4Editor-Cmd.exe
UE4Editor-Cmd.exe
KERNEL32.DLL
ntdll.dll
ntdll.dll

You’re having trouble with your SceneComponent.cpp line:1482. [Here][1] is a link that may help you with resolving this issue, as they had the same callstack.

Thanks!

Cannot package game when upgraded to 4.12 - Platform & Builds - Epic Developer Community Forums

That doesn’t seem right. I didn’t edit SceneComponent.cpp. I’m using it’s AttachToComponent() in my own HQSpectatorPawn.cpp file, but I don’t think I’m doing anything that should cause an error when packing (and not when running compiling in Visual Studio and running from the unreal editor).

OurCameraSpringArm->AttachToComponent(RootComponent, FAttachmentTransformRules::KeepWorldTransform);

OurCamera->AttachToComponent(OurCameraSpringArm, FAttachmentTransformRules::KeepWorldTransform);

Besides, if I comment out these lines and package the project, I still get the same “PackagingResults:Error: Error Unknown Cook Failure” - so AttachToComponent can’t be the problem. Plus I think the Ensure condition failed message is just a warning.

If you comment out the lines and you’re still receiving an error, I need to see the updated logs.

What I pulled out from your logs is the issue that the project is running into when you’re trying to package. This is a helpful hint from the logs itself, have you tried this yet? AttachToComponent when called from a constructor is only setting up attachment and will always be treated as KeepRelative. Consider calling SetupAttachment directly instead.

Changing it to SetupAttachment() is now working. I’m not sure why it didn’t work earlier - maybe I had a stale file that package did not re-generate. thank you for the help!