Jump to content

NullReferenceException after Force Wipe

Fixed 1.10.0 1.10.1

0g.Ghost.7373
0g.Ghost.7373

Posted

NullReferenceException: Object reference not set to an instance of an object
  at ItemContainer.Remove (Item item) [0x00069] in <a02df9ca467442d483e493b1d5423b87>:0 
  at Item.SetParent (ItemContainer target) [0x00012] in <a02df9ca467442d483e493b1d5423b87>:0 
  at Item.RemoveFromContainer () [0x00009] in <a02df9ca467442d483e493b1d5423b87>:0 
  at (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Item.MoveToContainer_Patch1(Item,ItemContainer,int,bool,bool,BasePlayer,bool)
  at Oxide.Plugins.BagOfHolding+ContainerSupervisor.TryMoveItemToBag (Oxide.Plugins.BagOfHolding+BagInfo bagInfo, Item item, Oxide.Plugins.BagOfHolding+ItemQuery& itemQuery, System.Boolean requireMatchingItem) [0x0003b] in <e7a2922864984f9f94b5c5e9d381d7bf>:0 
  at Oxide.Plugins.BagOfHolding+ContainerSupervisor.TryGatherItem (Item item, Oxide.Plugins.BagOfHolding+ItemQuery& itemQuery, System.Boolean allowCrossContainerGather) [0x0011f] in <e7a2922864984f9f94b5c5e9d381d7bf>:0 
  at Oxide.Plugins.BagOfHolding+ContainerSupervisor.<StartGathering>b__46_0 (Item item, System.Boolean wasAdded) [0x0015b] in <e7a2922864984f9f94b5c5e9d381d7bf>:0 
  at (wrapper delegate-invoke) System.Action`2[Item,System.Boolean].invoke_void_T1_T2(Item,bool)
  at ItemContainer.Insert (Item item) [0x00047] in <a02df9ca467442d483e493b1d5423b87>:0 
  at Item.SetParent (ItemContainer target) [0x00039] in <a02df9ca467442d483e493b1d5423b87>:0 
  at (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Item.MoveToContainer_Patch1(Item,ItemContainer,int,bool,bool,BasePlayer,bool)
  at PlayerInventory.GiveItem (Item item, ItemMoveModifier modifiers, ItemContainer container, GiveItemOptions options) [0x0004a] in <a02df9ca467442d483e493b1d5423b87>:0 
  at PlayerInventory.MoveItem (BaseEntity+RPCMessage msg) [0x0029c] in <a02df9ca467442d483e493b1d5423b87>:0 
  at PlayerInventory.OnRpcMessage (BasePlayer player, System.UInt32 rpc, Network.Message msg) [0x001e4] in <a02df9ca467442d483e493b1d5423b87>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
PlayerInventory:OnRpcMessage(BasePlayer, UInt32, Message)
BaseEntity:SV_RPCMessage(UInt32, Message)
ServerMgr:OnRPCMessage(Message)
ServerMgr:OnNetworkMessage(Message)
Facepunch.Network.Raknet.Server:ProcessRead(NetRead)
Network.BaseNetwork:Cycle()
ServerMgr:Update()

********/*******/0g.Ghost kicked: RPC Error in MoveItem

 

0g.Ghost.7373

Posted

I noticed it one time. Not sure exactly what caused it. I was moving stuff from a box to a bag and kicked.

BlackLightning

Posted

Thanks for reporting this issue. I was able to reproduce it with cookable items when my inventory was mostly empty. I just released a patch in v1.10.1. Please test it and report back if you experience any further issues.

  • Like 1
0g.Ghost.7373

Posted

Failed to call hook 'CanMoveItem' on plugin 'BagOfHolding v1.10.1' (ArgumentException: An item with the same key has already been added. Key: Item.bigcatmeatx440.5201958)
  at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x0015a] in <f98723dd4586469db5213ec59da723ca>:0 
  at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <f98723dd4586469db5213ec59da723ca>:0 
  at ListHashSet`1[T].Add (T val) [0x0000c] in <393afa875f814375b634fab998bd7e75>:0 
  at ItemContainer.Insert (Item item) [0x0006f] in <a02df9ca467442d483e493b1d5423b87>:0 
  at Item.SetParent (ItemContainer target) [0x00039] in <a02df9ca467442d483e493b1d5423b87>:0 
  at (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Item.MoveToContainer_Patch1(Item,ItemContainer,int,bool,bool,BasePlayer,bool)
  at PlayerInventory.GiveItem (Item item, ItemMoveModifier modifiers, ItemContainer container, GiveItemOptions options) [0x0004a] in <a02df9ca467442d483e493b1d5423b87>:0 
  at PlayerInventory.GiveItem (Item item, ItemContainer container, GiveItemOptions options) [0x00000] in <a02df9ca467442d483e493b1d5423b87>:0 
  at Oxide.Plugins.BagOfHolding.CanMoveItem (Item item, PlayerInventory playerInventory, ItemContainerId targetContainerId, System.Int32 targetSlot, System.Int32 amount) [0x0002b] in <e3c4ec0c0ef748b79068dc5872dde8ce>:0 
  at Oxide.Plugins.BagOfHolding.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x010ff] in <e3c4ec0c0ef748b79068dc5872dde8ce>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <42f9bedc659b4f4786eb778d3cd58968>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000de] in <15f61ddda771464d8246ebdce8ff4811>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <15f61ddda771464d8246ebdce8ff4811>:0 

Trying to hover loot in a BOH to my Inventory to pu tit in a box. Get this now and then. 

BlackLightning

Posted

I've taken a look and I suspect that is an artifact of the original issue. Basically the original issue caused the item movement to be interrupted with an error, leaving your player inventory in a bad state where it has a stale record of the cookable item, so when you later try to add that cookable to your inventory again, there is a conflict because that item is already known. If this is the cause, there are multiple ways to resolve it, including the following.

  1. Reboot the server
  2. Recreate the cookable items somehow, such as by splitting each one into two stacks and then placing the original stack onto the new stack
  3. Kill your player, then disconnect from the server while dead. When you reconnect and then respawn, you will have a new fresh inventory object clear of the bad state
  • Like 1
BlackLightning

Posted

Changed Status from Work in Progress to Fixed

Changed Fixed In to 1.10.1

2.2m

Downloads

Total number of downloads.

10.3k

Customers

Total customers served.

148.9k

Files Sold

Total number of files sold.

3.2m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.