Somewhere in the code the mod calls a null reference, which causes a recursive loop. There's nothing I can do to fix it sadly.
This mod failed in the Player.InventoryChanged event. Technical details: NullReferenceException: Object reference not set to an instance of an object. at Mods.BundleDisplay.GetCategory(Int32 item) in C:\Users\Hans\source\repos\BundleDisplay\BundleDisplayMod\BundleDisplay.cs:line 171 at Mods.BundleDisplay.CheckInventory(Object sender, InventoryChangedEventArgs e) in C:\Users\Hans\source\repos\BundleDisplay\BundleDisplayMod\BundleDisplay.cs:line 125 at StardewModdingAPI.Framework.Events.ManagedEvent`1.Raise(TEventArgs args) in SMAPI\Framework\Events\ManagedEvent.cs:line 101
Thank you for bringing the problem to my attention. The error indicates to me that the category of the item is not found (for whatever reason). Unfortunately I am not able to reproduce the bug. I could just wrap the code in error handling and I will do that, but I would like to find out what actually causes the problem in that method. I'm guessing you are getting the error when picking up an item.
Does this problem occur when picking up any item or when picking up a specific item? And if it happens with a specific item, can you tell me which one?
I love the mod idea. It has been serving me very well as I can never remember everything I need to donate to the center. it happens that when I hit an empty chest with the pickaxe and it comes to my inventory, the mod says that I need to donate the chest haha. is this bug?
6 comments
This mod failed in the Player.InventoryChanged event. Technical details: NullReferenceException: Object reference not set to an instance of an object. at Mods.BundleDisplay.GetCategory(Int32 item) in C:\Users\Hans\source\repos\BundleDisplay\BundleDisplayMod\BundleDisplay.cs:line 171 at Mods.BundleDisplay.CheckInventory(Object sender, InventoryChangedEventArgs e) in C:\Users\Hans\source\repos\BundleDisplay\BundleDisplayMod\BundleDisplay.cs:line 125 at StardewModdingAPI.Framework.Events.ManagedEvent`1.Raise(TEventArgs args) in SMAPI\Framework\Events\ManagedEvent.cs:line 101
I'm guessing you are getting the error when picking up an item.
Does this problem occur when picking up any item or when picking up a specific item?
And if it happens with a specific item, can you tell me which one?
Unfortunately this is indeed a bug.
I take a look and see how I can fix this.