Annosz / UIInfoSuite2

Ongoing maintenance for the original UI Info Suite mod for Stardew Valley.
1.57k stars 290 forks source link

Red code error in upgrade Pan #591

Closed BlackRosePetals closed 3 months ago

BlackRosePetals commented 3 months ago

Mod Version

2.3.4

Multiplayer

Single Player

Visual Settings

100%

SMAPI Log

No response

Description

[UI Info Suite 2] This mod failed in the Display.RenderingHud event. Technical details: NullReferenceException: Object reference not set to an instance of an object. at UIInfoSuite2.UIElements.ShowToolUpgradeStatus.OnRenderingHud(Object sender, RenderingHudEventArgs e) in C:\Users\Drew\RiderProjects\DH-UIInfoSuite2\UIInfoSuite2\UIElements\ShowToolUpgradeStatus.cs:line 122 at StardewModdingAPI.Framework.Events.ManagedEvent1.Raise(TEventArgs args) in SMAPI\Framework\Events\ManagedEvent.cs:line 101 [UI Info Suite 2] This mod failed in the Display.RenderedHud event. Technical details: NullReferenceException: Object reference not set to an instance of an object. at UIInfoSuite2.UIElements.ShowToolUpgradeStatus.OnRenderedHud(Object sender, RenderedHudEventArgs e) in C:\Users\Drew\RiderProjects\DH-UIInfoSuite2\UIInfoSuite2\UIElements\ShowToolUpgradeStatus.cs:line 131 at StardewModdingAPI.Framework.Events.ManagedEvent1.Raise(TEventArgs args) in SMAPI\Framework\Events\ManagedEvent.cs:line 101

Smapi Keep repeating these error codes.

BlackRosePetals commented 3 months ago

Turning off the upgrade tool icon will stop refreshing the code.

This problem does not occur with other tools,only the "Pan" has this problem.

There is another problem,Upgrade Golden Pan icon is IridiumHoe.

LizardOnTheInternet commented 3 months ago

I can confirm this for iridium pan in multiplayer as host. The icon does not show and this error shows up:

[UI Info Suite 2] This mod failed in the Display.RenderedHud event. Technical details:
NullReferenceException: Object reference not set to an instance of an object.
   at UIInfoSuite2.UIElements.ShowToolUpgradeStatus.OnRenderedHud(Object sender, RenderedHudEventArgs e) in C:\Users\Drew\RiderProjects\DH-UIInfoSuite2\UIInfoSuite2\UIElements\ShowToolUpgradeStatus.cs:line 131
   at StardewModdingAPI.Framework.Events.ManagedEvent`1.Raise(TEventArgs args) in SMAPI\Framework\Events\ManagedEvent.cs:line 101

After collecting the upgraded iridium pan this error stopped refreshing

Rogue-Toast commented 3 months ago

There's a debug build in https://github.com/Annosz/UIInfoSuite2/issues/560#issuecomment-2165753026 that corrects this error.