[PLUGIN] Savior

Hey, regarding the error, when I look at my logs, I get the same result as yours (saves normally). But when I print the values of the character in-game after loading, it doesn’t replicate the values shown in the logs.

So if I saved the structure while the X value was 75, and I lower that value, when I load the save, the value is printed out as the lower value instead of the saved value of 75.

Thanks for pointing us in the right direction. I’ve got the feature working again on our end on a very basic and stripped-down version of our master material (we did have some slight modifications in place that didn’t fully get through when we upgraded the plugin). We can now move forward again to see where the material breaks down and is not saved correctly. I will report back if the cause of the issue is worth mentioning or if it has something to do with the plugin. But I’m pretty sure it has something to do with something somewhere in our material asset (possibly broken by Epic by upgrading to 5.0)

So if I saved the structure while the X value was 75, and I lower that value, when I load the save, the value is printed out as the lower value instead of the saved value of 75.

I will keep investigating this.
No idea so far.

Hi Bruno,

After spending some more time investigating the issue, I finally found the culprit. You are in fact able to save up to one Scalar, Vector, and Texture parameter; because they all share the same ID generated per their respective arrays, counting as one unique ID per array: “00000000000000000000000000000000”

I found that the Guid’s provided and generated by Epic in the below code are currently broken.

	Instance->GetAllScalarParameterInfo(ScalarInfo,ScalarID);
	Instance->GetAllVectorParameterInfo(VectorInfo,VectorID);
	Instance->GetAllTextureParameterInfo(TextureInfo,TextureID);

When testing an empty material built from scratch in UE5.0 and implementing for example 7 scalar parameters as a test case trying to save the material, results in the following output inside a Packaged game:

SaviorLog: Warning: {S}:: ScalarID Num: "7", ScalarInfo Num: "7"
SaviorLog: Warning: {S}:: Scalar ID: "00000000000000000000000000000000"
SaviorLog: Warning: {S}:: Scalar ID: "00000000000000000000000000000000"
SaviorLog: Warning: {S}:: Scalar ID: "00000000000000000000000000000000"
SaviorLog: Warning: {S}:: Scalar ID: "00000000000000000000000000000000"
SaviorLog: Warning: {S}:: Scalar ID: "00000000000000000000000000000000"
SaviorLog: Warning: {S}:: Scalar ID: "00000000000000000000000000000000"
SaviorLog: Warning: {S}:: Scalar ID: "00000000000000000000000000000000"
SaviorLog: Warning: {S}:: ScalarID Num: "7", ScalarInfo Num: "7"
SaviorLog: Warning: {S}:: Scalar ID: "00000000000000000000000000000000"
SaviorLog: Warning: {S}:: Scalar ID: "00000000000000000000000000000000"
SaviorLog: Warning: {S}:: Scalar ID: "00000000000000000000000000000000"
SaviorLog: Warning: {S}:: Scalar ID: "00000000000000000000000000000000"
SaviorLog: Warning: {S}:: Scalar ID: "00000000000000000000000000000000"
SaviorLog: Warning: {S}:: Scalar ID: "00000000000000000000000000000000"
SaviorLog: Warning: {S}:: Scalar ID: "00000000000000000000000000000000"
SaviorLog: Warning: {S}:: ScalarID Num: "7", ScalarInfo Num: "7"
SaviorLog: Warning: {S}:: Scalar ID: "00000000000000000000000000000000"
SaviorLog: Warning: {S}:: Scalar ID: "00000000000000000000000000000000"
SaviorLog: Warning: {S}:: Scalar ID: "00000000000000000000000000000000"
SaviorLog: Warning: {S}:: Scalar ID: "00000000000000000000000000000000"
SaviorLog: Warning: {S}:: Scalar ID: "00000000000000000000000000000000"
SaviorLog: Warning: {S}:: Scalar ID: "00000000000000000000000000000000"
SaviorLog: Warning: {S}:: Scalar ID: "00000000000000000000000000000000"
SaviorLog: Warning: {S}:: ScalarID Num: "7", ScalarInfo Num: "7"
SaviorLog: Warning: {S}:: Scalar ID: "00000000000000000000000000000000"
SaviorLog: Warning: {S}:: Scalar ID: "00000000000000000000000000000000"
SaviorLog: Warning: {S}:: Scalar ID: "00000000000000000000000000000000"
SaviorLog: Warning: {S}:: Scalar ID: "00000000000000000000000000000000"
SaviorLog: Warning: {S}:: Scalar ID: "00000000000000000000000000000000"
SaviorLog: Warning: {S}:: Scalar ID: "00000000000000000000000000000000"
SaviorLog: Warning: {S}:: Scalar ID: "00000000000000000000000000000000"

Whereas in Editor the below code is generated, which is what would be expected to also happen in a Packaged game.

SaviorLog: Warning: {S}:: ScalarID Num: "7", ScalarInfo Num: "7"
SaviorLog: Warning: {S}:: Scalar ID: "0081561F42B1C56D2AA7F2984C24DF03"
SaviorLog: Warning: {S}:: Scalar ID: "67CB1E9D45FAD6EA879B4F84D2FD7FFA"
SaviorLog: Warning: {S}:: Scalar ID: "531021614294A0B88CF2118AF60BD53C"
SaviorLog: Warning: {S}:: Scalar ID: "F91C142C4DD0F7B794031598FF242A1E"
SaviorLog: Warning: {S}:: Scalar ID: "ADF9E26543A79FD41DA7038C69614165"
SaviorLog: Warning: {S}:: Scalar ID: "9561D6FF46D6F572E76210866657898E"
SaviorLog: Warning: {S}:: Scalar ID: "C3FB00D94AC4D052DFF73599F63E678A"
SaviorLog: Warning: {S}:: ScalarID Num: "7", ScalarInfo Num: "7"
SaviorLog: Warning: {S}:: Scalar ID: "0081561F42B1C56D2AA7F2984C24DF03"
SaviorLog: Warning: {S}:: Scalar ID: "67CB1E9D45FAD6EA879B4F84D2FD7FFA"
SaviorLog: Warning: {S}:: Scalar ID: "531021614294A0B88CF2118AF60BD53C"
SaviorLog: Warning: {S}:: Scalar ID: "F91C142C4DD0F7B794031598FF242A1E"
SaviorLog: Warning: {S}:: Scalar ID: "ADF9E26543A79FD41DA7038C69614165"
SaviorLog: Warning: {S}:: Scalar ID: "9561D6FF46D6F572E76210866657898E"
SaviorLog: Warning: {S}:: Scalar ID: "C3FB00D94AC4D052DFF73599F63E678A"
SaviorLog: Warning: {S}:: ScalarID Num: "7", ScalarInfo Num: "7"
SaviorLog: Warning: {S}:: Scalar ID: "0081561F42B1C56D2AA7F2984C24DF03"
SaviorLog: Warning: {S}:: Scalar ID: "67CB1E9D45FAD6EA879B4F84D2FD7FFA"
SaviorLog: Warning: {S}:: Scalar ID: "531021614294A0B88CF2118AF60BD53C"
SaviorLog: Warning: {S}:: Scalar ID: "F91C142C4DD0F7B794031598FF242A1E"
SaviorLog: Warning: {S}:: Scalar ID: "ADF9E26543A79FD41DA7038C69614165"
SaviorLog: Warning: {S}:: Scalar ID: "9561D6FF46D6F572E76210866657898E"
SaviorLog: Warning: {S}:: Scalar ID: "C3FB00D94AC4D052DFF73599F63E678A"
SaviorLog: Warning: {S}:: ScalarID Num: "7", ScalarInfo Num: "7"
SaviorLog: Warning: {S}:: Scalar ID: "0081561F42B1C56D2AA7F2984C24DF03"
SaviorLog: Warning: {S}:: Scalar ID: "67CB1E9D45FAD6EA879B4F84D2FD7FFA"
SaviorLog: Warning: {S}:: Scalar ID: "531021614294A0B88CF2118AF60BD53C"
SaviorLog: Warning: {S}:: Scalar ID: "F91C142C4DD0F7B794031598FF242A1E"
SaviorLog: Warning: {S}:: Scalar ID: "ADF9E26543A79FD41DA7038C69614165"
SaviorLog: Warning: {S}:: Scalar ID: "9561D6FF46D6F572E76210866657898E"
SaviorLog: Warning: {S}:: Scalar ID: "C3FB00D94AC4D052DFF73599F63E678A"

Regardless of this being something broken by Epic, is this something you would be able to look into and apply a possible fix until Epic resolves this issue? :eyes:

Thanks for your help!

I will investigate how I can possibly work around this problem maybe creating mat IDs myself.

1 Like

Hi Bruno,

Have you had the time to look into this issue yet?

Perhaps it is possible to create a hashed Guid based on the parameter name, and use that as a substitute ID for the time being instead of the broken Epic Guid’s. Just throwing around idea’s. :slight_smile:

I took a look today, and yeah, Epic has changed material parameters Guids to be EDITOR_ONLY now.

I will generate some runtime Ids by myself and see if it works.

I have submitted an attempt patch to workaround this engine problem.
If you keep having this issue after plugin v4.1.5 for UE5 please let me know.

Awesome! thank you very much! I will report back asap :slight_smile:

It appears to have fixed the issue succesfully. :slight_smile: However, I couldn’t test the Vectors and the Texture’s since they dont include the ParseGUIDfromHASH fix in the Capture and Restore functions. But I’m pretty sure they work too once the fix is added there too since Scalars are working fine again. :smiley:

If it’s working correctly then I will go on and change all params to use it. Thanks for checking.

1 Like

When entering a new area/level of my game I want to perform two saves (in C++) at the same time with two different SlotFileName: 1. an auto-save on entering a new area/level; 2. a current game progress save.
Is there an elegant way to do this with Savior without having to call SaveGameWorld() twice directly after one another? Ideally, I want to make a copy of one of the Savior save games on the disk and rename it.

From C++ you can take a look at these functions then probably put together a method to do that what you need.

In Savior.cpp:

FCoreUObjectDelegates::PostLoadMapWithWorld.AddUObject(StaticSlot,&USavior::StaticLoadGameWorld);
USavior* USavior::ShadowCopySlot(USavior* From, USavior* To, ESaviorResult &Result);
void USavior::WriteSlotToFile(const int32 PlayerID, ESaviorResult &Result);
1 Like

hi all the demo doesnt work, even compiling it

free demo project does not include the paid plugin.

Hi

can i try a comiled version of this, if it fits my project?

We’ve noticed an elusive issue in our game that occurs during saving and causes the game to freeze (no high CPU or GPU usage though). After tracing it down, it looks like using SaveGameWorld can deadlock during garbage collection. We have an object with gameplay attributes that is being serialized by Savior->SaveObjectHierarchy, but it deadlocks when running ForEachObjectWithOuter when it sets up a HashLock. We’ve semi-patched the issue by adding IsGarbageCollecting() to the checks at the top of SaveObjectHeirarchy, but this is less than ideal because the save itself gets corrupted and still reports a success overall.

We’re on Unreal 4.27.2 and using Savior 3.9.3. Is this issue known and/or fixed in the recent version of Savior? Thanks!

This is not reported by anyone before you.
Would be great to have on my email a stack trace.

Hi!

When I restart the editor, or packaged game, the saves are missing.


Am I saving it the right way?

*and getting this error

     **Load fired from begin play

In packaged:

Assertion failed: IsInGameThread() [File:D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp] [Line: 1150] 
Unable to load /Game/Levels/LV_1/LV_1. Objects and Packages can only be loaded from the game thread.


0x00007ff770b6290e Building-Win64-DebugGame.exe!LoadPackageInternal() []
0x00007ff770b62514 Building-Win64-DebugGame.exe!LoadPackage() []
0x00007ff770b84a51 Building-Win64-DebugGame.exe!StaticLoadObjectInternal() []
0x00007ff770b83e92 Building-Win64-DebugGame.exe!StaticLoadObject() []
0x00007ff770aabee1 Building-Win64-DebugGame.exe!FObjectPropertyBase::FindImportedObject() []
0x00007ff770abfff9 Building-Win64-DebugGame.exe!FObjectPropertyBase::ParseObjectPropertyValue() []
0x00007ff770abae7c Building-Win64-DebugGame.exe!FObjectProperty::ImportText_Internal() []
0x00007ff76ed6f0fb Building-Win64-DebugGame.exe!FProperty::ImportText() []
0x00007ff7748ac4bb Building-Win64-DebugGame.exe!TCommonDelegateInstanceState<TSharedPtr<FJsonValue,1> __cdecl(FProperty * __ptr64,void const * __ptr64),FDefaultDelegateUserPolicy>::`vector deleting destructor'() []
0x00007ff7748adf80 Building-Win64-DebugGame.exe!FJsonObjectConverter::JsonObjectToUStruct() []
0x00007ff7748ad951 Building-Win64-DebugGame.exe!FJsonObjectConverter::JsonAttributesToUStruct() []
0x00007ff7748abc0d Building-Win64-DebugGame.exe!TCommonDelegateInstanceState<TSharedPtr<FJsonValue,1> __cdecl(FProperty * __ptr64,void const * __ptr64),FDefaultDelegateUserPolicy>::`vector deleting destructor'() []
0x00007ff7748adf80 Building-Win64-DebugGame.exe!FJsonObjectConverter::JsonObjectToUStruct() []
0x00007ff7748ae1ad Building-Win64-DebugGame.exe!FJsonObjectConverter::JsonValueToUProperty() []
0x00007ff76f8434ea Building-Win64-DebugGame.exe!Reflector::JSONToFProperty() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\Savior\Source\Savior\Private\Reflector.cpp:1190]
0x00007ff76f86eb9c Building-Win64-DebugGame.exe!USavior::UnpackRecord_Object() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\Savior\Source\Savior\Private\Savior.cpp:1871]
0x00007ff76f845c06 Building-Win64-DebugGame.exe!USavior::LoadActor() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\Savior\Source\Savior\Private\Savior.cpp:787]
0x00007ff76f823b4f Building-Win64-DebugGame.exe!DeserializeGameWorld() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\Savior\Source\Savior\Public\Savior.h:1330]
0x00007ff76f827426 Building-Win64-DebugGame.exe!FAutoDeleteAsyncTask<TASK_DeserializeGameWorld>::DoWork() [D:\RocketSync\5.0.0-19505902+++UE5+Release-5.0\Working\Engine\Source\Runtime\Core\Public\Async\AsyncWork.h:110]
0x00007ff76e9deafc Building-Win64-DebugGame.exe!<lambda_925f6c2453012060ddab4eb171196a20>::operator()() []
0x00007ff76e9e354e Building-Win64-DebugGame.exe!LowLevelTasks::TTaskDelegate<void __cdecl(bool),48>::TTaskDelegateImpl<<lambda_925f6c2453012060ddab4eb171196a20>,0>::CallAndMove() []
0x00007ff770124166 Building-Win64-DebugGame.exe!LowLevelTasks::FTask::ExecuteTask() []
0x00007ff77010cc8d Building-Win64-DebugGame.exe!LowLevelTasks::FScheduler::TryExecuteTaskFrom<&LowLevelTasks::TLocalQueueRegistry<1024>::TLocalQueue::DequeueGlobal,0>() []
0x00007ff7701427e2 Building-Win64-DebugGame.exe!LowLevelTasks::FScheduler::WorkerMain() []
0x00007ff7701166e0 Building-Win64-DebugGame.exe!UE::Core::Private::Function::TFunctionRefCaller<<lambda_3277f5600efe2aa6f5f67d459ec105a9>,unsigned __int64 __cdecl(unsigned __int64)>::Call() []
0x00007ff77025c425 Building-Win64-DebugGame.exe!FThreadImpl::Run() []
0x00007ff77077f71b Building-Win64-DebugGame.exe!FRunnableThreadWin::Run() []
0x00007ff770778390 Building-Win64-DebugGame.exe!FRunnableThreadWin::GuardedRun() []
0x00007ffcf7467034 KERNEL32.DLL!UnknownFunction []
0x00007ffcf7ac26a1 ntdll.dll!UnknownFunction []

Crash in runnable thread Background Worker #4

In editor

UnrealEditor_JsonUtilities
UnrealEditor_Savior!Reflector::JSONToFProperty() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\Savior\Source\Savior\Private\Reflector.cpp:1190]
UnrealEditor_Savior!USavior::UnpackRecord_Object() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\Savior\Source\Savior\Private\Savior.cpp:1871]
UnrealEditor_Savior!USavior::LoadActor() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\Savior\Source\Savior\Private\Savior.cpp:787]
UnrealEditor_Savior!DeserializeGameWorld() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\Savior\Source\Savior\Public\Savior.h:1330]
UnrealEditor_Savior!FAutoDeleteAsyncTask<TASK_DeserializeGameWorld>::DoWork() [D:\RocketSync\5.0.0-19505902+++UE5+Release-5.0\Working\Engine\Source\Runtime\Core\Public\Async\AsyncWork.h:110]
Assertion failed: IsInGameThread() [File:D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp] [Line: 1150] Unable to load /Game/Levels/LV_1/UEDPIE_0_LV_1. Objects and Packages can only be loaded from the game thread.

Please tell which engine version you’re running.