Fatal error during save

I was launching my game on Android, after the launch completed I got this error (probably during an autosave happening concurrently with the launch? Not exactly sure what the editor was doing, I was looking at another window at the time)

This is UE4.6.1 built from source, using a blueprint-only project.

Fatal error: [File:CENSORED\UnrealEngine\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp] [Line: 120] 
Illegal call to StaticFindObject() while serializing object data!

Here’s the call stack:

UE4Editor-Core.dll!StaticFailDebug(const wchar_t * Error, const char * File, int Line, const wchar_t * Description, bool bIsEnsure) Line 190	C++
UE4Editor-Core.dll!FMsg::Logf__VA(const char * File, int Line, const FName & Category, ELogVerbosity::Type Verbosity, const wchar_t * Fmt, ...) Line 523	C++
UE4Editor-CoreUObject.dll!StaticFindObject(UClass * ObjectClass, UObject * InObjectPackage, const wchar_t * OrigInName, bool ExactClass) Line 123	C++
UE4Editor-UnrealEd.dll!UEditorEngine::PlayEditorSound(const FString & SoundAssetName) Line 1844	C++
UE4Editor-UnrealEd.dll!FLauncherNotificationTask::DoTask(ENamedThreads::Type CurrentThread, const TRefCountPtr<FGraphEvent> & MyCompletionGraphEvent) Line 1225	C++
UE4Editor-UnrealEd.dll!TGraphTask<FLauncherNotificationTask>::ExecuteTask(TArray<FBaseGraphTask *,FDefaultAllocator> & NewTasks, ENamedThreads::Type CurrentThread) Line 671	C++
UE4Editor-Core.dll!FTaskThread::ProcessTasks(int QueueIndex, bool bAllowStall) Line 428	C++
UE4Editor-Engine.dll!FFrameEndSync::Sync(bool bAllowOneFrameThreadLag) Line 7106	C++
UE4Editor-UnrealEd.dll!TickSlate() Line 312	C++
UE4Editor-UnrealEd.dll!FFeedbackContextEditor::ProgressReported(const float TotalProgressInterp, FText DisplayMessage) Line 423	C++
UE4Editor-Core.dll!FFeedbackContext::UpdateUI() Line 27	C++
UE4Editor-Core.dll!FFeedbackContext::RequestUpdateUI(bool bForceUpdate) Line 19	C++
UE4Editor-CoreUObject.dll!UPackage::SavePackage(UPackage * InOuter, UObject * Base, EObjectFlags TopLevelFlags, const wchar_t * Filename, FOutputDevice * Error, ULinkerLoad * Conform, bool bForceByteSwapping, bool bWarnOfLongFilename, unsigned int SaveFlags, const ITargetPlatform * TargetPlatform, const FDateTime & FinalTimeStamp, bool bSlowTask) Line 3404	C++
UE4Editor-UnrealEd.dll!UEditorEngine::SavePackage(UPackage * InOuter, UObject * InBase, EObjectFlags TopLevelFlags, const wchar_t * Filename, FOutputDevice * Error, ULinkerLoad * Conform, bool bForceByteSwapping, bool bWarnOfLongFilename, unsigned int SaveFlags, const ITargetPlatform * TargetPlatform, const FDateTime & FinalTimeStamp, bool bSlowTask) Line 4368	C++
UE4Editor-UnrealEd.dll!UEditorEngine::Exec_Obj(const wchar_t * Str, FOutputDevice & Ar) Line 4079	C++
UE4Editor-UnrealEd.dll!UEditorEngine::Exec(UWorld * InWorld, const wchar_t * Stream, FOutputDevice & Ar) Line 5196	C++
UE4Editor-UnrealEd.dll!UUnrealEdEngine::Exec(UWorld * InWorld, const wchar_t * Stream, FOutputDevice & Ar) Line 715	C++
UE4Editor-UnrealEd.dll!SaveWorld(UWorld * World, const FString * ForceFilename, const wchar_t * OverridePath, const wchar_t * FilenamePrefix, bool bRenamePackageToFile, bool bCheckDirty, FString & FinalFilename, bool bAutosaving, bool bPIESaving) Line 523	C++
UE4Editor-UnrealEd.dll!FEditorFileUtils::AutosaveMap(const FString & AbsoluteAutosaveDir, const int AutosaveIndex, const bool bForceIfNotInList, const TSet<TWeakObjectPtr<UPackage,FWeakObjectPtr,FIndexToObject>,DefaultKeyFuncs<TWeakObjectPtr<UPackage,FWeakObjectPtr,FIndexToObject>,0>,FDefaultSetAllocator> & DirtyPackagesForAutoSave) Line 2034	C++
UE4Editor-UnrealEd.dll!FPackageAutoSaver::AttemptAutoSave() Line 177	C++
UE4Editor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 335	C++
UE4Editor.exe!FEngineLoop::Tick() Line 2214	C++
UE4Editor.exe!GuardedMain(const wchar_t * CmdLine, HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, int nCmdShow) Line 131	C++
UE4Editor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow) Line 191	C++

Hey ryani,

Thank you posting this issue. I am going to need a bit more information before investigating. Would you be able to recreate this crash with a blank template project on 4.6.1? If so, would you be able to share those repro steps? Also, was there any log files that were produced that you may be able to share?

Any additional information would be greatly appreciated.

Thanks and have a great day!

This was a one-off crash, although I think the callstack shows pretty solidly where the problem is: Since SavePackage is slow, it updates the UI while it is running, and part of the UI update causes the editor to try to play a sound which calls StaticFindObject() to get a reference to the sound asset.

There’s a race condition between the map auto-save completing (which ends the serialization ‘lock’ on being able to call StaticFindObject()) and the target platform launch completing (which triggers the “Launch successful!” pop-up and sound effect).

One of the following seems likely to be the cause:

  1. Maybe it’s actually OK to call StaticFindObject() on editor-ui-assets during serialization so the assert and following crash are the result of too-aggressive checking of safety.
  2. Maybe the UI shouldn’t be ticked during serialization when the system is in an ‘unsafe to do arbitrary work’ state (although it would be unresponsive instead, which is also bad)
  3. Maybe the UI shouldn’t be using StaticFindObject to get its data during regular ticks and instead fetch all needed objects during startup or some other ‘safe’ time.

Howdy ryani,

Would you be able to attach your DXdiag to this post? Also, any full logs that my reference this error. This will be beneficial when writing up the report for this crash.


Hey ryani,

Just wanted to check in with you and see if you got my last comment? In order for me to put a bug report into our database, I am going to need a DXdiag to attach to the ticket since I am unable to reproduce this issue internally.


Here you go , although I don’t think it will be much help.

Hey ryani,

Thank you again for providing additional information. I have written up Jira ticket 9148 based off this crash so that it may be addressed in a future release. Please let me know if you have any additional questions.

Thanks and have a great day!