x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Calling UPackage::SavePackage() causes fatal assert in StaticFindObjectFast()

When I wrote this over a year ago, it used to work fine...

If my uasset package already exists, I can open it, change data, and save it back out and no problems. But now, if the uasset package does NOT already exist, when I call SavePackage(), I get this fatal:

Fatal error: [File:D:\phx-stream\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp] [Line: 291] Illegal call to StaticFindObjectFast() while serializing object data or garbage collecting!

I run an automation in editor in -GAME mode.

Looking at code for StaticFindObjectFast(), GIsSavingPackage is TRUE, so it immediately fails. It is trying to open Meta Data, which is null, so it wants to go look for it...

Callstack:

  UE4Editor-CoreUObject.dll!StaticFindObjectFast(UClass * ObjectClass, UObject * ObjectPackage, FName ObjectName, bool ExactClass, bool AnyPackage, EObjectFlags ExclusiveFlags, EInternalObjectFlags ExclusiveInternalFlags) Line 291    C++
  [Inline Frame] UE4Editor-CoreUObject.dll!FindObjectFast(UObject *) Line 1239    C++
  UE4Editor-CoreUObject.dll!UPackage::GetMetaData() Line 139    C++
  UE4Editor-CoreUObject.dll!TextNamespaceUtilImpl::FindOrAddPackageNamespace(UPackage * InPackage, const bool bCanAdd) Line 36    C++
  UE4Editor-CoreUObject.dll!TextNamespaceUtil::GetPackageNamespace(const UPackage * InPackage) Line 95    C++
  UE4Editor-CoreUObject.dll!FPropertyLocalizationDataGatherer::FPropertyLocalizationDataGatherer(TArray<FGatherableTextData,FDefaultAllocator> & InOutGatherableTextDataArray, const UPackage * const InPackage, EPropertyLocalizationGathererResultFlags & OutResultFlags) Line 20    C++
  UE4Editor-CoreUObject.dll!UPackage::Save(UPackage * InOuter, UObject * Base, EObjectFlags TopLevelFlags, const wchar_t * Filename, FOutputDevice * Error, FLinkerLoad * Conform, bool bForceByteSwapping, bool bWarnOfLongFilename, unsigned int SaveFlags, const ITargetPlatform * TargetPlatform, const FDateTime & FinalTimeStamp, bool bSlowTask, FArchiveDiffMap * InOutDiffMap) Line 4555    C++
  UE4Editor-CoreUObject.dll!UPackage::SavePackage(UPackage * InOuter, UObject * Base, EObjectFlags TopLevelFlags, const wchar_t * Filename, FOutputDevice * Error, FLinkerLoad * Conform, bool bForceByteSwapping, bool bWarnOfLongFilename, unsigned int SaveFlags, const ITargetPlatform * TargetPlatform, const FDateTime & FinalTimeStamp, bool bSlowTask) Line 6118    C++
 UE4Editor-Phoenix.dll!NavMeshCacheManager::SavePathMatrix() Line 3211    C++
  [Inline Frame] UE4Editor-Phoenix.dll!NavMeshCacheManager::GenerateNavMeshCache() Line 3722    C++
  UE4Editor-Phoenix.dll!GenerateNavMeshCache::Update() Line 3793    C++
  [Inline Frame] UE4Editor-Core.dll!IAutomationLatentCommand::InternalUpdate() Line 442    C++
  UE4Editor-Core.dll!FAutomationTestFramework::ExecuteLatentCommands() Line 297    C++

Steve

Product Version: UE 4.21
Tags:
more ▼

asked Apr 26 '19 at 07:51 PM in C++ Programming

avatar image

Steve Willis
1 1

avatar image Steve Willis Apr 26 '19 at 04:18 PM

It looks like I now need this:

UPackage::GetMetaData()

right after calling CreatePackage()

Steve

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question