Jump to content

Errors KeyNotFound, NullPointer & SetDestination

Pending 1.0.8

theddyrust
theddyrust

Posted

The console is full of KeyNotFoundExceptions, NullPointerExceptions and finally SetDestination can only be called on NavAgent placed on a NavMesh. THis only occurs till Bot's have to respawn. On first spawn Wave after Server Start everything is fine. But when they have to respawn the error's appear in the console, but they do respawn and work as intended. It is just, the console is full of these exceptions that occur like 20 times per tick.

My first question to give a better error code or possibly fix it myself, how the heck can I enable true Exception message, with the actual line and function that had an Exception? I couldn't figure it out.

  • Administrator
Steenamaroo

Posted

Hi,
Thanks for reporting. If there are issues I'll certainly fix them.
What version of BotReSpawn are you running?

If you have server log to file enabled could you DM me a copy of your most recent log?
If not, if you could paste the relevant errors that'd be great.

theddyrust

Posted

Plugin Version: 17:00 [Info] Loaded plugin BotReSpawn v1.0.8 by Steenamaroo

17:00 [Info] Loaded plugin Rust v2.0.5419 by Oxide Team and Contributors
17:00 [Info] Loaded plugin Unity v2.0.3772 by Oxide Team and Contributors

 

But as said the errors are without line and function information otherwhise I could fix them myself

I currently don't have a copy of the Exception for NullPointer oder KeyNotFound, but they were the same without line/function reference. That's I wanted to first ask how to get a better logging of the exceptions thrown.

 

"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
Cecil[6376760] was killed by DonKalli[76561198012816498]
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
Georgiana[6063681] was killed by DonKalli[76561198012816498]
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
Kizzie[505440] was killed by hotairballoon (entity)
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
Reginald[7259630] was killed by DonKalli[76561198012816498]
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
Mayola[6220694] was killed by Anniroc[76561198090857394]
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
Vernie[4097042] was killed by DonKalli[76561198012816498]
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
Doug[2788726] was killed by hotairballoon (entity)
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
  • Administrator
Steenamaroo

Posted

The best logging you'll be able to get is the server log to file.
You can enable that by having -logfile "log.txt" in your startup script, after RustDedicated.exe.

For example - RustDedicated.exe -batchmode -nographics -logfile

If you could enable that then send me a copy of the log file before restarting/shutting down the server, that'd be great. (the file is overwritten each time).

In the mean time, if you see the KeyNotFound error feel free to paste here. It should have useful info with it.

  • Administrator
Steenamaroo

Posted (edited)

Hi,
Looks like it's caused by scientist_roam npcs, so most likely BotReSpawn.
The locations all seem to be bunched around ( 70, 50, -850 ) - Is there anything unusual about that area of the map?
Do you have custom spawn points around that location, or just a random-spawning profile?

 

Thank you!

Edited by Steenamaroo
  • Administrator
Steenamaroo

Posted

No custom spawn points. Ok.
Anything unusual about that area of the map?

theddyrust

Posted

It is where the LaunchSite is located. I deactivated the default LaunchSite profile "autospawn - False" but nothing changed. Then I also saw this error

 

"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
Failed to call hook 'botrespawn' on plugin 'BotReSpawn v1.0.8' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.BotReSpawn.GetBData (BasePlayer player) [0x00081] in <bf2e92add1ab46748c86087431706f31>:0
  at Oxide.Plugins.BotReSpawn.botrespawn (BasePlayer player, System.String command, System.String[] args) [0x00095] in <bf2e92add1ab46748c86087431706f
31>:0 87 ents, 11 slprs                                                                                                          4kb/s in, 48kb/s out
  at Oxide.Plugins.BotReSpawn.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x01d1e] in <bf2e92add1ab46748c8608743170
6f31>:0
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <60c318df79ed41688ea59335e48d61
ad>:0
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <50629aa0e75d4126b345d8d9d64da28d>:0

Then we have these

Invalid NavAgent Position: assets/rust.ai/agents/npcplayer/humannpc/scientist/scientistnpc_cargo.prefab (NPCPlayerNavigator) (-4000.7, 3.1, -1997.2) (destroying) 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Invalid Position: scientist_corpse[11467217] (-4000.5, 10.1, -1984.8) (destroying) 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Invalid Position: item_drop_backpack[11467222] (-4000.5, 10.0, -1984.8) (destroying) 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

9972671[9972671] died (Generic)
Invalid Position: scientist_corpse[11467229] (-4000.6, 4.0, -1975.5) (destroying) 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Invalid Position: item_drop_backpack[11467234] (-4000.6, 3.9, -1975.5) (destroying) 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

In the End my log is full of thousands of errors with placing them, ... Can't be just one spot. 

  • Administrator
Steenamaroo

Posted

Hi,
That first one is a null error in the `/botrespawn info` command, when looking at something that isn't an npc.
I wasn't aware of that one so it's now fixed. Thanks for reporting!

The second paste is about scientists from the cargoship, so not related to BotReSpawn.

 

Sounds like there's some issue with the LaunchSite area, which is good because that's vanilla - I can go and see if I can do something about it.
That's really helpful.

Any spam relating to that profile should stop if you set the profile AutoSpawn false, then reload the profile.
The reload is essential to kill off the current live npcs.

 

I haven't seen your keynotfound error yet so if you're willing, sending me a full console log from the very end of a server cycle, right before restart, would be super helpful.

  • Administrator
Steenamaroo

Posted

That gives me a lot to go on. Thank you.
Would you mind confirming that server setting nav_disable is False and nav_wait is True?

theddyrust

Posted

> nav_disable
aimanager.nav_disable: "False"
> nav_wait
aimanager.nav_wait: "True"

Here ya go. Thx for taking a look into it, as all these Exceptions catched by net framework really have a big hit on the tickrate of the server

  • Administrator
Steenamaroo

Posted

No trouble at all - It needs fixed.
I think I'm going to have to replicate your setup to get this figured out.
Is your map free or procedural? If so could you share that info with me?

If it's paid please DM me the details and I'll reach out to the author about testing with it.
Thanks for the help and patience!

theddyrust

Posted

The world is procedural

+server.seed 322022 +server.worldsize 6000

  • Administrator
Steenamaroo

Posted

Thanks for the info.
I've fired up your map and data files on a test server - so far without issue - but I think I know where the errors are coming from and how to handle it.
While BotReSpawn shouldn't be able to throw errors, and I plan to address that, I think the root cause is just too much pressure on the server.
Looks like your data files are calling for over 1200 npcs, which is quite a lot, and probably just too much once the server's in full swing with population and high entity counts etc.

Anyway...DMing you a copy shortly which should, hopefully, stop there being any errors but, unless I'm wrong, I think it'd be advisable to pull the numbers back 

theddyrust

Posted

Okay awesome thx. I totally understand that it is a bit cranked up on the numbers, I will play a bit around with your new version then. Thx for all your support and time

  • Administrator
Steenamaroo

Posted

No trouble at all.
I'm trying to let it run to provoke the errors, (with some debug) just to confirm I've caught it, but nothing's printed yet.
I'll send it over as soon as I get confirmation ^. 👍

  • Like 1
1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.2k

Files Sold

Total number of files sold.

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.