NRE when deleting save

FranticDan

Well-known member
The hasn't happened to me, but when people play my mod, and they delete their previous save, they get an error saying the game can't locate the save folder that they just deleted.
Is this a known issue? Is there a way to prevent this from happening?

 
Picture is not readable.
I wish the error text was orange instead, red always blurs for some reason

Yeah a log file and what your mod does would be helpful ^^
Finally got it to happen to me so now I got a log for it. Turns out its caused by the manual saving code

DirectoryNotFoundException: Could not find a part of the path 'C:\Users\danie\AppData\Roaming\7DaysToDie\Saves\Spencer Mansion Incident\delete me'. at System.IO.Enumeration.FileSystemEnumerator`1[TResult].CreateDirectoryHandle (System.String path, System.Boolean ignoreNotFound) [0x0004d] in <467a840a914a47078e4ae9b0b1e8779e>:0 at System.IO.Enumeration.FileSystemEnumerator`1[TResult]..ctor (System.String directory, System.IO.EnumerationOptions options) [0x00050] in <467a840a914a47078e4ae9b0b1e8779e>:0 at System.IO.Enumeration.FileSystemEnumerable`1+DelegateEnumerator[TResult]..ctor (System.IO.Enumeration.FileSystemEnumerable`1[TResult] enumerable) [0x00000] in <467a840a914a47078e4ae9b0b1e8779e>:0 at System.IO.Enumeration.FileSystemEnumerable`1[TResult]..ctor (System.String directory, System.IO.Enumeration.FileSystemEnumerable`1+FindTransform[TResult] transform, System.IO.EnumerationOptions options) [0x00042] in <467a840a914a47078e4ae9b0b1e8779e>:0 at System.IO.Enumeration.FileSystemEnumerableFactory.DirectoryInfos (System.String directory, System.String expression, System.IO.EnumerationOptions options) [0x00014] in <467a840a914a47078e4ae9b0b1e8779e>:0 at System.IO.DirectoryInfo.InternalEnumerateInfos (System.String path, System.String searchPattern, System.IO.SearchTarget searchTarget, System.IO.EnumerationOptions options) [0x0002e] in <467a840a914a47078e4ae9b0b1e8779e>:0 at System.IO.DirectoryInfo.EnumerateDirectories (System.String searchPattern, System.IO.EnumerationOptions enumerationOptions) [0x00000] in <467a840a914a47078e4ae9b0b1e8779e>:0 at System.IO.DirectoryInfo.EnumerateDirectories (System.String searchPattern, System.IO.SearchOption searchOption) [0x00008] in <467a840a914a47078e4ae9b0b1e8779e>:0 at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo.EnumerateDirectories(string,System.IO.SearchOption) at ManualSaving.SaveControl.MakeStoredSaveStatesPersistent () [0x0000a] in <0e3d75a4ea7e4d199b9343c377de1fd0>:0 at ManualSaving.SaveControl+Patches__XUiC_NewContinueGame__OnOpen.Prefix () [0x00000] in <0e3d75a4ea7e4d199b9343c377de1fd0>:0 at (wrapper dynamic-method) XUiC_NewContinueGame.DMD<System.Void XUiC_NewContinueGame:OnOpen()>(XUiC_NewContinueGame) at (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.SyncProxy<System.Void XUiC_NewContinueGame:OnOpen()>(XUiC_NewContinueGame) at XUiController.OnOpen () [0x00017] in <bbc47c5bcf804044a0bdebfc8142e831>:0 at XUiWindowGroup.OnOpen () [0x00006] in <bbc47c5bcf804044a0bdebfc8142e831>:0 at GUIWindowManager.Open (GUIWindow _w, System.Boolean _bModal, System.Boolean _bIsNotEscClosable, System.Boolean _bCloseAllOpenWindows) [0x000d0] in <bbc47c5bcf804044a0bdebfc8142e831>:0 at GUIWindowManager.Open (System.String _windowName, System.Boolean _bModal, System.Boolean _bIsNotEscClosable, System.Boolean _bCloseAllOpenWindows) [0x0004d] in <bbc47c5bcf804044a0bdebfc8142e831>:0 at XUiC_MainMenu.CheckProfile (System.String _windowToOpen) [0x00068] in <bbc47c5bcf804044a0bdebfc8142e831>:0 at XUiC_MainMenu.btnNewGame_OnPressed (XUiController _sender, System.Int32 _mouseButton) [0x00013] in <bbc47c5bcf804044a0bdebfc8142e831>:0 at XUiC_SimpleButton.Btn_OnPress (XUiController _sender, System.Int32 _mouseButton) [0x00010] in <bbc47c5bcf804044a0bdebfc8142e831>:0 at XUiController.OnPressed (System.Int32 _mouseButton) [0x0000e] in <bbc47c5bcf804044a0bdebfc8142e831>:0 at XUiController.Pressed (System.Int32 _mouseButton) [0x00000] in <bbc47c5bcf804044a0bdebfc8142e831>:0 at XUiView.OnClick (UnityEngine.GameObject _go) [0x0003f] in <bbc47c5bcf804044a0bdebfc8142e831>:0 at UIEventListener.OnClick () [0x0001c] in <a66e9d80326b43a3b1080261ae76f4a0>:0 UnityEngine.GameObject:SendMessage(GameObject, String, Object, SendMessageOptions) UICamera:Notify(GameObject, String, Object) UICamera:ProcessRelease(Boolean, Single) UICamera:ProcessTouch(Boolean, Boolean) UICamera:ProcessMouse() UICamera:ProcessEvents() UICamera:Update()

 
Not sure if that would be safe at all, as if you happen to manually call a save at the same time the game auto-saves that could cause a collision conflict. I'm guessing the issue is the mod is constantly keeping the save folder open/populated and the error is being thrown because the game deleted it and the mod is still trying to poll that folder.

Definitely not a known issue, since we don't have a manual save in-game :)

 
Jugginator said:
Not sure if that would be safe at all, as if you happen to manually call a save at the same time the game auto-saves that could cause a collision conflict. I'm guessing the issue is the mod is constantly keeping the save folder open/populated and the error is being thrown because the game deleted it and the mod is still trying to poll that folder.

Definitely not a known issue, since we don't have a manual save in-game :)
It's not my code, but what I do know is, the game no longer keeps saving constantly like in vanilla, and only saves when the player presses the 'save game' button on the pause menu. I've since removed the delete and manage saves button to help mitigate players from triggering this error

 
Back
Top