SmartlyDressedGames / Legally-Distinct-Missile

Fork of Rocket for Unturned maintained by the game developers.
MIT License
79 stars 29 forks source link

Having an issue with weather command since updating. #59

Closed joeymisfit closed 1 year ago

joeymisfit commented 1 year ago

Hey @SDGNelson,

Since updating to the latest RocketMod I've noticed this error everytime weather none is called and it's constantly raining on the server due to this bug.

_[RocketMod] An error occured while executing weather [none]: System.ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds at System.Array.Copy (System.Array sourceArray, System.Int32 sourceIndex, System.Array destinationArray, System.Int32 destinationIndex, System.Int32 length) [0x000da] in <695d1cc93cca45069c528c15c9fdd749>:0 at System.Array.CopyTo (System.Array array, System.Int32 index) [0x00027] in <695d1cc93cca45069c528c15c9fdd749>:0 at SDG.Unturned.BarricadeManager.updateFarm (UnityEngine.Transform transform, System.UInt32 planted, System.Boolean shouldSend) [0x00059] in <7ceb12853ef448b09d34cf8dbc6469fd>:0 at SDG.Unturned.InteractableFarm.onRainUpdated (SDG.Unturned.ELightingRain rain) [0x0004b] in <7ceb12853ef448b09d34cf8dbc6469fd>:0 at (wrapper delegate-invoke) .invoke_voidELightingRain(SDG.Unturned.ELightingRain) at SDG.Unturned.LightingManager.broadcastRainUpdated (SDG.Unturned.ELightingRain rain) [0x00007] in <7ceb12853ef448b09d34cf8dbc6469fd>:0 at SDG.Unturned.LegacyRainComponent.SetRain (SDG.Unturned.ELightingRain rain) [0x00006] in <7ceb12853ef448b09d34cf8dbc6469fd>:0 at SDG.Unturned.LegacyRainComponent.OnBeginTransitionOut () [0x00000] in <7ceb12853ef448b09d34cf8dbc6469fd>:0 at SDG.Unturned.LevelLighting.SetActiveWeatherAsset (SDG.Unturned.WeatherAssetBase asset, System.Single blendAlpha, SDG.Unturned.NetId netId) [0x00015] in <7ceb12853ef448b09d34cf8dbc6469fd>:0 at SDG.Unturned.LightingManager.SetAndReplicateActiveWeatherAsset (SDG.Unturned.WeatherAssetBase asset, System.Single blendAlpha) [0x00015] in <7ceb12853ef448b09d34cf8dbc6469fd>:0 at SDG.Unturned.LightingManager.ResetScheduledWeather () [0x00007] in <7ceb12853ef448b09d34cf8dbc6469fd>:0 at SDG.Unturned.CommandWeather.execute (Steamworks.CSteamID executorID, System.String parameter) [0x00090] in <7ceb12853ef448b09d34cf8dbc6469fd>:0 at SDG.Unturned.Command.check (Steamworks.CSteamID executorID, System.String method, System.String parameter) [0x00018] in <7ceb12853ef448b09d34cf8dbc6469fd>:0 at Rocket.Unturned.Commands.UnturnedCommands+UnturnedVanillaCommand.Execute (Rocket.API.IRocketPlayer caller, System.String[] command) [0x0004c] in :0 at Rocket.Core.Commands.RocketCommandManager+RegisteredRocketCommand.Execute (Rocket.API.IRocketPlayer caller, System.String[] command) [0x00000] in <59a13feb721848c8b0cd173f6d0e820b>:0 at Rocket.Core.Commands.RocketCommandManager.Execute (Rocket.API.IRocketPlayer player, System.String command) [0x00176] in <59a13feb721848c8b0cd173f6d0e820b>:0

For the meantime we've downgraded to the previous version of RocketMod which makes it go away, unsure what went wrong but something is definitely broken. Hopefully we can get a fix for this so that we can use the latest version of RM.

Thank you!

SDGNelson commented 1 year ago

That's concerning! The only change in this version of Rocket was a fix to compatibility with Rocket+OpenMod together hiding chat messages.

I did get a report of the same callstack on Friday without mention of Rocket, and told them it was probably a plugin spawning a farm barricade getting spawned with empty state array. Alternatively, perhaps a mod changed the barricade type from not-farm to farm and so that savedata is mismatched? (re-using same ID and changing type)

I'll double-check placing a farm on the previous and current versions of Rocket and using the weather command.

SDGNelson commented 1 year ago

I just tested with tomato seeds in 3.23.1.2 first with Rocket .14 and then with Rocket .15 by using "/weather storm" and "/weather none". Fortunately no errors - expected behaviour.

Do the farm-spawning plugin or changed barricade asset type line up with recent changes on your server?

joeymisfit commented 1 year ago

Sorry for taking so long to reply back, been trying to heal up from a sinus infection. I noticed when the server starts up it works for like an hour or so and then that starts happening, so I'm assuming it's plugin related now and not RocketMod clashing with it, I do apologize that I didn't test it enough. Thank you for your help on the matter!

SSGamingServers commented 1 year ago

@joeymisfit Hey, how did you fix it? I noticed that it happens when the rain starts, then there is no way to stop it.