anegostudios / VintageStory-Issues

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

Drinking from perishable containers corrupts player data (content mods) #3994

Open jacopouggeri opened 3 months ago

jacopouggeri commented 3 months ago

Game Version

v1.19.8

Platform

Windows

Modded

Modded

SP/MP

Singleplayer

Description

This happens both in singleplayer and multiplayer, and on multiple platforms as far as I'm aware. I've encountered it when transitioning some containers my mod adds to new variants in newer versions of my mod. I attach here a minimal example content mod that can reproduce the issue: bugexample.zip The only way to recover the world/player is to reset player data both in single and multiplayer.

How to reproduce

  1. Install example mod attached
  2. Grab bowl
  3. Grab any kind of consumable liquid
  4. Drink
  5. Screen will get black, health and hunger bars will disappear and temporal wheel will spin like crazy
  6. As soon as you try to move, the game crashes

Screenshots

No response

Logs

Game Version: v1.19.8 (Stable)
30/07/2024 14:07:57: Critical error occurred
Loaded Mods: bugexample@, game@1.19.8, creative@1.19.8, survival@1.19.8
System.IndexOutOfRangeException: MapRegion data, index was -2147483585 but length was 512
   at Vintagestory.API.Datastructures.IntDataMap2D.GetUnpaddedColorLerped(Single x, Single z) in VintagestoryApi\Datastructures\IntDataMap2D.cs:line 71
   at Vintagestory.GameContent.WeatherDataReaderBase.LoadLerp(Vec3d pos, Boolean useArgValues, Single lerpRainCloudOverlay, Single lerpRainOverlay, Single dt) in VSEssentials\Systems\Weather\WeatherDataReader.cs:line 245
   at Vintagestory.GameContent.WeatherSystemClient.OnRenderFrame(Single dt, EnumRenderStage stage) in VSEssentials\Systems\Weather\WeatherSystemClient.cs:line 180
   at Vintagestory.Client.NoObf.ClientEventManager.TriggerRenderStage(EnumRenderStage stage, Single dt) in VintagestoryLib\Client\Util\ClientEventManager.cs:line 186
   at Vintagestory.Client.NoObf.ClientMain.TriggerRenderStage(EnumRenderStage stage, Single dt) in VintagestoryLib\Client\ClientMain.cs:line 809
   at Vintagestory.Client.NoObf.ClientMain.MainRenderLoop(Single dt) in VintagestoryLib\Client\ClientMain.cs:line 815
   at Vintagestory.Client.NoObf.ClientMain.MainGameLoop(Single deltaTime) in VintagestoryLib\Client\ClientMain.cs:line 731
   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 676
   at Vintagestory.Client.ScreenManager.OnNewFrame(Single dt) in VintagestoryLib\Client\ScreenManager.cs:line 651
   at Vintagestory.Client.NoObf.ClientPlatformWindows.window_RenderFrame(FrameEventArgs e) in VintagestoryLib\Client\ClientPlatform\GameWindow.cs:line 88
   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
Daovala commented 1 month ago

We've run into the same issue on my server at the turn of year 8 One player's data is corrupt, tested from 2 computers (one Linux, one Windows if that matters at all) server is otherwise working asides a player that cannot connect

client-crash.txt

Daovala commented 1 month ago

Seems the server save file is partially corrupt, server can still run off it but SQL reader would not open it, will see if it can be repaired

Craluminum2413 commented 1 month ago

Weather crash is most likely fixed in 1.20, if here won't be any more comments two weeks after 1.20 stable, then I will close this issue

jacopouggeri commented 1 month ago

I can just try the example mod in 1.20 when it's stable and see if it still crashes