anegostudios / VintageStory-Issues

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

[Modded] Crash using .charsel with a character class previously added by a mod, then removing the mod #3470

Open Vuanaunt opened 8 months ago

Vuanaunt commented 8 months ago

Game Version

v1.19.0 (Stable)

Platform

Windows

Modded

Modded

SP/MP

Singleplayer

Description

When opening the .charsel command, the game hard crashes. I suspect it is because I selected a class, and then uninstalled the mod that provided the class. I have reinstalled the mod but I still cannot open the character select menu (to change my class).

The mod was originally installed on the previous stable 1.18 version.

How to reproduce

1) Make a character with the class "Rust Mage" from the Rust magic mod. 2) Uninstall mod 3) Try to change class using .charsel

Screenshots

No response

Logs


Game Version: v1.19.0 (Stable)
Thu 18 Jan 2024 2:52:29 PM: Critical error occurred
Loaded Mods: tprunes@1.1.0, game@1.19.0, creative@1.19.0, survival@1.19.0, burntreeseeds@1.0.1, onestick@1.0.1
System.ArgumentException: Not a valid character class code!
   at Vintagestory.GameContent.CharacterSystem.setCharacterClass(EntityPlayer player, String classCode, Boolean initializeGear) in VSSurvivalMod\Systems\Character\Character.cs:line 234
   at Vintagestory.GameContent.GuiDialogCreateCharacter.OnGuiOpened() in VSSurvivalMod\Gui\GuiDialogCreateCharacter.cs:line 308
   at Vintagestory.API.Client.GuiDialog.TryOpen(Boolean withFocus) in VintagestoryApi\Client\UI\Dialog\GuiDialog.cs:line 288
   at Vintagestory.API.Client.GuiDialog.TryOpen() in VintagestoryApi\Client\UI\Dialog\GuiDialog.cs:line 268
   at Vintagestory.GameContent.GuiDialogCreateCharacter.PrepAndOpen() in VSSurvivalMod\Gui\GuiDialogCreateCharacter.cs:line 432
   at Vintagestory.GameContent.CharacterSystem.onCharSelCmd(TextCommandCallingArgs textCommandCallingArgs) in VSSurvivalMod\Systems\Character\Character.cs:line 342
   at Vintagestory.Common.ChatCommandImpl.CallHandler(TextCommandCallingArgs callargs, Action`1 onCommandComplete, Dictionary`2 asyncParseResults) in VintagestoryLib\Common\API\Command\ChatCommandImpl.cs:line 311
   at Vintagestory.Common.ChatCommandImpl.Execute(TextCommandCallingArgs callargs, Action`1 onCommandComplete) in VintagestoryLib\Common\API\Command\ChatCommandImpl.cs:line 247
   at Vintagestory.Common.ChatCommandApi.Execute(String commandName, TextCommandCallingArgs args, Action`1 onCommandComplete) in VintagestoryLib\Common\API\Command\ChatCommandApi.cs:line 99
   at Vintagestory.Common.ChatCommandApi.Execute(String commandName, IClientPlayer player, Int32 groupId, String args, Action`1 onCommandComplete) in VintagestoryLib\Common\API\Command\ChatCommandApi.cs:line 185
   at Vintagestory.Client.NoObf.HudDialogChat.HandleClientCommand(String message, Int32 groupid) in VintagestoryLib\Client\Systems\Gui\Huds\HudDialogChat.cs:line 800
   at Vintagestory.Client.NoObf.HudDialogChat.HandleClientMessage(Int32 groupid, String message) in VintagestoryLib\Client\Systems\Gui\Huds\HudDialogChat.cs:line 813
   at Vintagestory.Client.NoObf.HudDialogChat.OnNewClientToServerChatLine(Int32 groupId, String message, EnumChatType chattype, String data) in VintagestoryLib\Client\Systems\Gui\Huds\HudDialogChat.cs:line 753
   at Vintagestory.Client.NoObf.ClientEventManager.TriggerNewClientChatLine(Int32 groupid, String message, EnumChatType chattype, String data) in VintagestoryLib\Client\Util\ClientEventManager.cs:line 335
   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.NativeWindow.ProcessWindowEvents(Boolean waitForEvents)
   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```
Vuanaunt commented 8 months ago

The game will no longer even load the world. Uninstalling the rustic magic mod did not help. This is weird because it loaded in once after the first crash, but not after the second time it crashed.


Game Version: v1.19.0 (Stable)
Thu 18 Jan 2024 3:12:05 PM: Critical error occurred
Loaded Mods: tprunes@1.1.0, game@1.19.0, creative@1.19.0, survival@1.19.0, burntreeseeds@1.0.1, onestick@1.0.1
System.ArgumentException: Not a valid character class code!
   at Vintagestory.GameContent.CharacterSystem.setCharacterClass(EntityPlayer player, String classCode, Boolean initializeGear) in VSSurvivalMod\Systems\Character\Character.cs:line 234
   at Vintagestory.GameContent.GuiDialogCreateCharacter.OnGuiOpened() in VSSurvivalMod\Gui\GuiDialogCreateCharacter.cs:line 308
   at Vintagestory.API.Client.GuiDialog.TryOpen(Boolean withFocus) in VintagestoryApi\Client\UI\Dialog\GuiDialog.cs:line 288
   at Vintagestory.API.Client.GuiDialog.TryOpen() in VintagestoryApi\Client\UI\Dialog\GuiDialog.cs:line 268
   at Vintagestory.GameContent.GuiDialogCreateCharacter.PrepAndOpen() in VSSurvivalMod\Gui\GuiDialogCreateCharacter.cs:line 432
   at Vintagestory.GameContent.CharacterSystem.Event_PlayerJoin(IClientPlayer byPlayer) in VSSurvivalMod\Systems\Character\Character.cs:line 368
   at Vintagestory.Client.NoObf.ClientEventAPI.TriggerPlayerJoin(IClientPlayer plr) in VintagestoryLib\Client\API\ClientEventAPI.cs:line 259
   at Vintagestory.Client.NoObf.GeneralPacketHandler.HandlePlayerData(Packet_Server packet) in VintagestoryLib\Client\Systems\GeneralPacketHandler.cs:line 297
   at Vintagestory.Client.NoObf.ProcessPacketTask.ProcessPacket(Packet_Server packet) in VintagestoryLib\Client\Systems\NetworkProcess.cs:line 446
   at Vintagestory.Client.NoObf.ProcessPacketTask.Run() in VintagestoryLib\Client\Systems\NetworkProcess.cs:line 440
   at Vintagestory.Client.NoObf.ClientMain.ExecuteMainThreadTasks(Single deltaTime) in VintagestoryLib\Client\ClientMain.cs:line 769
   at Vintagestory.Client.GuiScreenConnectingToServer.RenderToDefaultFramebuffer(Single dt) in VintagestoryLib\Client\MainMenu\Screens\GuiScreenConnectingToServer.cs:line 313
   at Vintagestory.Client.ScreenManager.Render(Single dt) in VintagestoryLib\Client\ScreenManager.cs:line 674
   at Vintagestory.Client.ScreenManager.OnNewFrame(Single dt) in VintagestoryLib\Client\ScreenManager.cs:line 649
   at Vintagestory.Client.NoObf.ClientPlatformWindows.window_RenderFrame(FrameEventArgs e) in VintagestoryLib\Client\ClientPlatform\GameWindow.cs:line 78
   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

Event Log entries for Vintagestory.exe, the latest 1
==================================
{ TimeGenerated = Thu 18 Jan 2024 3:11:30 PM, Site = , Source = Application Error, Message = Faulting application name: Vintagestory.exe, version: 1.19.0.0, time stamp: 0x65310000
Faulting module name: openal32.dll, version: 1.23.0.0, time stamp: 0x63dd31ad
Exception code: 0x40000015
Fault offset: 0x00000000000df046
Faulting process id: 0xb98
Faulting application start time: 0x01da4a4a50f02cc3
Faulting application path: C:\Users\Allen Cognata\AppData\Roaming\Vintagestory\Vintagestory.exe
Faulting module path: C:\Users\Allen Cognata\AppData\Roaming\Vintagestory\Lib\openal32.dll
Report Id: e76a6df9-0a5a-4b21-835a-16b7884a5b92
Faulting package full name: 
Faulting package-relative application ID:  } ```
radfast commented 8 months ago

sorry but this one is not priority: medium. It seems like a unique situation, not one that will affect lots of players, and I think undefined behavior if a person swaps out mods in an existing game world can reasonably be expected.

Vuanaunt commented 8 months ago

No worries on whatever priority.

Vuanaunt commented 8 months ago

Okay last comment before I start a new world. I restored a backup, and had the mod enabled. Without even running the remapping, The command .Charsel crashes the game. It doesn't look like it's an issue with with being a class of a removed mod. It looks like it may just be running the command with any modded class?

radfast commented 8 months ago

We'll look at this now that 1.19.1 is safely out, there was a lot of pressure to fix some critical issues affecting all players