Space Engineers

Space Engineers

Paint Gun - realistic painting for survival + special creative features
Soulshkin 7 Mar, 2024 @ 4:42am
Error: the process cannot access the info.log file
I unload the world, upload it again, and the world does not load, it gives an error when loading the world.
If you exit the game and restart it, the world loads.
When the game is running, when I unloaded the world, the game process does not allow deleting the file 'Storage\500818376.sbm_PaintGun\info.log'.
It is possible that the file does not close correctly when uploading the world.
If you remove this mod, then there is no error, and the world loads.

This is when loading the world:
2024-03-07 14:55:20.823 - Thread: 1 -> WaterMod: Loaded Fish Config 'SeaTurtle' 2024-03-07 14:55:20.824 - Thread: 1 -> WaterMod: Finished loading water configs 2024-03-07 14:55:20.849 - Thread: 1 -> [SmoothVoxelsMod] Modified 11 planet definitions. 2024-03-07 14:55:20.865 - Thread: 1 -> Error: Error during loading session:System.IO.IOException: The process cannot access the file 'C:\Users\Vladimir\AppData\Roaming\SpaceEngineers\Storage\500818376.sbm_PaintGun\info.log' because it is being used by another process. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at VRage.FileSystem.MyFileSystem.OpenWrite(String path, FileMode mode) at Sandbox.ModAPI.MyAPIUtilities.VRage.Game.ModAPI.IMyUtilities.WriteFileInLocalStorage(String file, Type callingType) at Digi.Log.Handler.Init(Log sessionComp) at Digi.Log.LoadData() at Sandbox.Game.World.MySession.LoadComponent(MySessionComponentBase component) at Sandbox.Game.World.MySession.LoadDataComponents() at Sandbox.Game.World.MySession.PrepareBaseSession(MyObjectBuilder_Checkpoint checkpoint, MyObjectBuilder_Sector sector) at Sandbox.Game.World.MySession.Load(String sessionPath, MyObjectBuilder_Checkpoint checkpoint, UInt64 checkpointSizeInBytes, Boolean saveLastStates, Boolean allowXml) 2024-03-07 14:55:20.866 - Thread: 1 -> ERROR: Loading screen failed 2024-03-07 14:55:20.868 - Thread: 1 -> Exception occurred: System.IO.IOException: The process cannot access the file 'C:\Users\Vladimir\AppData\Roaming\SpaceEngineers\Storage\500818376.sbm_PaintGun\info.log' because it is being used by another process. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at VRage.FileSystem.MyFileSystem.OpenWrite(String path, FileMode mode) at Sandbox.ModAPI.MyAPIUtilities.VRage.Game.ModAPI.IMyUtilities.WriteFileInLocalStorage(String file, Type callingType) at Digi.Log.Handler.Init(Log sessionComp) at Digi.Log.LoadData() at Sandbox.Game.World.MySession.LoadComponent(MySessionComponentBase component) at Sandbox.Game.World.MySession.LoadDataComponents() at Sandbox.Game.World.MySession.PrepareBaseSession(MyObjectBuilder_Checkpoint checkpoint, MyObjectBuilder_Sector sector) at Sandbox.Game.World.MySession.Load(String sessionPath, MyObjectBuilder_Checkpoint checkpoint, UInt64 checkpointSizeInBytes, Boolean saveLastStates, Boolean allowXml) at Sandbox.Game.World.MySessionLoader.<>c__DisplayClass18_0.<LoadSingleplayerSessionInternal>b__7() at System.DelegateExtensions.InvokeIfNotNull(Action handler) at Sandbox.Game.Gui.MyGuiScreenLoading.RunLoad()

This is when the world is first unloaded:
2024-03-07 15:16:39.603 - Thread: 1 -> MyObjectBuilder_BlueprintDefinition/Position0005_FlareGun -> Textures\GUI\Icons\FlareGun.dds 2024-03-07 15:16:39.603 - Thread: 1 -> ColorfulIcons.RevertDefinitions - END 2024-03-07 15:16:39.607 - Thread: 1 -> ERROR: Failed to cleanly unload session: 2024-03-07 15:16:39.625 - Thread: 1 -> at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) at System.Environment.get_StackTrace() at Sandbox.Game.World.MySessionLoader.Unload() at Sandbox.Game.World.MySessionLoader.UnloadAndExitToMenu() at SpaceEngineers.Game.GUI.MyGuiScreenMainMenu.OnExitToMainMenuMessageBoxCallback(ResultEnum callbackReturn) at Sandbox.Graphics.GUI.MyGuiScreenMessageBox.CallResultCallback(ResultEnum val) at Sandbox.Graphics.GUI.MyGuiScreenMessageBox.OnClick(ResultEnum result) at System.DelegateExtensions.InvokeIfNotNull[T1](Action`1 handler, T1 arg1) at Sandbox.Graphics.GUI.MyGuiControlButton.HandleInput() at Sandbox.Graphics.GUI.MyGuiScreenBase.HandleControlsInput(Boolean receivedFocusInThisUpdate) at Sandbox.Graphics.GUI.MyGuiScreenBase.HandleInput(Boolean receivedFocusInThisUpdate) at Sandbox.Graphics.GUI.MyGuiScreenMessageBox.HandleInput(Boolean receivedFocusInThisUpdate) at Sandbox.Graphics.GUI.MyScreenManager.HandleInput() at Sandbox.Graphics.GUI.MyDX9Gui.HandleInput() at Sandbox.MySandboxGame.Update() at Sandbox.Engine.Platform.Game.UpdateInternal() at Sandbox.Engine.Platform.Game.RunSingleFrame() at Sandbox.Engine.Platform.FixedLoop.<>c__DisplayClass11_0.<Run>b__0() at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback) at Sandbox.Engine.Platform.Game.RunLoop() at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashScreen) at SpaceEngineers.MyProgram.Main(String[] args) 2024-03-07 15:16:39.626 - Thread: 1 -> Exception occurred: VRage.Game.ModAPI.ModCrashedException: Mod crashed! ---> System.NullReferenceException: Object reference not set to an instance of an object. at DamageInfo.Session.UnloadData() at Sandbox.Game.World.MySession.UnloadDataComponents(Boolean beforeLoadWorld) --- End of inner exception stack trace --- at Sandbox.Game.World.MySession.UnloadDataComponents(Boolean beforeLoadWorld) at Sandbox.Game.World.MySession.Unload() at Sandbox.Game.World.MySessionLoader.Unload() 2024-03-07 15:16:39.626 - Thread: 1 -> InnerException: 2024-03-07 15:16:39.626 - Thread: 1 -> Exception occurred: System.NullReferenceException: Object reference not set to an instance of an object. at DamageInfo.Session.UnloadData() at Sandbox.Game.World.MySession.UnloadDataComponents(Boolean beforeLoadWorld) 2024-03-07 15:16:39.626 - Thread: 1 -> MyGuiScreenIntroVideo MyGuiScreenBase.LoadContent 2024-03-07 15:16:39.626 - Thread: 1 -> MyGuiScreenMainMenu MyGuiScreenBase.LoadContent 2024-03-07 15:16:39.643 - Thread: 1 -> MyGuiScreenProgress MyGuiScreenBase.UnloadContent - START 2024-03-07 15:16:39.643 - Thread: 1 -> MyGuiScreenProgress MyGuiScreenBase.UnloadContent - END
< >
Showing 1-8 of 8 comments
Digi  [developer] 7 Mar, 2024 @ 12:23pm 
This is a known issue with the game.

When an error occurs either during loading or during unload, it can prevent other mods from getting notified that world unloaded.

This is extremely bad and also not my mod's fault.
In fact my mod acts as a warning for this issue to force you to restart.
If my mod weren't there you would've likely encountered extremely weird bugs that can't be replicated normally, sending mod authors everywhere on wild goose chases xD

I did report this to Keen more than a year ago and here we are. They can at least crash the game if an error occurs, like they literally do everywhere else.


That said, the mod that triggered all this:
VRage.Game.ModAPI.ModCrashedException: Mod crashed! ---> System.NullReferenceException: Object reference not set to an instance of an object. at DamageInfo.Session.UnloadData() at Sandbox.Game.World.MySession.UnloadDataComponents(Boolean beforeLoadWorld) ...
Which is where you should be reporting this so that they fix the stuff and try-catch+log their unload to avoid breaking other mods.
Last edited by Digi; 7 Mar, 2024 @ 12:23pm
Soulshkin 8 Mar, 2024 @ 12:43am 
It's unfortunate that Keen hasn't done anything about it yet. Well, we can only wait.
Digi  [developer] 8 Mar, 2024 @ 10:13am 
That mod is still a problem though so they can avoid the issue meanwhile =) You need to compare with the mods list to know which one it is based on that DamageInfo name.
Soulshkin 9 Mar, 2024 @ 2:36am 
Ah, sorry, I didn't understand well what I needed to do. I'm still not good at understanding C# errors.
I searched in the cs files where "DamageInfo" occurs. And that's what mods I found this name in:
DamageInfo
AdvancedWelding
BuildInfo
NanobotBuildAndRepairSystem

I found which mod is "bad". I have deleted the DamageInfo mod. After restarting the world, the error disappeared. I added it recently, I wanted to try it, but I forgot about it.

Thank you for telling me how to look for problems in which mods.
Now I need, apparently, to contact the author of the DamageInfo mod? Or just don't use this mod :)
Digi  [developer] 9 Mar, 2024 @ 5:09am 
Yes tell the author about the unload errors, and you can link to this topic for them to see why it's a problem.

You can still use the mod but you have to remember to always close the game after exiting a world with that mod =) as loading any world would likely still have code running from the previous world (even if new world has no mods).
Last edited by Digi; 9 Mar, 2024 @ 5:10am
Soulshkin 15 Mar, 2024 @ 1:00am 
He's not responding. I guess I'll just delete his mod.
Thank you again for helping me figure it out.
BDCarrillo 13 May, 2024 @ 7:10am 
dangit Steam, why don't you notify on new conversations... I'll look into this
Digi  [developer] 13 May, 2024 @ 7:59am 
Yeah :( steam doesn't subscribe mod author to their own discussions section :cozyspaceengineersa:
Last edited by Digi; 13 May, 2024 @ 8:00am
< >
Showing 1-8 of 8 comments
Per page: 1530 50