I don't think it's you. I've noticed it on server startup on friday after the update when it was loading entities and I also saw it a few times during my re-write of CLS and CRS over the weekend and yesterday when I wrote CAS. It has become less often since yesterdays update and the entity still spawned everytime.
There is another topic discussing it here => http://oxidemod.org/threads/argumentnullexception-argument-cannot-be-null-parameter-name-key.19328/
Argument cannot be null. Parameter name: key
Discussion in 'Rust Discussion' started by Yatta, Jul 8, 2016.
-
Thanks, ill try to re-update.
-
So I actually ran into the same issue today when trying to update Cornucopia. Did check the prefab name/path and everything seems to be the same as before.
It does seem to spawn/kill the entities, but the error still shows in console.
Did you manage to find a fix for that or do you just ignore that error spam in console?
Code:ArgumentNullException: Argument cannot be null. Parameter name: key at System.Collections.Generic.Dictionary`2[SpawnPopulation,System.Int32].ContainsKey (.SpawnPopulation key) [0x00000] in <filename unknown>:0 at SpawnHandler.AddInstance (.Spawnable spawnable) [0x00000] in <filename unknown>:0 at Spawnable.Add () [0x00000] in <filename unknown>:0 at Spawnable.OnEnable () [0x00000] in <filename unknown>:0 UnityEngine.GameObject:SetActive(Boolean) GameManager:CreatePrefab(String, Vector3, Quaternion, Boolean) GameManager:CreateEntity(String, Vector3, Quaternion, Boolean) Oxide.Plugins.Cornucopia:ReplaceCollectibleWithSomething(String, List`1) Oxide.Plugins.Cornucopia:BatchSpawn(Int32, Int32, String, List`1, Boolean&) Oxide.Plugins.Cornucopia:SubCycle(IEnumerable`1, IEnumerable`1, List`1, Boolean&) Oxide.Plugins.Cornucopia:MainSpawnCycle() Oxide.Plugins.Cornucopia:SpawnCommand(Arg) Oxide.Plugins.Cornucopia:DirectCallHook(String, Object&, Object[]) Oxide.Plugins.CSharpPlugin:InvokeMethod(HookMethod, Object[]) Oxide.Core.Plugins.CSPlugin:OnCallHook(String, Object[]) Oxide.Core.Plugins.Plugin:CallHook(String, Object[]) Oxide.Game.Rust.Libraries.<AddConsoleCommand>c__AnonStorey1:<>m__0(Arg) Oxide.Game.Rust.Libraries.ConsoleCommand:HandleCommand(Arg)
Code:ArgumentNullException: Argument cannot be null. Parameter name: key at System.Collections.Generic.Dictionary`2[SpawnPopulation,System.Int32].ContainsKey (.SpawnPopulation key) [0x00000] in <filename unknown>:0 at SpawnHandler.RemoveInstance (.Spawnable spawnable) [0x00000] in <filename unknown>:0 at Spawnable.Remove () [0x00000] in <filename unknown>:0 at Spawnable.OnDisable () [0x00000] in <filename unknown>:0 UnityEngine.Object:Destroy(Object, Single) GameManager:Destroy(GameObject, Single) BaseNetworkable:EntityDestroy() BaseNetworkable:Kill(DestroyMode) BaseNetworkable:KillMessage()
Last edited by a moderator: Jul 15, 2016 -
After updating server and Oxide to latsest version I have many of these errors due startup and gameplay:
Code:ArgumentNullException: Argument cannot be null. Parameter name: key
Thanks.
UPD
Learned, that it's because of Radtown Animals plugin.Attached Files:
Last edited by a moderator: Jul 15, 2016 -
-
wwulf not sure where to ask about this. I just update rust and Oxide and got this error
ArgumentNullException: Argument cannot be null.
Parameter name: key
System.Collections.Generic.Dictionary`2[SpawnPopulation,System.Int32].ContainsKey (.SpawnPopulation key)
SpawnHandler.RemoveInstance (.Spawnable spawnable)
Spawnable.Remove ()
Spawnable.OnDisable ()
UnityEngine.GameObject:SetActive(Boolean)
Oxide.Plugins.RAController:FixedUpdate() -
The error is still here and is spamming the server console.
Its not really a big deal as long as entities are spawned, but as mentioned it makes loading time for my plugin much much longer as I manually spawn all resources so I would really like to have a fix. Also all that red spam makes it harder to see actual errors. -
Now I am getting this message
UpdateNetworkGroup: Missing parent entity 1717460
UpdateNetworkGroup: Missing parent entity 1717460
UpdateNetworkGroup: Missing parent entity 1717460 -
I tried tricks to skip the error/warning message to try not waste time with console loggings, but didnt work :
try { CreateEntity } catch { }
still logs the error and temporarily shutting down the Console.Out is not allowed - something about permissions.
Im now really stuck with this problem and really need some help / fix / workaround as I cant put my plugin/mod onto a public server with a large map (as in "larger than my size 500 test map") :
Im spawning all resources manually, so on a big map (size 4700) thats +/-13 500 trees, which means about 10 minutes loading time with all the console spamming.
That error only started after the big Rust XP update couple days ago, and entitySpawning was much much faster then. -
Wulf Community Admin
-
Hello,
I keep getting this error and I cant pinpoint what is causing it. Does anyone have an idea?
Picture below.Attached Files:
-
-
Thanks, this did free up the server console.
However it seems that entity spawning isnt faster. So either the slow down wasnt caused by the logging or im just wrong when I think it was spawning "much faster" before - which is entirely possible.
So I have two questions :
- Is the error cause known, can it affect spawn performance, any chance it will be worked on during this week ?
- What is the best way to spawn very large number of entities in the fastest way possible (in my case trees & ore) ?
What im currently doing to spawn my entities :
Code:BaseEntity ent = GameManager.server.CreateEntity(prefabPath, position, Quaternion.Euler(0, UnityEngine.Random.value * 360f, 0), true); ent.Spawn(true);
I thought I remembered doing some tests at the very beginning of my work (before Rust XP patch) and that was faster back then ... might be my imagination tough.
In any case, the server *has* a way to plant trees much faster than that as it does it during world generation in just a couple seconds. I wish I could find a way to do that ...Last edited by a moderator: Jul 19, 2016 -
I guess I will have to wait for an update to the plugin. :~(
Thanks dem000n! -
Hello, help fix it pls.
Code:ArgumentNullException: Argument cannot be null. Parameter name: key System.Collections.Generic.Dictionary`2[SpawnPopulation,System.Int32].ContainsKey (.SpawnPopulation key) SpawnHandler.RemoveInstance (.Spawnable spawnable) Spawnable.Remove () Spawnable.OnDisable () UnityEngine.Object:Destroy(Object, Single) GameManager:Destroy(GameObject, Single) BaseNetworkable:EntityDestroy() BaseNetworkable:Kill(DestroyMode) BaseNetworkable:KillMessage()
Protocol: 1487.133.1 Build Version: 967.76 Build Date: Thursday, August 04, 2016 7:15:36 PM Unity Version: 5.4.0f3 Changeset: 15937 Branch: /main
> oxide.version
[Oxide] 13:09 [Info] Oxide 2.0.2241 for Rust 967.76 (1487) -
Wulf Community Admin
-
i have remove customized animalspawns(plugin) after a wipe than was all ok. i have same fail before : Argument cannot be null Parameter name : key
now all ok but not sure it was the problem or not. -
Hey guys, I had just come across the same problem and I think I know the solution. When I verified the integrity of the game and reload it, it seems to work just fine after a few failed attempts. I hope it works for some of you as well, because I had just made an account to try and help lol