Windows Freeze/Crash around error item fish tanks

Esca

Farmhand
Version: Stardew Valley 1.6.15 build 24356 on Microsoft Windows 11 Pro
Language: English

If a fish tank is placed and then its data is removed (due to errors, mod removal, etc), the fish tank itself safely becomes an error item. However, if any fish are inside the tank, they appear to cause a repeating error that freezes or crashes players when they enter the tank's location.

The error occurs when the fish tank's width/height values are passed into StardewValley.Utility.getRandomPositionInThisRectangle by the StardewValley.Objects.TankFish(FishTankFurniture tank, Item item) constructor, leading to the minimum random number being higher than the maximum.

One player encountered the error, removed all mods, and kept encountering it. Here's one of their logs with only SMAPI installed as an example: https://smapi.io/log/36bdf2c5a0e54fffa42dfe48c8ae4d99

Replication steps:

1. Install SMAPI and Content Patcher.
2. Start a new game.
3. Use the SMAPI console commands "player_add name JungleTank" and "player_add name Pufferfish" (or otherwise acquire a jungle tank and a fish).
4. Place the jungle fish tank in the player's farmhouse, then place the fish inside.
5. Sleep to save, then exit the game.
5. Install the content pack attached to this post, which removes the "JungleTank" entry from the Data/Furniture asset.
6. Load the saved game. Errors will occur when the player wakes up, but the game won't necessarily freeze or crash yet.
7. Leave the farmhouse and then try to re-enter it. The game should freeze or crash.
 

Attachments

Top