Assertion crash while packaging

When I try to package, the packager always crashes in the same place.

It does not matter if it is set to Development or Release, nor does it matter which platform I choose.

The same or similar crash happens also when I exit the editor.

… Assertion error …

Assertion failed: IsValid() [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.7\Engine\Source\Runtime\Core\Public\Templates\SharedPointer.h] [Line: 647]

… Crash log …

UE4Editor-Cmd: [2015.05.21-18.31.29:353][  0]LogCookCommandlet:Display: Adding package to manifest /Game/BP_Spaceship, D:/unreal/Perseids/Saved/Cooked/[Platform]/Perseids/Content/BP_Spaceship.uasset, /Game/Deneb
UE4Editor-Cmd: [2015.05.21-18.31.29:353][  0]LogCookCommandlet:Display: Adding package to manifest /Game/BP_Billboard_Marker, D:/unreal/Perseids/Saved/Cooked/[Platform]/Perseids/Content/BP_Billboard_Marker.uasset, /Game/Deneb
UE4Editor-Cmd: [2015.05.21-18.31.29:354][  0]LogCookCommandlet:Display: Cooking /Game/BP_Billboard_Marker -> D:/unreal/Perseids/Saved/Cooked/IOS/Perseids/Content/BP_Billboard_Marker.uasset
UE4Editor-Cmd: [2015.05.21-18.31.29:378][  0]LogSavePackage: Save=23.092909ms
UE4Editor-Cmd: [2015.05.21-18.31.29:378][  0]LogSavePackage: Async saving from memory to 'D:/unreal/Perseids/Saved/Cooked/IOS/Perseids/Content/BP_Billboard_Marker.uasset'
UE4Editor-Cmd: [2015.05.21-18.31.29:379][  0]LogCookCommandlet:Display: Adding package to manifest /Game/Deneb, D:/unreal/Perseids/Saved/Cooked/[Platform]/Perseids/Content/Deneb.umap, /Game/Deneb
UE4Editor-Cmd: [2015.05.21-18.31.29:380][  0]LogCookCommandlet:Display: Cooking /Game/Deneb -> D:/unreal/Perseids/Saved/Cooked/IOS/Perseids/Content/Deneb.umap
UE4Editor-Cmd: [2015.05.21-18.31.29:388][  0]LogWindows:Error: Windows GetLastError: The operation completed successfully. (0)
UE4Editor-Cmd: begin: stack for UAT
UE4Editor-Cmd: KERNELBASE.dll!UnknownFunction (0x000007fefd24a49d) + 0 bytes [UnknownFile:0]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Core.dll!FOutputDeviceWindowsError::Serialize() (0x000007fee95a8074) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\private\windows\windowsplatformoutputdevices.cpp:95]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Core.dll!FOutputDevice::Logf__VA() (0x000007fee9427878) + 159 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\private\misc\outputdevice.cpp:144]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Core.dll!FDebug::AssertFailed() (0x000007fee9408b17) + 62 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\private\misc\outputdevice.cpp:224]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Slate.dll!FSlateApplication::Get() (0x000007fee61dda9c) + 61 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\slate\public\framework\application\slateapplication.h:176]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Engine.dll!UFont::GetMaxCharHeight() (0x000007fee6d3b412) + 6 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\font.cpp:288]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Engine.dll!UTextRenderComponent::CalcBounds() (0x000007fee72cdd92) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\textrendercomponent.cpp:786]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Engine.dll!USceneComponent::UpdateBounds() (0x000007fee70b4f46) + 21 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\scenecomponent.cpp:439]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Engine.dll!USceneComponent::UpdateComponentToWorldWithParent() (0x000007fee70b56e5) + 21 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\scenecomponent.cpp:115]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Engine.dll!USceneComponent::DetachFromParent() (0x000007fee707cccb) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\scenecomponent.cpp:1129]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Engine.dll!USceneComponent::AttachTo() (0x000007fee70728a9) + 15 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\scenecomponent.cpp:934]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Engine.dll!USceneComponent::OnRegister() (0x000007fee709b304) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\scenecomponent.cpp:130]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Engine.dll!UPrimitiveComponent::OnRegister() (0x000007fee7040a3e) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\primitivecomponent.cpp:305]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Engine.dll!UActorComponent::ExecuteRegisterEvents() (0x000007fee6b21490) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\actorcomponent.cpp:945]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Engine.dll!UActorComponent::RegisterComponentWithWorld() (0x000007fee6b59b0e) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\actorcomponent.cpp:749]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Engine.dll!AActor::IncrementalRegisterComponents() (0x000007fee6b47d6d) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\actor.cpp:3276]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Engine.dll!ULevel::IncrementalUpdateComponents() (0x000007fee6ec37d3) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\level.cpp:720]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Engine.dll!UWorld::PreSaveRoot() (0x000007fee73e25e0) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\world.cpp:597]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-CoreUObject.dll!UPackage::SavePackage() (0x000007fee9d3d555) + 16 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\savepackage.cpp:2529]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-UnrealEd.dll!UEditorEngine::SavePackage() (0x000007fee4658411) + 115 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\editor.cpp:4416]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-UnrealEd.dll!UCookCommandlet::SaveCookedPackage() (0x000007fee4bad7cf) + 110 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\commandlets\cookcommandlet.cpp:455]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-UnrealEd.dll!UCookCommandlet::Cook() (0x000007fee4b5fde9) + 62 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\commandlets\cookcommandlet.cpp:1344]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-UnrealEd.dll!UCookCommandlet::Main() (0x000007fee4b907c8) + 5 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\commandlets\cookcommandlet.cpp:578]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Cmd.exe!FEngineLoop::PreInit() (0x000000013fc2ba3a) + 96 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\launchengineloop.cpp:1536]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Cmd.exe!GuardedMain() (0x000000013fc221fb) + 15 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\launch.cpp:110]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Cmd.exe!GuardedMainWrapper() (0x000000013fc226ea) + 5 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Cmd.exe!WinMain() (0x000000013fc32219) + 17 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\windows\launchwindows.cpp:202]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Cmd.exe!__tmainCRTStartup() (0x000000013fc32d05) + 21 bytes [f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618]
UE4Editor-Cmd: 
UE4Editor-Cmd: kernel32.dll!UnknownFunction (0x0000000076f5652d) + 0 bytes [UnknownFile:0]
UE4Editor-Cmd: 
UE4Editor-Cmd: ntdll.dll!UnknownFunction (0x000000007718c521) + 0 bytes [UnknownFile:0]
UE4Editor-Cmd: 
UE4Editor-Cmd: ntdll.dll!UnknownFunction (0x000000007718c521) + 0 bytes [UnknownFile:0]
UE4Editor-Cmd: 
UE4Editor-Cmd: 
UE4Editor-Cmd: end: stack for UAT
UE4Editor-Cmd: [2015.05.21-18.31.33:006][  0]LogWindows: === Critical error: ===
UE4Editor-Cmd: 
UE4Editor-Cmd: Assertion failed: IsValid() [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.7\Engine\Source\Runtime\Core\Public\Templates\SharedPointer.h] [Line: 647] 
UE4Editor-Cmd: 
UE4Editor-Cmd: 
UE4Editor-Cmd: 
UE4Editor-Cmd: 
UE4Editor-Cmd: 
UE4Editor-Cmd: KERNELBASE.dll!UnknownFunction (0x000007fefd24a49d) + 0 bytes [UnknownFile:0]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Core.dll!FOutputDeviceWindowsError::Serialize() (0x000007fee95a8074) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\private\windows\windowsplatformoutputdevices.cpp:95]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Core.dll!FOutputDevice::Logf__VA() (0x000007fee9427878) + 159 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\private\misc\outputdevice.cpp:144]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Core.dll!FDebug::AssertFailed() (0x000007fee9408b17) + 62 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\private\misc\outputdevice.cpp:224]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Slate.dll!FSlateApplication::Get() (0x000007fee61dda9c) + 61 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\slate\public\framework\application\slateapplication.h:176]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Engine.dll!UFont::GetMaxCharHeight() (0x000007fee6d3b412) + 6 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\font.cpp:288]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Engine.dll!UTextRenderComponent::CalcBounds() (0x000007fee72cdd92) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\textrendercomponent.cpp:786]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Engine.dll!USceneComponent::UpdateBounds() (0x000007fee70b4f46) + 21 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\scenecomponent.cpp:439]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Engine.dll!USceneComponent::UpdateComponentToWorldWithParent() (0x000007fee70b56e5) + 21 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\scenecomponent.cpp:115]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Engine.dll!USceneComponent::DetachFromParent() (0x000007fee707cccb) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\scenecomponent.cpp:1129]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Engine.dll!USceneComponent::AttachTo() (0x000007fee70728a9) + 15 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\scenecomponent.cpp:934]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Engine.dll!USceneComponent::OnRegister() (0x000007fee709b304) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\scenecomponent.cpp:130]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Engine.dll!UPrimitiveComponent::OnRegister() (0x000007fee7040a3e) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\primitivecomponent.cpp:305]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Engine.dll!UActorComponent::ExecuteRegisterEvents() (0x000007fee6b21490) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\actorcomponent.cpp:945]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Engine.dll!UActorComponent::RegisterComponentWithWorld() (0x000007fee6b59b0e) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\actorcomponent.cpp:749]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Engine.dll!AActor::IncrementalRegisterComponents() (0x000007fee6b47d6d) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\actor.cpp:3276]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Engine.dll!ULevel::IncrementalUpdateComponents() (0x000007fee6ec37d3) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\level.cpp:720]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Engine.dll!UWorld::PreSaveRoot() (0x000007fee73e25e0) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\world.cpp:597]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-CoreUObject.dll!UPackage::SavePackage() (0x000007fee9d3d555) + 16 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\savepackage.cpp:2529]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-UnrealEd.dll!UEditorEngine::SavePackage() (0x000007fee4658411) + 115 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\editor.cpp:4416]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-UnrealEd.dll!UCookCommandlet::SaveCookedPackage() (0x000007fee4bad7cf) + 110 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\commandlets\cookcommandlet.cpp:455]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-UnrealEd.dll!UCookCommandlet::Cook() (0x000007fee4b5fde9) + 62 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\commandlets\cookcommandlet.cpp:1344]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-UnrealEd.dll!UCookCommandlet::Main() (0x000007fee4b907c8) + 5 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\commandlets\cookcommandlet.cpp:578]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Cmd.exe!FEngineLoop::PreInit() (0x000000013fc2ba3a) + 96 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\launchengineloop.cpp:1536]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Cmd.exe!GuardedMain() (0x000000013fc221fb) + 15 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\launch.cpp:110]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Cmd.exe!GuardedMainWrapper() (0x000000013fc226ea) + 5 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Cmd.exe!WinMain() (0x000000013fc32219) + 17 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\windows\launchwindows.cpp:202]
UE4Editor-Cmd: 
UE4Editor-Cmd: UE4Editor-Cmd.exe!__tmainCRTStartup() (0x000000013fc32d05) + 21 bytes [f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618]
UE4Editor-Cmd: 
UE4Editor-Cmd: kernel32.dll!UnknownFunction (0x0000000076f5652d) + 0 bytes [UnknownFile:0]
UE4Editor-Cmd: 
UE4Editor-Cmd: ntdll.dll!UnknownFunction (0x000000007718c521) + 0 bytes [UnknownFile:0]
UE4Editor-Cmd: 
UE4Editor-Cmd: ntdll.dll!UnknownFunction (0x000000007718c521) + 0 bytes [UnknownFile:0]
UE4Editor-Cmd: 
UE4Editor-Cmd: 
UE4Editor-Cmd: 
UE4Editor-Cmd: 
UE4Editor-Cmd: [2015.05.21-18.31.33:014][  0]LogExit: Executing StaticShutdownAfterError
UE4Editor-Cmd: [2015.05.21-18.31.33:021][  0]LogWindows: FPlatformMisc::RequestExit(1)
CommandUtils.Run: Run: Took 33.130895s to run UE4Editor-Cmd.exe, ExitCode=3
Project.Cook: Cook failed. Deleting cooked data.
ErrorReporter.Error: AutomationTool error: Cook failed.
BuildCommand.Execute: BUILD FAILED
Program.Main: AutomationTool terminated with exception:
Program.Main: Exception in AutomationScripts.Automation: BUILD FAILED: Failed while running Cook for D:\unreal\Perseids\Perseids.uproject; see log C:\Users\nawrot\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+unreal+Epic+Games+4.7\Cook.txt
Stacktrace:    at Project.Cook(ProjectParams Params)
   at BuildCookRun.DoBuildCookRun(ProjectParams Params)
   at BuildCommand.Execute()
   at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
   at AutomationTool.Automation.Process(String[] CommandLine)
   at AutomationTool.Program.MainProc(Object Param)
   at AutomationTool.InternalUtils.RunSingleInstance(MainProc Main, Object Param)
   at AutomationTool.Program.Main()
Program.Main: BUILD FAILED: Failed while running Cook for D:\unreal\Perseids\Perseids.uproject; see log C:\Users\nawrot\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+unreal+Epic+Games+4.7\Cook.txt
ProcessManager.KillAll: Trying to kill 0 spawned processes.
Program.Main: AutomationTool exiting with ExitCode=25

I’m getting a similar assert with FSlateApplication::Get while cooking. How did you resolve?

My issue was that I have an editor-only plugin that accessed FSlateApplication::Get within its StartupModule. To resolve I wrapped the code with…

if (!IsRunningCommandlet())

… which appears to be what UnrealEngine does for a few of its plugins.

This was memory leak in 4.7 if i remember. Upgrading to new major version resolved it. In new major build i could find blueprint that cause it. IT was very simple one, it traced aiming direction of player and moved plane mesh there, but then got corrupted somehow. So after finding it out i just deleted that blueprint, was not easy however as any clicking on it caused crash. But because it was memory leak and they depend on where the are allocated in memory loading project on another PC allowed me to delete that BP. But with memory leak you never know.