GatherText assertion failed SharedPointer isValid()

We have written a project on UE4.12 on windows platform. This project is used as a plugin. Everything worked fine so we tried to localize it into Chinese/Dutch. However, when I tried to gather text, no matter if I used the command line or did it directly through UE editor localization dashboard, I encountered the same error. which says:

[2016.06.14-06.25.17:357][ 0]LogWindows:Error: === Critical error: ===

Assertion failed: IsValid() [File:F:\workspace\unreal_gritworld\Engine\Source\Runtime\Core\Public\Templates\SharedPointer.h] [Line: 728]

here is a screenshot:

the .ini file under my game/config/localization looks like this:

[CommonSettings]
SourcePath=Content/Localization/NewTarget
DestinationPath=Content/Localization/NewTarget
ManifestName=NewTarget.manifest
ArchiveName=NewTarget.archive
NativeCulture=en
CulturesToGenerate=en
CulturesToGenerate=nl-BE
CulturesToGenerate=zh-CN

[GatherTextStep0]
CommandletClass=GatherTextFromSource
SearchDirectoryPaths=Source
ExcludePathFilters=Config/Localization/*
FileNameFilters=*.h
FileNameFilters=*.cpp
FileNameFilters=*.ini
ShouldGatherFromEditorOnlyData=false

[GatherTextStep1]
CommandletClass=GatherTextFromAssets
ExcludePathFilters=Content/Localization/*
ExcludePathFilters=Content/L10N/*
PackageFileNameFilters=*.umap
PackageFileNameFilters=*.uasset
ShouldGatherFromEditorOnlyData=false
SkipGatherCache=false

[GatherTextStep2]
CommandletClass=GenerateGatherManifest

[GatherTextStep3]
CommandletClass=GenerateGatherArchive

[GatherTextStep4]
CommandletClass=GenerateTextLocalizationReport
bWordCountReport=true
WordCountReportName=NewTarget.csv
bConflictReport=true
ConflictReportName=NewTarget_Conflicts.txt

The full error log is (run from command line under game folder):
/UE4Editor.exe /mygame.uproject -Run=GatherText -config=“Config\Localization\NewTarget_Gather.ini” -log > localization.log

[2016.06.14-07.45.02:962][  0]LogShaderCompilers:Display: Using Local Shader Compiler.
[2016.06.14-07.45.03:720][  0]LogTemp:Display: Loaded TP WindowsTargetPlatform
[2016.06.14-07.45.03:727][  0]LogTemp:Display: Loaded TP WindowsNoEditorTargetPlatform
[2016.06.14-07.45.03:733][  0]LogTemp:Display: Loaded TP WindowsServerTargetPlatform
[2016.06.14-07.45.03:740][  0]LogTemp:Display: Loaded TP WindowsClientTargetPlatform
[2016.06.14-07.45.03:746][  0]LogTemp:Display: Loaded TP AllDesktopTargetPlatform
[2016.06.14-07.45.03:753][  0]LogTemp:Display: Loaded TP AndroidTargetPlatform
[2016.06.14-07.45.03:759][  0]LogTemp:Display: Loaded TP Android_PVRTCTargetPlatform
[2016.06.14-07.45.03:765][  0]LogTemp:Display: Loaded TP Android_ATCTargetPlatform
[2016.06.14-07.45.03:772][  0]LogTemp:Display: Loaded TP Android_DXTTargetPlatform
[2016.06.14-07.45.03:778][  0]LogTemp:Display: Loaded TP Android_ETC1TargetPlatform
[2016.06.14-07.45.03:784][  0]LogTemp:Display: Loaded TP Android_ETC2TargetPlatform
[2016.06.14-07.45.03:791][  0]LogTemp:Display: Loaded TP Android_ASTCTargetPlatform
[2016.06.14-07.45.03:797][  0]LogTemp:Display: Loaded TP Android_MultiTargetPlatform
[2016.06.14-07.45.03:798][  0]LogTemp:Display: Loaded TP HTML5TargetPlatform
[2016.06.14-07.45.03:820][  0]LogTemp:Display: Loaded TP IOSTargetPlatform
[2016.06.14-07.45.03:826][  0]LogTemp:Display: Loaded TP TVOSTargetPlatform
[2016.06.14-07.45.03:827][  0]LogTargetPlatformManager:Display: Building Assets For Windows
[2016.06.14-07.45.03:882][  0]LogDerivedDataCache:Display: Max Cache Size: 512 MB
[2016.06.14-07.45.03:935][  0]LogDerivedDataCache:Display: Loaded Boot cache: ../../../../gritcore/code/unreal_importer/DerivedDataCache/Boot.ddc
[2016.06.14-07.45.10:016][  0]LogWindows:Warning: CreateProc failed (2) ..\..\..\Engine\Binaries/Win64/CrashReportClient.exe  -Unattended -nullrhi -AppName=UE4-unreal_importer -CrashGUID=UE4CC-Windows-48D99F3E4DAC5D2A4AD9808BAC74EAB1_0000 -DebugSymbols=..\..\..\Engine\Intermediate\Symbols
[2016.06.14-07.45.10:020][  0]LogWindows:Error: === Critical error: ===

Assertion failed: IsValid() [File:F:\workspace\unreal_gritworld\Engine\Source\Runtime\Core\Public\Templates\SharedPointer.h] [Line: 728] 





KERNELBASE.dll

UE4Editor-Core.dll!FOutputDeviceWindowsError::Serialize() [f:\workspace\unreal_gritworld\engine\source\runtime\core\private\windows\windowsplatformoutputdevices.cpp:102]

UE4Editor-Core.dll!FOutputDevice::Logf__VA() [f:\workspace\unreal_gritworld\engine\source\runtime\core\private\misc\outputdevice.cpp:154]

UE4Editor-Core.dll!FDebug::AssertFailed() [f:\workspace\unreal_gritworld\engine\source\runtime\core\private\misc\outputdevice.cpp:440]

UE4Editor-Slate.dll!FSlateApplication::Get() [f:\workspace\unreal_gritworld\engine\source\runtime\slate\public\framework\application\slateapplication.h:157]

UE4Editor-GritCoreSync.dll

UE4Editor-GritCoreSync.dll

UE4Editor-Core.dll!FModuleManager::LoadModuleWithFailureReason() [f:\workspace\unreal_gritworld\engine\source\runtime\core\private\modules\modulemanager.cpp:480]

UE4Editor-Projects.dll!FModuleDescriptor::LoadModulesForPhase() [f:\workspace\unreal_gritworld\engine\source\runtime\projects\private\moduledescriptor.cpp:398]

UE4Editor-Projects.dll!FPluginManager::LoadModulesForEnabledPlugins() [f:\workspace\unreal_gritworld\engine\source\runtime\projects\private\pluginmanager.cpp:540]

UE4Editor.exe!FEngineLoop::LoadStartupModules() [f:\workspace\unreal_gritworld\engine\source\runtime\launch\private\launchengineloop.cpp:2163]

UE4Editor.exe!FEngineLoop::PreInit() [f:\workspace\unreal_gritworld\engine\source\runtime\launch\private\launchengineloop.cpp:1609]

UE4Editor.exe!GuardedMain() [f:\workspace\unreal_gritworld\engine\source\runtime\launch\private\launch.cpp:114]

UE4Editor.exe!GuardedMainWrapper() [f:\workspace\unreal_gritworld\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]

UE4Editor.exe!WinMain() [f:\workspace\unreal_gritworld\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:255]

KERNEL32.DLL

ntdll.dll

ntdll.dll

Has anyone had this before? or any suggestions on how to fix this? Thank you!

It appears that something from GritCoreSync is calling FSlateApplication::Get() during its module initialisation. Is that your game module?

Yes, it is my game module. Now I see FSlateApplication::Get() is called in my module class’s override function StartupModule(), so probably the static object isn’t instantiated at that point yet.
Thanks a lot, Jamie, this is helpful!