anegostudios / VintageStory-Issues

Vintage Story's public issue tracker for reporting bugs, crashes and the like
43 stars 16 forks source link

Unhandled exceptions on server when adding/removing waypoints #4188

Open MyraMidnight opened 1 day ago

MyraMidnight commented 1 day ago

Game Version

v1.20.0-pre.4

Platform

Windows

Modded

None

SP/MP

Multiplayer

Description

Was playing on a test server for the pre-release, it is essentially vanilla. And I get kicked off the server for triggering a unhandled exception whenever I would create or delete a waypoint on the map.

I do have Icelandic language on my client, and the admin was kind enough to even manually add the language to the server in hopes of it fixing things (since it did solve other language related issues on another of their servers that th3essentials caused whenever I would use it's features). That fix did not solve the issue with the waypoints. And we kind of excluded th3essentials as the cause in this case.

Admin of server listed these mods:

just 4 mods are here livemap, playerlist, th3essentials and vsserverpanel

On my end, only mod I had enabled was HUD Clock, can hardly call that playing modded.

I did get the log from the admin

I really think there really should be some handler that just defaults to the English if it fails to look up the language... be it the game or mods...

How to reproduce

  1. Have client set to use a language not previously listed, so it is manually added. I use Icelandic. (could just copy en.json and turn it into is.json for that effect)
  2. Join server
  3. Create/Delete a waypoint on the map

Screenshots

No response

Logs

30.9.2024 11:44:54 [Event] Player MyraMidnight got removed. Reason: Threw an exception at the server
30.9.2024 11:44:54 [Error] Exception: The given key 'is' was not present in the dictionary.
   at System.Collections.Generic.Dictionary2.get_Item(TKey key)
   at Vintagestory.API.Config.Lang.GetL(String langcode, String key, Object[] args) in VintagestoryApi\Localization\Lang.cs:line 153
   at Vintagestory.Common.ChatCommandApi.Execute(String commandName, IServerPlayer player, Int32 groupId, String args, Action1 onCommandComplete) in VintagestoryLib\Common\API\Command\ChatCommandApi.cs:line 177
   at Vintagestory.Server.ServerMain.HandleChatMessage(IServerPlayer player, Int32 groupid, String message) in VintagestoryLib\Server\ServerGeneralPacketHandler.cs:line 473
   at Vintagestory.Server.ServerMain.HandleChatLine(Packet_Client packet, ConnectedClient client) in VintagestoryLib\Server\ServerGeneralPacketHandler.cs:line 355
   at Vintagestory.Server.ServerMain.ProcessNetMessage(NetIncomingMessage msg, NetServer mainSocket) in VintagestoryLib\Server\ServerMainNetworking.cs:line 140
30.9.2024 11:44:54 [Error] Player MyraMidnight/Fp2cZ2XafR+dioEqaar0y0gB caused an exception through a command.
30.9.2024 11:44:54 [Error] Command: /waypoint remove 3
30.9.2024 11:44:54 [Error] Exception: The given key 'is' was not present in the dictionary.
   at System.Collections.Generic.Dictionary2.get_Item(TKey key)
   at Vintagestory.API.Config.Lang.GetL(String langcode, String key, Object[] args) in VintagestoryApi\Localization\Lang.cs:line 153
   at Vintagestory.Common.ChatCommandApi.<>c__DisplayClass24_0.<Execute>b__0(TextCommandResult results) in VintagestoryLib\Common\API\Command\ChatCommandApi.cs:line 154
   at Vintagestory.Common.ChatCommandImpl.CallHandler(TextCommandCallingArgs callargs, Action1 onCommandComplete, Dictionary2 asyncParseResults) in VintagestoryLib\Common\API\Command\ChatCommandImpl.cs:line 312
   at Vintagestory.Common.ChatCommandImpl.Execute(TextCommandCallingArgs callargs, Action1 onCommandComplete) in VintagestoryLib\Common\API\Command\ChatCommandImpl.cs:line 236
   at Vintagestory.Common.ChatCommandImpl.CallHandler(TextCommandCallingArgs callargs, Action1 onCommandComplete, Dictionary2 asyncParseResults) in VintagestoryLib\Common\API\Command\ChatCommandImpl.cs:line 263
   at Vintagestory.Common.ChatCommandImpl.Execute(TextCommandCallingArgs callargs, Action1 onCommandComplete) in VintagestoryLib\Common\API\Command\ChatCommandImpl.cs:line 236
   at Vintagestory.Common.ChatCommandApi.Execute(String commandName, TextCommandCallingArgs args, Action1 onCommandComplete) in VintagestoryLib\Common\API\Command\ChatCommandApi.cs:line 99
   at Vintagestory.Common.ChatCommandApi.Execute(String commandName, IServerPlayer player, Int32 groupId, String args, Action`1 onCommandComplete) in VintagestoryLib\Common\API\Command\ChatCommandApi.cs:line 143
30.9.2024 11:44:54 [Warning] Exception at client 3. Disconnecting client. 
MyraMidnight commented 1 day ago

I should maybe note that adding the language manually to server did not solve the issue