Game runs fine in Editor, but it cannot be packaged

As mentioned in the subject, our game runs well when started from within the UE4 Editor (both PIE and stand-alone). However, when I try to package the game for Win64 the cooking fails (see attached log). I noticed this error, which also occurs when I start the Editor:

LogOutputDevice:Warning: === Handled error: ===
Ensure condition failed: ObservedKeyNames.Num() > 0 [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.10\Engine\Source\Runtime\AIModule\Private\BehaviorTree\Decorators\BTDecorator_BlueprintBase.cpp] [Line: 66]
Stack: 
UE4Editor-Core.dll!FWindowsPlatformStackWalk::StackWalkAndDump() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\private\windows\windowsplatformstackwalk.cpp:175]
UE4Editor-Core.dll!FDebug::EnsureFailed() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\private\misc\outputdevice.cpp:276]
UE4Editor-Core.dll!FDebug::OptionallyLogFormattedEnsureMessageReturningFalse() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\private\misc\outputdevice.cpp:385]
UE4Editor-AIModule.dll!UBTDecorator_BlueprintBase::PostLoad() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\aimodule\private\behaviortree\decorators\btdecorator_blueprintbase.cpp:66]
UE4Editor-CoreUObject.dll!UObject::ConditionalPostLoad() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\obj.cpp:723]
UE4Editor-CoreUObject.dll!EndLoad() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1286]
UE4Editor-CoreUObject.dll!LoadPackageInternal() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1042]
UE4Editor-UnrealEd.dll!UEditorEngine::Map_Load() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\editor\unrealed\private\editorserver.cpp:2388]
UE4Editor-UnrealEd.dll!UEditorEngine::HandleMapCommand() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\editor\unrealed\private\editorserver.cpp:5897]
UE4Editor-UnrealEd.dll!UEditorEngine::Exec() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\editor\unrealed\private\editorserver.cpp:5391]
UE4Editor-UnrealEd.dll!UUnrealEdEngine::Exec() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\editor\unrealed\private\unrealedsrv.cpp:743]
UE4Editor-UnrealEd.dll!FEditorFileUtils::LoadMap() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\editor\unrealed\private\filehelpers.cpp:2014]
UE4Editor-UnrealEd.dll!FEditorFileUtils::LoadDefaultMapAtStartup() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\editor\unrealed\private\filehelpers.cpp:3215]
UE4Editor-UnrealEd.dll!FUnrealEdMisc::OnInit() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\editor\unrealed\private\unrealedmisc.cpp:299]
UE4Editor-UnrealEd.dll!EditorInit() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\editor\unrealed\private\unrealed.cpp:86]
UE4Editor.exe!GuardedMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\launch\private\launch.cpp:133]
UE4Editor.exe!GuardedMainWrapper() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor.exe!WinMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]
UE4Editor.exe!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264]
KERNEL32.DLL
ntdll.dll
ntdll.dll

I could not find anything useful on that error online, and I don’t know whether it is even the root for our cooking/packaging problems.

Any ideas?

Packaging Log

Please ensure to fix all warnings and errors that are outlined in your Package Log. The crash seams to be originated by:

MainFrameActions: Packaging (Windows (64-bit)): UE4Editor-Cmd: [2016.02.13-17.39.38:112][  0]LogInit:Display: LogCollisionProfile:Warning: Profile (Trigger) - Custom Channel Name = 'Projectile' hasn't been found

No, unfortunately that was not the issue. I got rid of this error by manually cleaning DefaultEnigne.ini. Now even though that error is gone, I still get the same cooking error while packaging.

Haimat,

Please provide your new output logs.

So I solved the problem by manually fixing all errors.

Nice, can you accept the answer then?