PipeRift / SaveExtension

Provides UE4 with a save-game system with support for savegame tags, level streaming and more
Apache License 2.0
164 stars 60 forks source link

Assertion failed: IsInGameThread() #83

Open irjayjay opened 1 year ago

irjayjay commented 1 year ago

Describe the bug In my game I have some saved games previously saved using the Save Slot by Id blueprint node from the SaveManager. When I run the Load Slot by Info node, I receive the below crash.

The code is running inside my player controller, in a custom event I created. This event is executed from a UMG widget. It was previously located right in the UMG widget blueprint itself, but I thought the error was caused by the widget destroying itself shortly after running save.

I'm sure there's something I'm not getting about how to run these methods in an async environment or something.

To Reproduce Steps to reproduce the behavior:

  1. Save a game using the Save Slot by Id blueprint node.
  2. Load a game using the Load Slot by Info node. Note, this runs inside a delegate custom event, if that matters.

Logs

Assertion failed: IsInGameThread() [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/CoreUObject/Private/UObject/UObjectGlobals.cpp] [Line: 1096] Unable to load /Engine/Transient. Objects and Packages can only be loaded from the game thread.

UE4Editor_Core
UE4Editor_Core
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_Core
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_SaveExtension!FSaveFile::CreateAndDeserializeInfo() [D:\DEV\GAMES\Alpha Project 4.27\Plugins\SaveExtension\Source\SaveExtension\Private\FileAdapter.cpp:215]
UE4Editor_SaveExtension!FLoadFileTask::DoWork() [D:\DEV\GAMES\Alpha Project 4.27\Plugins\SaveExtension\Source\SaveExtension\Public\Multithreading\LoadFileTask.h:48]
UE4Editor_SaveExtension!FAsyncTask<FLoadFileTask>::DoWork() [C:\Program Files\Epic Games\UE_4.27\Engine\Source\Runtime\Core\Public\Async\AsyncWork.h:272]
UE4Editor_SaveExtension!FAsyncTask<FLoadFileTask>::DoThreadedWork() [C:\Program Files\Epic Games\UE_4.27\Engine\Source\Runtime\Core\Public\Async\AsyncWork.h:296]
UE4Editor_Core
UE4Editor_Core
UE4Editor_Core
kernel32
ntdll

Environment (please complete the following information):

Crossroad1000 commented 1 year ago

I'm having the same issue here. In the editor, it all works perfectly, but when I'm building my game it crashes and gives me this error. Any solution found to fix this?