TorchAPI / Torch

An extensible modding framework and improved client/DS for Space Engineers. Still a work in progress!
Apache License 2.0
146 stars 76 forks source link

Staging #22 - Torch can't save to an empty path. #150

Closed ProsperCraft closed 6 years ago

ProsperCraft commented 6 years ago

Torch Version: 1.2.0.663 SE Version: 1.84.401

Expected Behavior

What did you expect to happen? That it would try to save the config to the proper folder, not a folder that doesn't exist.

Observed Behavior

What actually happened?

17:53:50.1941 [INFO] Torch: Executing directory: C:\Games\SpaceEngineersServer\ 17:53:50.1941 [INFO] PluginManager: Checking for plugin updates... 17:53:50.2091 [INFO] PluginManager: Updated 0 plugins. 17:53:50.2091 [INFO] PluginManager: Loading plugins... 17:53:50.2091 [INFO] PluginManager: Loaded 0 plugins. 17:53:51.6194 [WARN] InstanceManager: No worlds found in the current instance C:\Games\SpaceEngineersServer\Instance. 17:54:06.4034 [WARN] InstanceManager: No worlds found in the current instance C:\Games\SpaceEngineersServer\Instance. 18:08:00.0622 [INFO] InstanceManager: Saved dedicated config. 18:08:00.0671 [ERROR] InstanceManager: Failed to write sandbox config, changes will not appear on server 18:08:00.0671 [ERROR] InstanceManager: System.ArgumentNullException: Value cannot be null. Parameter name: path1 at System.IO.Path.Combine(String path1, String path2) at Torch.Server.Managers.InstanceManager.SaveConfig() in C:\Program Files (x86)\Jenkins\workspace\Torch_Torch_staging-ZNS7FN4RGURQGN7YDLUHQ3UMYIBPHQSIJWKCAY6N7MCURWHGXRKA\Torch.Server\Managers\InstanceManager.cs:line 139

Steps to Reproduce

  1. How did this issue get triggered? Started, Torch and edited the config, clicked save, and it failed.
Jimmacle commented 6 years ago

It tries to save to the folder specified in the dedicated server configuration, which appears blank. According to the log you don't actually have any saves in your Torch instance so there can't possibly be a value for the save path. The path in the exception is simply debugging information.

ProsperCraft commented 6 years ago

Seeing as Torch downloaded the server for me, should it not know where it is?

Jimmacle commented 6 years ago

Torch knows exactly where the server is, it doesn't know where your worlds are. You need to copy the saves you want to use in to Instance\Saves.

ProsperCraft commented 6 years ago

I am new to this, but I would expect the flow to be, as listed in the install directions-

"Unzip the Torch release into its own directory and run the executable. It will automatically download the SE DS and generate the other necessary files."

I don't have saves, so I expected them to be generated when I edited the config and clicked start. no?

Jimmacle commented 6 years ago

No, Torch doesn't currently have the code to generate new worlds. You need to make one in SE (or use the vanilla dedicated server) and then copy that in.

ProsperCraft commented 6 years ago

I will do that thank you.