OpenDream icon indicating copy to clipboard operation
OpenDream copied to clipboard

There is no default interface skin

Open SpaceManiac opened this issue 1 year ago • 1 comments

If no .dmf file is included, there is no default skin. The server then errors when a client connects because _compiledJson.Interface is null.

System.ArgumentNullException: Value cannot be null. (Parameter 'key')
   at System.Collections.Generic.Dictionary`2.FindValue(TKey key)
   at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
   at OpenDreamRuntime.Resources.DreamResourceManager.LoadResource(String resourcePath) in /home/tad/work/ss14/OpenDream/OpenDreamRuntime/Resources/DreamResourceManager.cs:line 37
   at OpenDreamRuntime.DreamManager.OnPlayerStatusChanged(Object sender, SessionStatusEventArgs e) in /home/tad/work/ss14/OpenDream/OpenDreamRuntime/DreamManager.Connections.cs:line 78
   at Robust.Server.Player.PlayerManager.OnPlayerStatusChanged(IPlayerSession session, SessionStatus oldStatus, SessionStatus newStatus) in /home/tad/work/ss14/OpenDream/RobustToolbox/Robust.Server/Player/PlayerManager.cs:line 418
   at Robust.Server.Player.PlayerManager.<>c__DisplayClass49_0.<NewSession>b__0(Object _, SessionStatusEventArgs sessionArgs) in /home/tad/work/ss14/OpenDream/RobustToolbox/Robust.Server/Player/PlayerManager.cs:line 394
   at Robust.Server.Player.PlayerSession.set_Status(SessionStatus value) in /home/tad/work/ss14/OpenDream/RobustToolbox/Robust.Server/Player/PlayerSession.cs:line 87
   at Robust.Server.Player.PlayerManager.HandlePlayerListReq(MsgPlayerListReq message) in /home/tad/work/ss14/OpenDream/RobustToolbox/Robust.Server/Player/PlayerManager.cs:line 460
   at Robust.Shared.Network.NetManager.<>c__DisplayClass102_0`1.<RegisterNetMessage>b__0(NetMessage msg) in /home/tad/work/ss14/OpenDream/RobustToolbox/Robust.Shared/Network/NetManager.cs:line 987
   at Robust.Shared.Network.NetManager.DispatchNetMessage(NetIncomingMessage msg) in /home/tad/work/ss14/OpenDream/RobustToolbox/Robust.Shared/Network/NetManager.cs:line 908

SpaceManiac avatar Oct 24 '22 01:10 SpaceManiac

TestGame's dmf would work well as a default interface. Could move that to the Resources/ folder and use that if the server deosn't have one to provide.

wixoaGit avatar Oct 25 '22 18:10 wixoaGit

This is triggered by #793 where a bad relative path to the DMF causes OD to send an empty interface to the client.

amylizzle avatar Oct 28 '22 17:10 amylizzle