OpenDream
OpenDream copied to clipboard
Launching a .json in the CWD fails with an exception
[FATL] unhandled: System.ArgumentException: The value cannot be an empty string. (Parameter 'path')
at System.ArgumentException.ThrowNullOrEmptyException(String argument, String paramName)
at System.IO.Directory.SetCurrentDirectory(String path)
at OpenDreamRuntime.Resources.DreamResourceManager.Initialize(String rootPath, String[] resources) in C:\e02b8011-d5ba-4bcd-a8eb-20a5d386ee18\OpenDreamRuntime\Resources\DreamResourceManager.cs:line 38
at OpenDreamRuntime.DreamManager.LoadJson(String jsonPath) in C:\e02b8011-d5ba-4bcd-a8eb-20a5d386ee18\OpenDreamRuntime\DreamManager.cs:line 121
at OpenDreamRuntime.DreamManager.PreInitialize(String jsonPath) in C:\e02b8011-d5ba-4bcd-a8eb-20a5d386ee18\OpenDreamRuntime\DreamManager.cs:line 66
at OpenDreamRuntime.EntryPoint.PostInit() in C:\e02b8011-d5ba-4bcd-a8eb-20a5d386ee18\OpenDreamRuntime\EntryPoint.cs:line 65
at Robust.Shared.ContentPack.BaseModLoader.BroadcastRunLevel(ModRunLevel level) in C:\e02b8011-d5ba-4bcd-a8eb-20a5d386ee18\RobustToolbox\Robust.Shared\ContentPack\BaseModLoader.cs:line 85
at Robust.Server.BaseServer.Start(ServerOptions options, Func`1 logHandlerFactory) in C:\e02b8011-d5ba-4bcd-a8eb-20a5d386ee18\RobustToolbox\Robust.Server\BaseServer.cs:line 398
at Robust.Server.Program.ParsedMain(CommandLineArgs args, Boolean contentStart, ServerOptions options) in C:\e02b8011-d5ba-4bcd-a8eb-20a5d386ee18\RobustToolbox\Robust.Server\Program.cs:line 68
at Robust.Server.Program.Start(String[] args, ServerOptions options, Boolean contentStart) in C:\e02b8011-d5ba-4bcd-a8eb-20a5d386ee18\RobustToolbox\Robust.Server\Program.cs:line 46
at Robust.Server.Program.Main(String[] args) in C:\e02b8011-d5ba-4bcd-a8eb-20a5d386ee18\RobustToolbox\Robust.Server\Program.cs:line 25
Unhandled exception. System.ArgumentException: The value cannot be an empty string. (Parameter 'path')
at System.ArgumentException.ThrowNullOrEmptyException(String argument, String paramName)
at System.IO.Directory.SetCurrentDirectory(String path)
at OpenDreamRuntime.Resources.DreamResourceManager.Initialize(String rootPath, String[] resources) in C:\e02b8011-d5ba-4bcd-a8eb-20a5d386ee18\OpenDreamRuntime\Resources\DreamResourceManager.cs:line 38
at OpenDreamRuntime.DreamManager.LoadJson(String jsonPath) in C:\e02b8011-d5ba-4bcd-a8eb-20a5d386ee18\OpenDreamRuntime\DreamManager.cs:line 121
at OpenDreamRuntime.DreamManager.PreInitialize(String jsonPath) in C:\e02b8011-d5ba-4bcd-a8eb-20a5d386ee18\OpenDreamRuntime\DreamManager.cs:line 66
at OpenDreamRuntime.EntryPoint.PostInit() in C:\e02b8011-d5ba-4bcd-a8eb-20a5d386ee18\OpenDreamRuntime\EntryPoint.cs:line 65
at Robust.Shared.ContentPack.BaseModLoader.BroadcastRunLevel(ModRunLevel level) in C:\e02b8011-d5ba-4bcd-a8eb-20a5d386ee18\RobustToolbox\Robust.Shared\ContentPack\BaseModLoader.cs:line 85
at Robust.Server.BaseServer.Start(ServerOptions options, Func`1 logHandlerFactory) in C:\e02b8011-d5ba-4bcd-a8eb-20a5d386ee18\RobustToolbox\Robust.Server\BaseServer.cs:line 398
at Robust.Server.Program.ParsedMain(CommandLineArgs args, Boolean contentStart, ServerOptions options) in C:\e02b8011-d5ba-4bcd-a8eb-20a5d386ee18\RobustToolbox\Robust.Server\Program.cs:line 68
at Robust.Server.Program.Start(String[] args, ServerOptions options, Boolean contentStart) in C:\e02b8011-d5ba-4bcd-a8eb-20a5d386ee18\RobustToolbox\Robust.Server\Program.cs:line 46
at Robust.Server.Program.Main(String[] args) in C:\e02b8011-d5ba-4bcd-a8eb-20a5d386ee18\RobustToolbox\Robust.Server\Program.cs:line 25
Workaround is to launch with ./
as a prefix
Even using the workaround you get an unknown argument error:
Unknown argument: ./paradise.json
[INFO] root: Server -> Starting
[INFO] cfg: Configuration loaded from file
[DEBG] root: Runtime: .NET 7.0.12 win10-x64
[DEBG] root: OS: Microsoft Windows 10.0.19045 X64
[INFO] srv: Name: MyServer
[INFO] srv: TickRate: 60(16.67ms)
Even using the workaround you get an unknown argument error:
Unknown argument: ./paradise.json [INFO] root: Server -> Starting [INFO] cfg: Configuration loaded from file [DEBG] root: Runtime: .NET 7.0.12 win10-x64 [DEBG] root: OS: Microsoft Windows 10.0.19045 X64 [INFO] srv: Name: MyServer [INFO] srv: TickRate: 60(16.67ms)
That's RT complaining about the argument because it doesn't recognize it, despite OpenDream using it. Setting the opendream.json_path cvar instead would get rid of it.
Good to know