SmartlyDressedGames / Unturned-3.x-Community

Community portion of the Unturned-3.x repo. If you have access to the source code you can find it here:
https://github.com/SmartlyDressedGames/Unturned-3.x/
85 stars 18 forks source link

Last update errors #2524

Closed rube200 closed 1 year ago

rube200 commented 3 years ago

I am not sure if the following errors are related to plugin or update itself but i think it is update so i'm reporting them.

Not sure the origin of this one:

[World] Big Boy [˞˞]: "cant equip anything"
Exception reading message InvokeMethod from client steamid:76561198408233765:
Specified cast is not valid.
  at SDG.Unturned.UseableGun.ReceiveAttachMagazine (System.Byte page, System.Byte x, System.Byte y, System.Byte[] hash) [0x00142] in <39e24d807c1546f7bcd405f31fa564f1>:0
  at SDG.Unturned.UseableGun_NetMethods.ReceiveAttachMagazine_Read (SDG.Unturned.ServerInvocationContext& context) [0x00078] in <39e24d807c1546f7bcd405f31fa564f1>:0
  at SDG.Unturned.ServerMessageHandler_InvokeMethod.ReadMessage (SDG.NetTransport.ITransportConnection transportConnection, SDG.NetPak.NetPakReader reader) [0x0008e] in <39e24d807c1546f7bcd405f31fa564f1>:0
  at SDG.Unturned.NetMessages.ReceiveMessageFromClient (SDG.NetTransport.ITransportConnection transportConnection, System.Byte[] packet, System.Int32 offset, System.Int32 size) [0x00050] in <39e24d807c1546f7bcd405f31fa564f1>:0

Players cant place horde beacon:

Object reference not set to an instance of an object
  at SDG.Unturned.PlayerEquipment.use () [0x00060] in <39e24d807c1546f7bcd405f31fa564f1>:0
  at SDG.Unturned.UseableBarricade.simulate (System.UInt32 simulation, System.Boolean inputSteady) [0x00458] in <39e24d807c1546f7bcd405f31fa564f1>:0
  at SDG.Unturned.PlayerEquipment.simulate_UseableInput (System.UInt32 simulation, System.Boolean inputPrimary, System.Boolean inputSecondary, System.Boolean inputSteady) [0x00112] in <39e24d807c1546f7bcd405f31fa564f1>:0
SDGNelson commented 3 years ago

Thanks for the reports.

  1. It looks like this is probably an ID mismatch between the client and server. I will fix that to use as rather than cast.

  2. Will double-check into this, but we did test horde beacons in singleplayer and multiplayer. I wonder if you have any plugins involving horde beacons? Edit: or plugins patching PlayerEquipment.use maybe - on first glance that method should not be throwing a null reference exception? Unless there is an exception earlier in the logs? If you can attach the full log that might be helpful.

rube200 commented 3 years ago
  1. There is one related to it but if I remember correctly it just affect the loot after complete the beacon
SDGNelson commented 3 years ago
  1. Can you send the full log to my email nelson@smartlydressedgames.com please?
rube200 commented 3 years ago

Sadly i dont have the logs, so i asked to test this again and it cant be reproduce anymore, so i didnt get what really happen. One more thing PlayerClothing.load have a duplicated maskState assign and it misses glassesState assign (it doesnt affect anything in runtime)

SDGNelson commented 3 years ago

Okay, let me know if it happens again. Thanks for the report about the state assignment - will fix. Should run static analysis!

warren39 commented 3 years ago

Exception at 3.21.13.2 [2021-04-03 12:34:02] Exception invoking SDG.Unturned.ZombieManager.ReceiveZombieSpark by client loopback: [2021-04-03 12:34:02] Object reference not set to an instance of an object [2021-04-03 12:34:02] at SDG.Unturned.Zombie.askSpark (UnityEngine.Vector3 target) [0x00009] in <a2d2a50f05a24137803283f0558209d7>:0 at SDG.Unturned.ZombieManager.ReceiveZombieSpark (System.Byte reference, System.UInt16 id, UnityEngine.Vector3 target) [0x0003d] in <a2d2a50f05a24137803283f0558209d7>:0 at SDG.Unturned.ZombieManager_NetMethods.ReceiveZombieSpark_Read (SDG.Unturned.ClientInvocationContext& context) [0x00023] in <a2d2a50f05a24137803283f0558209d7>:0 at SDG.Unturned.ClientMethodHandle.InvokeLoopback (SDG.NetPak.NetPakWriter writer) [0x00049] in <a2d2a50f05a24137803283f0558209d7>:0

Boss zombie sparking a flash of lightning, Server will raise this exception. It seems not my plugin's problem.

SDGNelson commented 3 years ago

@warren39 Thanks for the report! You are right that is my bug. It should be clients-only no loopback. Will fix.