Pathoschild / SMAPI

The modding API for Stardew Valley.
https://smapi.io/
GNU Lesser General Public License v3.0
1.86k stars 263 forks source link

Crash when browsing chests #135

Closed Tyrindor closed 8 years ago

Tyrindor commented 8 years ago

I have gotten this crash ~5 times over the course of ~30 hours of playing when browsing chests, usually when putting an item into a chest.

Mods installed: ChestPooling, CalendarAnywhere, FishingMod, GateOpener, GiftTasteHelper. Instant Geode, ToolCharging

Impossible to test if it's a mod or SMAPI itself due to it being pretty rare.

a

AdvizeGH commented 8 years ago

Very likely caused by a mod. Also, SMAPI updated ~9 hours ago and the version you're using in this screenshot is outdated.

Tyrindor commented 8 years ago

I do not think it's caused by a mod, i contacted the chestpooling mod maker and he says it's not on his end. The other mods do not affect chests in any way. and are relatively simple mods.

Any possible idea which other mod it could be in the ones I listed? I tried disabling InstantGeode as that was my next guess, still happened after about 7 hours of playing.

AdvizeGH commented 8 years ago

It's an index out of range exception, meaning the code attempted to access an array/list index that was either less than 0 or larger than the size of the collection. Judging by the code found in StardewValley.Menus.InventoryMenu.hover(int, int, Item) I would hazard a guess that something has caused a discrepancy between the size of InventoryMenu.inventory and InventoryMenu.actualInventory.

This could possibly be a bug in the game itself (he does weird things where he converts an int to a string then back to an int to produce the inventory index), or there could be a mod that isn't adding/removing items from your inventory as gracefully as it should.

Tyrindor commented 8 years ago

Fixed, it was indeed Chest Pooling and he updated it.