eideehi / valheim-automatics

[Valheim] Mods that automate a variety of tasks
https://www.nexusmods.com/valheim/mods/1700
MIT License
8 stars 4 forks source link

NullReferenceException #38

Closed LordDelacroix closed 1 year ago

LordDelacroix commented 1 year ago

Is there an existing issue for this?

Mod version

1.4.0

Is this a bug caused by this mod alone?

This mod alone did not reproduce the bug

List of mods to reproduce bug

Build Restriction Tweaks 0.4.0

Enable BRT with Automatics #7 Automatic Repair enabled and you will see the following exception on the console repeatedly:

[Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object Stack trace: CraftingStation.CheckUsable (Player player, System.Boolean showMessage) (at <35c0f7aa1999477788815a7bf78200d7>:0) Automatics.AutomaticRepair.ItemRepair+<>c__DisplayClass8_0.b__0 (CraftingStation x) (at <8c72363294194c5aa81f46a90142a1c5>:0) System.Linq.Enumerable+WhereSelectListIterator2[TSource,TResult].MoveNext () (at <351e49e2a5bf4fd6beabb458ce2255f3>:0) System.Linq.Enumerable+WhereSelectEnumerableIterator2[TSource,TResult].MoveNext () (at <351e49e2a5bf4fd6beabb458ce2255f3>:0) System.Linq.Enumerable.Sum (System.Collections.Generic.IEnumerable`1[T] source) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0) Automatics.AutomaticRepair.ItemRepair.Repair (Player player) (at <8c72363294194c5aa81f46a90142a1c5>:0) Automatics.AutomaticRepair.Module.OnPlayerFixedUpdate (Player player, System.Single delta) (at <8c72363294194c5aa81f46a90142a1c5>:0) (wrapper dynamic-method) Player.DMD(Player)

Either disable Automatics #7 Automatic Repair or uninstall BRT 0.4.0 and the exceptions will stop hapenning.

What happened?

No exceptions flooding the console window.

Steps to reproduce the bug

  1. Install Automatics 1.4.0.
  2. Install Build Restriction Tweaks 0.4.0.
  3. Build a Workbench in a Troll Cave (might want to kill the Troll First).
  4. Enjoy the red exceptions text flying by in the console window.

Logs and screenshots

image

image

The second screenshot only has 2 exceptions because I disabled Automatics #7 Automatic Repair. If I don't do that the exception continue and ultimately impact gaming performance.

eideehi commented 1 year ago

This bug has been fixed in commit c934aa4f063bc5218d98627f7f06011dd646d6e5.

Please wait for the bug fix release. Thank you for reporting the bug.