FunkFrog / ShareSuite

Risk of Rain 2 Item, Money, & Equipment sharing mod build upon BepInEx
https://thunderstore.io/package/FunkFrog-and-Sipondo/ShareSuite/
GNU General Public License v3.0
39 stars 26 forks source link

Error when trading items - NullReferenceException #77

Closed MrReacher closed 4 years ago

MrReacher commented 4 years ago

Installed Mods R2API 2.3.20; LunarCoinShareOnPickup 3.5.0; EmptyChestsBeGone 1.1.0; Faster3DPrinters 1.0.0; ShareSuite 1.13.4; SteamBuildID 1.2.0; R2DSE 1.0.0; BiggerBazaar 1.7.3; ShrineOfDio 1.2.0; StartInBazaar 0.1.0; NoBossNoWait 1.1.1; DropInMultiplayer 3.0.1; Versatile Survivors 1.0.0.

Describe the bug TLDR; When erroring out (see how to reproduce below), in the Bazaar, the green/red item that you may get in exchange for 3/5 of your items will not drop anything, but it will take the items from your inventory. Same applies with the Cleansing Pool. I'm running on a Dedicated Server, if it makes any difference.

[Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object Stack trace: ShareSuite.ItemSharingHooks.IsValidItemPickup (RoR2.PickupIndex pickup) (at <00e2ac8ef8ee4ff29f3ea758de391521>:0) ShareSuite.ItemSharingHooks.OnPurchaseDrop (On.RoR2.ShopTerminalBehavior+orig_DropPickup orig, RoR2.ShopTerminalBehavior self) (at <00e2ac8ef8ee4ff29f3ea758de391521>:0) DMD<>?-1078579200._Hook<RoR2_ShopTerminalBehavior::DropPickup>?101988352 (RoR2.ShopTerminalBehavior ) (at <07dedfa653394e0eba8ba20a6004e3a4>:0) UnityEngine.Events.InvokableCall.Invoke () (at <f2abf40b37c34cf19b7fd98865114d88>:0) UnityEngine.Events.UnityEvent.Invoke () (at <f2abf40b37c34cf19b7fd98865114d88>:0) RoR2.DelayedEvent.Call () (at <9adb18c5484340e58a7afc9827db1de0>:0) RoR2.TimerQueue.Update (System.Single deltaTime) (at <9adb18c5484340e58a7afc9827db1de0>:0) RoR2.RoR2Application.Update () (at <9adb18c5484340e58a7afc9827db1de0>:0)

[Error : Unity Log] IndexOutOfRangeException: Index was outside the bounds of the array. Stack trace: HGArrayUtilities.ArrayRemoveAt[T] (T[]& array, System.Int32& arraySize, System.Int32 position, System.Int32 count) (at <9adb18c5484340e58a7afc9827db1de0>:0) RoR2.TimerQueue.RemoveTimerAt (System.Int32 i) (at <9adb18c5484340e58a7afc9827db1de0>:0) RoR2.TimerQueue.Update (System.Single deltaTime) (at <9adb18c5484340e58a7afc9827db1de0>:0) RoR2.RoR2Application.Update () (at <9adb18c5484340e58a7afc9827db1de0>:0)

To Reproduce Steps to reproduce the behavior:

  1. Go to a Cleansing Pool or an empty Overgrown 3D Printer (someone on the official modding server told me it's also a ShareSuite bug, I'm not sure).
  2. Interact with it.
  3. Make sure it doesn't give anything back. (this only happens when you don't receive anything back from the pool or printer)
  4. See error.

Expected behavior It shouldn't raise any error.

Relevant discussion from the modding server - here The LogOutput.log file if necessary - here

harbingerofme commented 4 years ago

Overgrown 3D Printer issue located as originating from R2API with itemdropAPI submodule enabled. Issue is located and a fix will be implemented shortly.