# Searching the default UE4 save path crashes the engine

**URL:** <https://forums.unrealengine.com/t/searching-the-default-ue4-save-path-crashes-the-engine/338644>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [November 16, 2015, 12:39pm UTC](https://forums.unrealengine.com/t/searching-the-default-ue4-save-path-crashes-the-engine/338644 "2015-11-16T12:39:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![robbiecooper](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@robbiecooper](https://forums.unrealengine.com/u/robbiecooper)\
**Post date:** [November 16, 2015, 12:39pm UTC](https://forums.unrealengine.com/t/searching-the-default-ue4-save-path-crashes-the-engine/338644/1 "2015-11-16T12:39:19Z")

</div>

Hi All

I’m assuming this is a bug;

If I try and use an object library to locate asset registry exposed properties of save files, the engine crashes immediately. I’m writing this;

```
UObjectLibrary* MetaSaveLibrary = UObjectLibrary::CreateLibrary(URRMetaSaveGame::StaticClass(), false, GIsEditor);
MetaSaveLibrary->AddToRoot();

MetaSaveLibrary->LoadAssetDataFromPath(TEXT("/Saved/SaveGames"));

```

This location has two .sav files in it, which the engine put there using the UGameplayStatics function. I got the “Path does not map to any roots error”…

Thanks!

EDIT:  
Unknown exception - code 00000001 (first/second chance not available)

```
"Fatal error: [File:C:\Users\Robbie\Documents\GitHub\UnrealEngine\Engine\Source\Runtime\CoreUObject\Private\Misc\PackageName.cpp] [Line: 345] 
LongPackageNameToFilename fail

UE4Editor_Core!FDebug::AssertFailed() [c:\users\robbie\documents\github\unrealengine\engine\source\runtime\core\private\misc\outputdevice.cpp:374]
UE4Editor_CoreUObject!FPackageName::LongPackageNameToFilename() [c:\users\robbie\documents\github\unrealengine\engine\source\runtime\coreuobject\private\misc\packagename.cpp:347]
UE4Editor_AssetRegistry!FAssetDataGatherer::DiscoverFilesToSearch() [c:\users\robbie\documents\github\unrealengine\engine\source\runtime\assetregistry\private\assetdatagatherer.cpp:379]
UE4Editor_AssetRegistry!FAssetDataGatherer::Run() [c:\users\robbie\documents\github\unrealengine\engine\source\runtime\assetregistry\private\assetdatagatherer.cpp:96]
UE4Editor_AssetRegistry!FAssetDataGatherer::FAssetDataGatherer() [c:\users\robbie\documents\github\unrealengine\engine\source\runtime\assetregistry\private\assetdatagatherer.cpp:34]
UE4Editor_AssetRegistry!FAssetRegistry::ScanPathsSynchronous_Internal() [c:\users\robbie\documents\github\unrealengine\engine\source\runtime\assetregistry\private\assetregistry.cpp:1654]
UE4Editor_Engine!UObjectLibrary::LoadAssetDataFromPaths() [c:\users\robbie\documents\github\unrealengine\engine\source\runtime\engine\private\objectlibrary.cpp:303]
UE4Editor_Engine!UObjectLibrary::LoadAssetDataFromPath() [c:\users\robbie\documents\github\unrealengine\engine\source\runtime\engine\classes\engine\objectlibrary.h:139]
UE4Editor_ErrorRepro!AErrorReproGameMode::PopulateSaveList() [c:\users\robbie\documents\unreal projects\errorrepro\source\errorrepro\errorreprogamemode.cpp:28]
UE4Editor_Engine!UWorld::BeginPlay() [c:\users\robbie\documents\github\unrealengine\engine\source\runtime\engine\private\world.cpp:3082]
UE4Editor_Engine!UGameInstance::StartPIEGameInstance() [c:\users\robbie\documents\github\unrealengine\engine\source\runtime\engine\private\gameinstance.cpp:274]
UE4Editor_UnrealEd!UEditorEngine::CreatePIEGameInstance() [c:\users\robbie\documents\github\unrealengine\engine\source\editor\unrealed\private\playlevel.cpp:3012]
UE4Editor_UnrealEd!UEditorEngine::PlayInEditor() [c:\users\robbie\documents\github\unrealengine\engine\source\editor\unrealed\private\playlevel.cpp:2259]
UE4Editor_UnrealEd!UEditorEngine::StartQueuedPlayMapRequest() [c:\users\robbie\documents\github\unrealengine\engine\source\editor\unrealed\private\playlevel.cpp:1048]
UE4Editor_UnrealEd!UEditorEngine::Tick() [c:\users\robbie\documents\github\unrealengine\engine\source\editor\unrealed\private\editorengine.cpp:1244]
UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [c:\users\robbie\documents\github\unrealengine\engine\source\editor\unrealed\private\unrealedengine.cpp:361]
UE4Editor!FEngineLoop::Tick() [c:\users\robbie\documents\github\unrealengine\engine\source\runtime\launch\private\launchengineloop.cpp:2427]
UE4Editor!GuardedMain() [c:\users\robbie\documents\github\unrealengine\engine\source\runtime\launch\private\launch.cpp:142]
UE4Editor!GuardedMainWrapper() [c:\users\robbie\documents\github\unrealengine\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() [c:\users\robbie\documents\github\unrealengine\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]
UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264]
kernel32
ntdll
```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [November 16, 2015, 4:06pm UTC](https://forums.unrealengine.com/t/searching-the-default-ue4-save-path-crashes-the-engine/338644/2 "2015-11-16T16:06:48Z")

</div>

Hey robbiecooper-

Are you referring to saving a project or trying to save a game? If you’re able to reproduce this in a new project can you project the sample or project and/or list the steps you used? Additionally, can you provide the callstack and log files from the crash for more information.

Cheers

---

<div class="post-metadata">

**Author:** ![robbiecooper](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@robbiecooper](https://forums.unrealengine.com/u/robbiecooper)\
**Post date:** [November 17, 2015, 11:00am UTC](https://forums.unrealengine.com/t/searching-the-default-ue4-save-path-crashes-the-engine/338644/3 "2015-11-17T11:00:58Z")

</div>

Hi , I’ve edited the question to show the call stack. I have a project for error repros and have reproduced it in that. I’m uploading it to dropbox and sending a link to your forum account. .

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [November 17, 2015, 2:30pm UTC](https://forums.unrealengine.com/t/searching-the-default-ue4-save-path-crashes-the-engine/338644/4 "2015-11-17T14:30:31Z")

</div>

In the sample project, is the crash when pressing play the crash you’re referring to here? I saw the DebugSaveGame class which did not have anything added to it. I created a class based on SaveGame in the same manor however I did not crash when I clicked the play button. Is there further setup required to cause the crash? Knowing how the crash is caused will help narrow down exactly where the crash is coming from.

---

<div class="post-metadata">

**Author:** ![robbiecooper](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@robbiecooper](https://forums.unrealengine.com/u/robbiecooper)\
**Post date:** [November 17, 2015, 2:34pm UTC](https://forums.unrealengine.com/t/searching-the-default-ue4-save-path-crashes-the-engine/338644/5 "2015-11-17T14:34:56Z")

</div>

Yes, thats it. If you look at the ErrorRepro game mode, the crash is being caused by these lines in PopulateSaveList function;

```
UObjectLibrary* MetaSaveLibrary = UObjectLibrary::CreateLibrary(UDebugSaveGame::StaticClass(), false, GIsEditor);
	MetaSaveLibrary->AddToRoot();
	 
	MetaSaveLibrary->LoadAssetDataFromPath(TEXT("/Saved/SaveGames"));
```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [November 17, 2015, 5:49pm UTC](https://forums.unrealengine.com/t/searching-the-default-ue4-save-path-crashes-the-engine/338644/6 "2015-11-17T17:49:29Z")

</div>

After testing the sample project and reviewing the documentation for LoadAssetDataFromPath ([https://docs.unrealengine.com/latest/INT/Programming/Assets/AsyncLoading/index.html](https://docs.unrealengine.com/latest/INT/Programming/Assets/AsyncLoading/index.html)) I noticed that the call you make to LoadAssetDataFromPath() is missing “/Game” at the beginning of the path name. Adding this and recompiling the code should fix the crash.

---

<div class="post-metadata">

**Author:** ![robbiecooper](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@robbiecooper](https://forums.unrealengine.com/u/robbiecooper)\
**Post date:** [November 20, 2015, 12:27pm UTC](https://forums.unrealengine.com/t/searching-the-default-ue4-save-path-crashes-the-engine/338644/7 "2015-11-20T12:27:58Z")

</div>

Hey , it did fix the crash. However, that isnt the default save location. The object library isnt finding anything in that location…

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [November 20, 2015, 3:20pm UTC](https://forums.unrealengine.com/t/searching-the-default-ue4-save-path-crashes-the-engine/338644/8 "2015-11-20T15:20:27Z")

</div>

I’ve entered a bug report (UE-23689) for investigation into the cause of the crash.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [February 29, 2016, 3:12pm UTC](https://forums.unrealengine.com/t/searching-the-default-ue4-save-path-crashes-the-engine/338644/9 "2016-02-29T15:12:12Z")

</div>

Hey robbiecooper,

This was returned as a ‘Won’t Fix’ as /Saved/SaveGames is not a valid UE4 path. UE4 does not define or recognize /Saved/ root folder. Valid options are:  
/Engine/  
/Game/  
/Script/  
/Temp/ ← this is the one that maps to Saved folder

Let me know if you have further questions.

Thank you,
