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

[PEBKAC] SpaceEngineers-Dedicated.cfg reading from one location, saving to another. #52

Closed Varaxian closed 7 years ago

Varaxian commented 7 years ago

Torch Version: 1.1.207.7 SE Version: 1.182.019

Summary: I've just tested this for an hour attempting to figure out why my world would not save, so I am leaving this bug open as TENTATIVE and to be edited with further notes.

Torch appears to be requiring SpaceEngineers-Dedicated.cfg to be located at */TORCH/Instance/Saves in order to not throw the exception regarding "unable to write config". Once placed into the location, torch no longer throws the exception.

However, when you utilize the GUI and press "Save Config", TORCH saves SpaceEngineers-Dedicated.cfg one directory backwards in */TORCH/Instance

This is likely the cause for the GUI interface not enacting changes to the config, as the config is merely saving a new copy in a location other than what is referenced at start.

Expected Behavior

SpaceEngineers-Dedicated.cfg to read and save from the same location

Observed Behavior

Steps to Reproduce

  1. Start with a freshly unzipped TORCH
  2. Add XML to Torch.cfg to auto-download plugins on launch
  3. Start Torch
  4. Notice exception for missing SpaceEngineers-Dedicated.cfg and no worlds to load
  5. Paste your world into */TORCH/Instance/Saves
  6. Start torch WITHOUT SpaceEngineers-Dedicated.cfg pasted into any directory
  7. Notice Exception and close TORCH
  8. Paste SpaceEngineers-Dedicated.cfg into */TORCH/Instance/Saves
  9. Launch torch and notice no exception
  10. Add a mod into the mods list and press save
  11. Notice now that a new SpaceEngineers-Dedicated.cfg is now in */TORCH/Instance
  12. Close torch and restart 13 Notice no change, as TORCH is reading from */TORCH/Instance/Saves

Other Information

I have yet to establish the reason for my lack of worldsaving at current, but at this juncture, that will likely be a separate bug.

Varaxian commented 7 years ago

03:25:34.0388 [INFO] InstanceManager: Saved dedicated config. 03:25:34.0388 [ERROR] InstanceManager: Failed to write sandbox config, changes will not appear on server 03:25:34.0388 [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() 03:25:34.0544 [INFO] Torch: Starting server. 03:25:39.5297 [INFO] Torch: Starting server watchdog. 03:26:08.2954 [INFO] Torch: Stopping server. 03:26:08.2954 [INFO] Torch: Server stopped. 03:26:08.7746 [FATAL] Torch: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Essentials.EssentialsPlugin.Dispose() at Torch.Managers.PluginManager.DisposePlugins() at VRage.Plugins.MyPlugins.Unload() at Sandbox.MySandboxGame.Dispose() at VRage.Dedicated.DedicatedServer.RunInternal() --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Torch.Server.TorchServer.Start() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()

Varaxian commented 7 years ago

I also admit, there is a high chance of user error in this. If I find out it is on my end, I will update and attempt to create an instructional so others do not ALSO follow the same error.

XeroCreator commented 7 years ago

What's your torch.cfg say? you change that for the instance path... so you can make it torch\instance\ and it should work fine. works for me anyway.

Varaxian commented 7 years ago

It wasn't matching up. I believe it could be PEBKAC, but it feels as if it's doing as I described. I'm going to repro it again, as I spent all my time working on trying to get a world save to happen instead.

Still tentative

Varaxian commented 7 years ago

Close bug as a non-issue. Convert to request for detailed instructions on how to migrate a world in to torch, since the file structure and the folders is different from both vanilla and sese