Full Version : Server crashing
xmlspawner >>Troubleshooting >>Server crashing


<< Prev | Next >>

Admin Ghetto- 12-14-2006
Exception:
System.Runtime.InteropServices.SEHException: External component has thrown an exception.
at System.RuntimeType.GetProperties(BindingFlags bindingAttr)
at Server.Mobiles.BaseXmlSpawner.GetPropertyValue(XmlSpawner spawner, Object o, String name, Type& ptype)
at Server.Mobiles.BaseXmlSpawner.ParseForKeywords(XmlSpawner spawner, Object o, String valstr, Mobile trigmob, Boolean literal, Type& ptype)
at Server.Mobiles.BaseXmlSpawner.CheckSingleProperty(XmlSpawner spawner, Object o, String testString, Mobile trigmob, String& status_str)
at Server.Mobiles.BaseXmlSpawner.CheckPropertyString(XmlSpawner spawner, Object o, String testString, Mobile trigmob, String& status_str)
at Server.Mobiles.BaseXmlSpawner.TestMobProperty(XmlSpawner spawner, Mobile mobile, String testString, Mobile trigmob, String& status_str)
at Server.Mobiles.XmlSpawner.CheckTriggers(Mobile m, Skill s, Boolean hasproximity)
at Server.Mobiles.XmlSpawner.OnTick()
at Server.Mobiles.InternalTimer2.OnTick()
at Server.Timer.Slice()
at Server.Core.Main(String[] args)

This is the error were getting on a server crash.. not quite sure what is going on.

ArteGordon- 12-14-2006
looks like you might have some kind of object or type inconsistency with your server.
If you have updated the server executable, make sure that you also forced a script recompile by either clearing the script cache or modifying a script.

Admin Ghetto- 12-14-2006
Actually the latest update was updating the version of XML Spawner. At that point we have envoked two consistent crashes. One of them with XML as I posted the other seems to have something to do with Chivalry spell Enemy of One. I dont think they are related, however both are new errors

ArteGordon- 12-14-2006
it may result from trying to access an object that is defined in some external .dll that has some problems. You can try to trap it and see what the type is that is causing the problem. This will prevent the crash and will report the object type generating the error to the console.

Around line 1520 in BaseXmlSpawner.cs change this

CODE

       public static string GetPropertyValue(XmlSpawner spawner, object o, string name, out Type ptype)
       {
           ptype = null;
           if (o == null || name == null) return null;

           Type type = o.GetType();
           object po = null;

           PropertyInfo[] props = type.GetProperties(BindingFlags.Static | BindingFlags.Instance | BindingFlags.Public);



to this

CODE

       public static string GetPropertyValue(XmlSpawner spawner, object o, string name, out Type ptype)
       {
           ptype = null;
           if (o == null || name == null) return null;

           Type type = o.GetType();
           object po = null;

           PropertyInfo[] props = null;

           try
           {
               props = type.GetProperties(BindingFlags.Static | BindingFlags.Instance | BindingFlags.Public);
           }
           catch
           {
               Console.WriteLine("GetProperties error with type '{0}'", type);
               return null;
           }


Note that the error message suggests that the problem object is a mobile, and so it is possible that it is also related to your Enemy of One crash.