anegostudios / VintageStory-Issues

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

Client crash while typing during drunk effect #3553

Closed mag8n closed 8 months ago

mag8n commented 9 months ago

Game Version

v1.19.3 (Stable)

Platform

Windows

Modded

None

SP/MP

Multiplayer

Description

The game client has crashed while I was typing a message in chat, while my character was affected with the drunkness effect which distorts the text.

How to reproduce

unsure, this is the first time this has happened, and I was not trying to type in any special text characters, only lowercase Latin characters

Screenshots

No response

Logs

Running on 64 bit Windows 6.1.7601.0 with 8191 MB RAM
Game Version: v1.19.3 (Stable)
03/02/2024 16:05:30: Critical error occurred
Loaded Mods: game@1.19.3, creative@1.19.3, survival@1.19.3
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Vintagestory.GameContent.EntityBehaviorDrunkTyping.slurText(String text) in VSEssentials\Entity\Behavior\BehaviorDrunkTyping.cs:line 82
   at Vintagestory.GameContent.EntityBehaviorDrunkTyping.onChatKeyDownPost(String eventName, EnumHandling& handling, IAttribute data) in VSEssentials\Entity\Behavior\BehaviorDrunkTyping.cs:line 75
   at Vintagestory.Client.NoObf.ClientEventAPI.PushEvent(String eventName, IAttribute data) in VintagestoryLib\Client\API\ClientEventAPI.cs:line 465
   at Vintagestory.Client.NoObf.HudDialogChat.OnKeyDown(KeyEvent args) in VintagestoryLib\Client\Systems\Gui\Huds\HudDialogChat.cs:line 540
   at Vintagestory.Client.NoObf.GuiManager.OnKeyDown(KeyEvent args) in VintagestoryLib\Client\Systems\Gui\GuiManager.cs:line 333
   at Vintagestory.Client.NoObf.ClientMain.OnKeyDown(KeyEvent args) in VintagestoryLib\Client\ClientMain.cs:line 1714
   at Vintagestory.Client.NoObf.ClientPlatformWindows.game_KeyDown(KeyboardKeyEventArgs e) in VintagestoryLib\Client\ClientPlatform\Input.cs:line 230
   at OpenTK.Windowing.Desktop.NativeWindow.KeyCallback(Window* window, Keys key, Int32 scancode, InputAction action, KeyModifiers mods)
--- End of stack trace from previous location ---
   at OpenTK.Windowing.Desktop.NativeWindow.RethrowCallbackExceptionsIfNeeded()
   at OpenTK.Windowing.Desktop.GameWindow.Run()
   at Vintagestory.Client.ClientProgram.Start(ClientProgramArgs args, String[] rawArgs) in VintagestoryLib\Client\ClientProgram.cs:line 318
   at Vintagestory.Client.ClientProgram.<>c__DisplayClass9_0.<.ctor>b__1() in VintagestoryLib\Client\ClientProgram.cs:line 128
   at Vintagestory.ClientNative.CrashReporter.Start(ThreadStart start) in VintagestoryLib\Client\ClientPlatform\ClientNative\CrashReporter.cs:line 93
Th3Dilli commented 9 months ago

I am sorry, so far I was not able to reproduce the error which makes things a bit difficult.

Is this constantly happening? can you reproduce that issue on the same server or maybe even in Singelplayer?

Did you do anything special with the chat like maybe copy paste or similar with the text that could have caused this?

antofdeath commented 9 months ago

Running on 64 bit Windows 10.0.22631.0 with 32680 MB RAM Game Version: v1.19.4 (Stable) 3/2/2024 17:53:22: Critical error occurred Loaded Mods: buildingplus@1.0.0, chiseltools@1.10.2, somethinginthewater@1.19.3, game@1.19.4, betterjonasdevices@1.1.0, chickenSit@2.0.1, commonlib@2.3.2, fieldsofsalt@1.2.0, sailboat@1.2.6, oneroof@0.9.9, simplestep@1.1.6, creative@1.19.4, survival@1.19.4, playercorpse@1.9.0, simplewinddirection@1.0.2 System.IndexOutOfRangeException: Index was outside the bounds of the array. at Vintagestory.GameContent.EntityBehaviorDrunkTyping.slurText(String text) in VSEssentials\Entity\Behavior\BehaviorDrunkTyping.cs:line 82 at Vintagestory.GameContent.EntityBehaviorDrunkTyping.onChatKeyDownPost(String eventName, EnumHandling& handling, IAttribute data) in VSEssentials\Entity\Behavior\BehaviorDrunkTyping.cs:line 75 at Vintagestory.Client.NoObf.ClientEventAPI.PushEvent(String eventName, IAttribute data) in VintagestoryLib\Client\API\ClientEventAPI.cs:line 476 at Vintagestory.Client.NoObf.HudDialogChat.OnKeyDown(KeyEvent args) in VintagestoryLib\Client\Systems\Gui\Huds\HudDialogChat.cs:line 540 at Vintagestory.Client.NoObf.GuiManager.OnKeyDown(KeyEvent args) in VintagestoryLib\Client\Systems\Gui\GuiManager.cs:line 333 at Vintagestory.Client.NoObf.ClientMain.OnKeyDown(KeyEvent args) in VintagestoryLib\Client\ClientMain.cs:line 1721 at Vintagestory.Client.NoObf.ClientPlatformWindows.game_KeyDown(KeyboardKeyEventArgs e) in VintagestoryLib\Client\ClientPlatform\Input.cs:line 230 at OpenTK.Windowing.Desktop.NativeWindow.KeyCallback(Window* window, Keys key, Int32 scancode, InputAction action, KeyModifiers mods) --- End of stack trace from previous location --- at OpenTK.Windowing.Desktop.NativeWindow.RethrowCallbackExceptionsIfNeeded() at OpenTK.Windowing.Desktop.GameWindow.Run() at Vintagestory.Client.ClientProgram.Start(ClientProgramArgs args, String[] rawArgs) in VintagestoryLib\Client\ClientProgram.cs:line 324 at Vintagestory.Client.ClientProgram.<>c__DisplayClass9_0.<.ctor>b__1() in VintagestoryLib\Client\ClientProgram.cs:line 128 at Vintagestory.ClientNative.CrashReporter.Start(ThreadStart start) in VintagestoryLib\Client\ClientPlatform\ClientNative\CrashReporter.cs:line 93

Adding mine to the list, similar crash. Obviously from the drunk typing.

I drank a ton of cranberry brandy, stood on a operating quern, streamed the game to my friends and went in 3rd person mode spinning a round like a fool. Then we just kept typing to see what happened, and I typed "abcde" and was about to keep going and then it crashed. I figure it's pulling a non supported character.

Th3Dilli commented 8 months ago

oh, what language is your vs, system and keyboard layout? that may have an effect

antofdeath commented 8 months ago

Well I have it as "English (United States)" but I also have "English (German)" fonts available for unrelated reasons, it is possible it might be pulling from that font group.

Th3Dilli commented 8 months ago

ok I did some more testing and a fix will be included in 1.19.5 that should take care of that