System.Reflexion errors

Regnak

Well-Known Member
Apr 1, 2013
300
49
Belgium
Hello,


I have some errors popping up in the console on the server. Those line are 'red', but it seems Vita-Nex is behaving correctly. They only appear at startup of the Shard.

Here they are :
Code:
[VitaNexCore]:
[VitaNexCore]: Load action started...
[VitaNexCore]: Loading Services...
[VitaNexCore]: Loading Modules...
[VitaNexCore]: Load action completed in 0.08 seconds
[VitaNexCore]:
[VitaNexCore]: Invoke action started...
[VitaNexCore]: Invoking Services...
[VitaNexCore]: Invoking Modules...
[VitaNexCore]: System.Reflection.TargetException: Non-static method requires a target.
   at System.Reflection.RuntimeMethodInfo.CheckConsistency(Object target)
   at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at VitaNex.VitaNexCore.TryCatch(Delegate action, Action`1 handler) in C:\UO\server\Scripts\Custom\Systems\VitaNex\Core\VitaNex.cs:line 623
[VitaNexCore]: System.Reflection.TargetException: Non-static method requires a target.
   at System.Reflection.RuntimeMethodInfo.CheckConsistency(Object target)
   at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at VitaNex.VitaNexCore.TryCatch(Delegate action, Action`1 handler) in C:\UO\server\Scripts\Custom\Systems\VitaNex\Core\VitaNex.cs:line 623
[VitaNexCore]: Invoke action completed in 0.06 seconds
I'm actually not sure what is going on there.
I only noticed that moving the server the another folder didn't fix the problem, but it seems the errors there were still pointing to the old folder (eg. I moved it to a D:\ and it was still pointing to the C:\). Compiling the code again was fixing it to the right path, but not solving the issue of those 'red lines'.

Anyone could help ?

Thx :)

-Rek-


Edit : and with a screenshot
Capture002.PNG
 
Last edited:

Burner

Member
Mar 24, 2013
22
3
32
Shard Name
Akara Essex
I've just gotten this same thing after merging with the newest changes in servuo. Prior to the merge, there was no issue - Last update would have been a few months ago though - so something in hte last 3 months I think.
 

Regnak

Well-Known Member
Apr 1, 2013
300
49
Belgium
Hi !

Thanks ! I was starting to wonder if I was the only having this...

I haven’t found yet how to get rid of those lines, but it seems to have no impact on VNC itself in game. However, I haven’t activated any modules yet... because of this. I wanted to use instanced dungeons too, but I am postponing it until I am 100% sure VNC and latest ServUO are working flawlessly together ;)

And indeed, I am using latest ServUO’s repository. Well my latest merge was 1 month ago.
Would it limit our search to a commit that is 2-3 months old ? lol

I will let you know if I eventually find what is wrong.
 

Burner

Member
Mar 24, 2013
22
3
32
Shard Name
Akara Essex
Ok, so - I did find that my last merge was done on Feb 15, before todays. So the change is likely something between then and now
 

Regnak

Well-Known Member
Apr 1, 2013
300
49
Belgium
Oh cool !
So that would limit us to Feb—>Apr ?

If we consider that it’s a commit changing core files, that wouldn’t mean a lot of scripts to check :
/Server/Scripts/...
/Server/Network/...
/Server/EventSink.cs
/Server/Item.cs
/Server/Main.cs
/Server/Mobile.cs
/Server/MultiData.cs
/Server/Region.cs
/Server/Skills.cs

And I haven’t checked what latest commits were about as I have been busy with other things ;)

Thanks anyway for all those useful pieces of information. I will try to assemble the puzzle again this weekend. :)
 

Asteria

Well-Known Member
Sep 4, 2018
85
10
29
legendsofsosaria.wixsite.com
Shard Name
Legends of Sosaria
Donate
Donate money to this user
Would love to know if anyone figures this out. I'm having the same issue, I just installed a fresh copy of servuo a few days ago to update my repo, put in VNC and got the same error coming in.
 
  • Like
Reactions: Regnak

Regnak

Well-Known Member
Apr 1, 2013
300
49
Belgium
Okay, then it seems to be global.

Has anyone tried the latest version of ServUO and VNC ? My version is one month old, so this may have been fixed in the last commits.

I don’t know which way to go to fix this..
Should we try to find what update in ServUO are throwing the errors ?
Or should we try to see how to fix it in Vita-Nex ?
My opinion is to wait for @Vorspire to publish an update to VNC... as it is an issue for everyone... hopefully he reads this ;)
 

Vorspire

Vita-Nex: Core
Admin
ServUO Developer
Jul 29, 2013
1,112
216
32
United Kingdom
core.vita-nex.com
Shard Name
Ultima Shards: Multiverse
Donate
Donate money to this user
It was probably the removal of the "Sleep" or "Asleep" method/property in Mobile.
Vita-Nex uses reflection to determine which implementation of certain methods exist, if any at all.

If Vita-Nex doesn't outright crash your shard when it encounters an error, then it's safe to continue as that's the way I designed the project.
If an exception is thrown by a system that is critical to the running of the shard, then it will allow it to crash, otherwise it just eats the errors and carries on.

Yea, I also get these errors on my local tests, as well as a flood of conflicting type ID messages - it's safe to ignore them all for now.