anegostudios / VintageStory-Issues

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

1.19.1 (many mods) - Client GuiManager crash when stopping Remote Server #3489

Closed caucow closed 7 months ago

caucow commented 7 months ago

Game Version

v1.19.1

Platform

Windows

Modded

Modded

SP/MP

Multiplayer

Description

While connected to a dedicated server, stopping the server (either as a player or from the console) causes the client to crash once it shuts down. This does NOT happen when disconnecting a player through the kick/ban moderator commands. Oddly, the mod list in the crash log is empty, despite having 48 mods enabled (mod list is mirrored between client and server).

How to reproduce

Screenshots

No response

Logs

Game Version: v1.19.1 (Stable)
1/20/2024 6:21:29 PM: Critical error occurred
Loaded Mods: 
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at Vintagestory.Client.NoObf.GuiManager.Dispose(ClientMain game) in VintagestoryLib\Client\Systems\Gui\GuiManager.cs:line 559
   at Vintagestory.Client.NoObf.ClientMain.Dispose() in VintagestoryLib\Client\ClientMain.cs:line 2597
   at Vintagestory.Client.NoObf.ClientMain.DestroyGameSession(Boolean gotDisconnected) in VintagestoryLib\Client\ClientMain.cs:line 2545
   at Vintagestory.Client.NoObf.GeneralPacketHandler.HandleDisconnectPlayer(Packet_Server packet) in VintagestoryLib\Client\Systems\GeneralPacketHandler.cs:line 185
   at Vintagestory.Client.NoObf.ClientMain.ExecuteMainThreadTasks(Single deltaTime) in VintagestoryLib\Client\ClientMain.cs:line 769
   at Vintagestory.Client.GuiScreenRunningGame.RenderToPrimary(Single dt) in VintagestoryLib\Client\MainMenu\Screens\GuiScreenRunningGame.cs:line 200
   at Vintagestory.Client.ScreenManager.Render(Single dt) in VintagestoryLib\Client\ScreenManager.cs:line 675
   at Vintagestory.Client.ScreenManager.OnNewFrame(Single dt) in VintagestoryLib\Client\ScreenManager.cs:line 650
   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
Craluminum2413 commented 7 months ago

What mods are installed? I will assume it is caused by mods until I see full list of mods

caucow commented 7 months ago

The 48 includes the 3 vanilla "mods" and one aesthetic mod I ended up removing (the crash still happens without it).

https://mods.vintagestory.at/alloycalculator https://mods.vintagestory.at/arrownd https://mods.vintagestory.at/betterfirepit https://mods.vintagestory.at/bodyheatbar https://mods.vintagestory.at/bricklayers https://mods.vintagestory.at/carryon https://mods.vintagestory.at/chatlinkitem https://mods.vintagestory.at/commonlib https://mods.vintagestory.at/configlib https://mods.vintagestory.at/deathwaypoints https://mods.vintagestory.at/easylightlevels https://mods.vintagestory.at/em https://mods.vintagestory.at/extrainfo https://mods.vintagestory.at/extraoverlays https://mods.vintagestory.at/farmlanddropssoil https://mods.vintagestory.at/feverstonehorses https://mods.vintagestory.at/fixroads https://mods.vintagestory.at/glowingarrows https://mods.vintagestory.at/guicompositesettingsex https://mods.vintagestory.at/imgui https://mods.vintagestory.at/show/mod/4543 https://mods.vintagestory.at/loginprotection https://mods.vintagestory.at/show/mod/280 https://mods.vintagestory.at/moremapicons https://mods.vintagestory.at/nemi https://mods.vintagestory.at/petai https://mods.vintagestory.at/pickupfast https://mods.vintagestory.at/pixelwaypoints https://mods.vintagestory.at/playerlist https://mods.vintagestory.at/prospecttogether https://mods.vintagestory.at/resmeltableslight https://mods.vintagestory.at/simplefootsteps https://mods.vintagestory.at/show/mod/282 https://mods.vintagestory.at/simplewinddirection https://mods.vintagestory.at/show/mod/9817 https://mods.vintagestory.at/stonequarry https://mods.vintagestory.at/temporalprospector https://mods.vintagestory.at/temporalstormtimer https://mods.vintagestory.at/treetapping https://mods.vintagestory.at/waypointcolours https://mods.vintagestory.at/show/mod/6977 https://mods.vintagestory.at/woodchests https://mods.vintagestory.at/show/mod/285 https://mods.vintagestory.at/worldconfiggui

1.19.0_mods.zip

Craluminum2413 commented 7 months ago

Does it happen without any mods installed?

caucow commented 7 months ago

Nope :)

radfast commented 7 months ago

If you have time and patience, it could help to test your mods in batches, to see if you can figure out exactly which one is the cause. It must be one of the Coded mods, so you can skip the mods which don't add code. Start by looking at mods which obviously add new GUIs, for example WorldConfigGui

If you find it, feel free to post here in case it helps someone else, but it should really be reported to the mod author to fix.