NullReferenceException at OnEntitySpawnedError
In response to mehdin00 ():
open your InfoPanel.cs plugin with notpad++ and remove all and past this and no more errors.Moderat...
Well, this is what I get for copying code that's not official.

Connecting anonymously to Steam Public...Logged in OK
Waiting for user info...OK
Update state (0x5) validating, progress: 0.00 (63243 / 3265553464)
Update state (0x5) validating, progress: 12.49 (407974757 / 3265553464)
Update state (0x5) validating, progress: 26.90 (878416231 / 3265553464)
Update state (0x5) validating, progress: 41.28 (1348178279 / 3265553464)
Update state (0x5) validating, progress: 55.86 (1824231783 / 3265553464)
Update state (0x5) validating, progress: 70.25 (2293993831 / 3265553464)
Update state (0x5) validating, progress: 84.89 (2772144487 / 3265553464)
Update state (0x5) validating, progress: 97.29 (3177131532 / 3265553464)
Error! App '258550' state is 0x4A6 after update job.

It somehow deleted my rust.bat to where it's not there but I cant write a new rust.bat from scratch or restore a copy. I have to name it rust1.bat.

Then it deleted my rustdedicated.exe and the STEAMCMD update-validate cant replace the file thats not even there. It wont take rustdedicated.exe, but it will take rustdedicated1.exe.
WTF?

EDIT: Im not sure if this was caused by the code pasted. it happened within 10 minutes when I shut down.

As I shut down something tried to access my user.cfg file. TBH, in the last couple of weeks I had to write protect user.cfg because it the contents got wiped. Then a week later, my rust dedicated was missing, and my rust.bat, so I set the rust.bat to read only. I didnt do that with rustdedicated.exe.

So this tipe it happened when I shut down after using the code. I literally say an error in console in the shutdown process as follows:

UnauthorizedAccessException: Access to the path "C:\SteamCMD\rust_server\server\
my_server_identity\cfg\users.cfg" is denied.
UnauthorizedAccessException: Access to the path "C:\SteamCMD\rust_server\server\
my_server_identity\cfg\users.cfg" is denied.
at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, Sy
stem.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, S
ystem.Boolean anonymous, System.IO.FileOptions options) [0x0019e] in <ac823e2bb4
2b41bda67924a45a0173c3>:0
at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, Sy
stem.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, S
ystem.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy,
System.Boolean useLongPath, System.Boolean checkHost) [0x00000] in <ac823e2bb42b
41bda67924a45a0173c3>:0
at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,Syst
em.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOption
s,string,bool,bool,bool)
at System.IO.StreamWriter.CreateFile (System.String path, System.Boolean appen

So as you can see somethging targeted the user.cfg again as well. They got access denied because I write protected it.

I use AVG with the latest definitions, as well as Norton power erase scans and everything is clean. The odd file behavior is only in the rust server directory and it targets the rust.bat, rustdedicated.exe, and user.cfg.

Could it be something in the last major unity update? That is when the funny file behavior started.
Failed to call hook 'OnEntitySpawned' on plugin 'InfoPanel v0.9.9' 
(NullReferenceException: Object reference not set to an instance of an 
object)
  at Oxide.Plugins.InfoPanel.OnEntitySpawned (BaseEntity Entity) 
[0x000cc] in :0
at Oxide.Plugins.InfoPanel.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0063e] in :0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0


call in my Console today
In response to pcebastian ():
Failed to call hook 'OnEntitySpawned' on plugin 'InfoPanel v0.9.9' (NullReferenceException: Object...
Same problem here

(09:23:10) | Failed to call hook 'OnEntitySpawned' on plugin 'InfoPanel v0.9.9' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.InfoPanel.OnEntitySpawned (BaseEntity Entity) [0x000cc] in <466de6cb15254c4287d496ff8d5bb917>:0 
  at Oxide.Plugins.InfoPanel.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0063e] in <466de6cb15254c4287d496ff8d5bb917>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0​
In response to Goldie ():
Same problem here

(09:23:10) | Failed to call hook 'OnEntitySpawned' on plugin 'InfoPane...
Check that you have the latest versions of Oxide and Steam, My Infopanel has been working with all the game updates with no problems at all for months ,If i was you I would save my config file (and check it  with validator) in a text file (for later transfer) then delete plugin/data/config files and reinstall and see if the problems persist.
In response to pookins ():
Check that you have the latest versions of Oxide and Steam, My Infopanel has been working with all t...
Have either Oxide or Rust updated recently? I map wiped yesterday (and ran my server host's update scripts for both) and I'm getting this error. I haven't seen this error before and I've been using this for months. 
In response to Philoludos ():
Have either Oxide or Rust updated recently? I map wiped yesterday (and ran my server host's update s...
Same problem here and yes I have the most recent Rust and Oxide versions (did a reinstall 2 days ago)
I get this:
06:02 [Error] Failed to call hook 'OnEntitySpawned' on plugin 'InfoPanel v0.9.9' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.InfoPanel.OnEntitySpawned (BaseEntity Entity) [0x000cc] in <509c588615874713bf077402918083ee>:0

at Oxide.Plugins.InfoPanel.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0063e] in <509c588615874713bf077402918083ee>:0

at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0

at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0
Hey there I people in new to server owning and the provider I'm with don't offer a tech support I have a hook error and a few mods are not working in rust some don't have an error just don't do anything and one gives a hook error I have the error copied if someone can help It would be greatly appreciated


Failed to call hook 'OnEntitySpawned' on plugin 'InfoPanel v0.9.9' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.InfoPanel.OnEntitySpawned (BaseEntity Entity) [0x00081] in <0dbd01d74d6a49ababd43102fd48a18a>:0 
  at Oxide.Plugins.InfoPanel.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0063e] in <0dbd01d74d6a49ababd43102fd48a18a>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0 

I get this error too everytime I start up the server btw yet it seems like nothing because it works fine
TeaPack
Hello,

i had same message while server restarting. If I reloaded plugin after server fully running, i got no errors. So I added one variable and OnEntitySpawned can doing original function only after OnServerInitialized is called. Now no errors while restart :) I think problem is this function is called too early while server startsup.

My changes in InfoPanel.cs (i also write some original code around the new code - for easy diy change):

At begin of the cs file:

[Info("InfoPanel", "Ghosst / Nogrod / TeaPack", "1.0.0")]

#region DefaultConfigs
private static string DefaultFontColor = "1 1 1 1";
public bool startedup = false;
#endregion

In void OnServerInitialized():

if (ActiveCargoships.Count > 0)
{
CheckCargoship();
}
else
{
Cargoship.Refresh(storedData, PlayerPanels);
}
startedup = true;
}

And finally in OnEntitySpawned:

private void OnEntitySpawned(BaseEntity Entity)
{
if (startedup == false) return;
if (Entity == null) return;

I keep getting errors about wrong symbols.

Can someone just share the whole .cs file so we dont have to go through this much trouble? I know "we dont allow for random plugin versions blabla" but the author hasnt updated this so he doesnt care so why go through all the trouble if it can be easily solved



Merged post

(09:04:03) | Error while compiling: InfoPanel.cs(22,7): error CS1525: Unexpected symbol `bool', expecting `class', `delegate', `enum', `interface', `partial', or `struct'

i have the issue as well every time the server reboots. However, besides this error, I dont have anything else that's broken in the game.. just that error. What are the effects of not having that weird entity thingie? 
The same errors are appearing again after latest update from FP and oxide/umod ( there was a hot fix that helped before the update)
I’ll take a look at it when I get home from my activities today.

If my request to take the plugin over is accepted I should be able to provide a fix today.