JereKuusela / valheim-infinity_hammer

The Unlicense
5 stars 6 forks source link

[Bug] Errors thrown when repairing building pieces #2

Closed virtualbjorn closed 2 years ago

virtualbjorn commented 2 years ago

Suggestion: Possibility to disable this function altogether if Repair Range is set to 0

[Error  : Unity Log] EndOfStreamException: Unable to read beyond the end of the stream.
Stack trace:
System.IO.BinaryReader.FillBuffer (System.Int32 numBytes) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.IO.BinaryReader.ReadSingle () (at <eae584ce26bc40229c1b1aa476bfa589>:0)
ZPackage.ReadSingle () (at <843a49d5cb48439fa5a62a7bcd81c2a9>:0)
ZRpc.Deserialize (System.Reflection.ParameterInfo[] paramInfo, ZPackage pkg, System.Collections.Generic.List`1[System.Object]& parameters) (at <843a49d5cb48439fa5a62a7bcd81c2a9>:0)
ZNetView.Deserialize (System.Int64 callerID, System.Reflection.ParameterInfo[] paramInfo, ZPackage pkg) (at <843a49d5cb48439fa5a62a7bcd81c2a9>:0)
RoutedMethod`1[T].Invoke (System.Int64 rpc, ZPackage pkg) (at <843a49d5cb48439fa5a62a7bcd81c2a9>:0)
ZNetView.HandleRoutedRPC (ZRoutedRpc+RoutedRPCData rpcData) (at <843a49d5cb48439fa5a62a7bcd81c2a9>:0)
ZRoutedRpc.HandleRoutedRPC (ZRoutedRpc+RoutedRPCData data) (at <843a49d5cb48439fa5a62a7bcd81c2a9>:0)
ZRoutedRpc.InvokeRoutedRPC (System.Int64 targetPeerID, ZDOID targetZDO, System.String methodName, System.Object[] parameters) (at <843a49d5cb48439fa5a62a7bcd81c2a9>:0)
ZNetView.InvokeRPC (System.Int64 targetID, System.String method, System.Object[] parameters) (at <843a49d5cb48439fa5a62a7bcd81c2a9>:0)
InfinityHammer.Repair.RepairStructure (ZNetView obj) (at <6e0aff153b6e44bfb443db2df38ce15d>:0)
InfinityHammer.AdvancedRepair.Prefix (WearNTear __instance, System.Boolean& __result) (at <6e0aff153b6e44bfb443db2df38ce15d>:0)
(wrapper dynamic-method) WearNTear.DMD<WearNTear::Repair>(WearNTear)
(wrapper dynamic-method) Player.DMD<Player::Repair>(Player,ItemDrop/ItemData,Piece)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
BuildHelper.Patches+AreaRepair+Player_UpdatePlacement.RepairNearby (Player instance, ItemDrop+ItemData toolItem, Piece _1) (at <daa4e9f5f7214d6289cf2feb69608a37>:0)
(wrapper dynamic-method) Player.DMD<Player::UpdatePlacement>(Player,bool,single)
(wrapper dynamic-method) Player.DMD<Player::Update>(Player)
JereKuusela commented 2 years ago

Could you test if version 1.13 fixed this?

virtualbjorn commented 2 years ago

As of now i don't see the errors pop up, I'll hold closing this comment for now and test it for awhile. I found another problem though after the update. I'll open another ticket for it.