AdamsLair / duality

a 2D Game Development Framework
https://adamslair.github.io/duality
MIT License
1.41k stars 286 forks source link

XElement does not work properly with duality serialization #862

Closed Barsonax closed 4 years ago

Barsonax commented 4 years ago

Summary

When serializing a XElement a exception is thrown when deserializing which cause it to write corrupt data which cannot be deserialized properly.

System.ArgumentNullException
  HResult=0x80004003
  Message=Value cannot be null.
Parameter name: name
  Source=System.Xml
  StackTrace:
   at System.Xml.XmlConvert.VerifyNCName(String name, ExceptionType exceptionType)
   at System.Xml.Linq.XName..ctor(XNamespace ns, String localName)
   at Duality.ObjectCreator.CheckActivator(CreateMethod activator, Exception& error) in C:\git\duality\Source\Core\Duality\Utility\ObjectCreator.cs:line 176

  This exception was originally thrown at this call stack:
    [External Code]