¿XmlSerializer creará documentos vacíos?

Muy bien, el siguiente código que he tenido en producción durante más de un año sin cambios. Ha estado funcionando bastante bien. En el último mes, más de un puñado de máquinas informan que los documentos xml están completamente vacíos. Ni siquiera contienen un encabezado xml. No puedo duplicar los archivos que de repente están vacíos, ni puedo sugerir una forma para que suceda. Espero que alguien haya tenido un problema similar que resolvió.

La mayoría de las máquinas que han estado usando este código lo han estado usando durante aproximadamente un año, si no más. Los archivos vacíos solían tener datos y listas en ellos. Los archivos no se serializan al mismo tiempo. El guardar / serializar uno tras otro antes de que el programa salga.

Mis preguntas: ¿es posible que el siguiente código cree un archivo vacío? ¿Qué más haría que de repente estuvieran vacíos? ¿Alguien más ha tenido problemas con el serializador XML en el último mes? (Este problema solo sucedió en el último mes en versiones que se han mantenido estables durante más de 3 meses).

Si tiene preguntas o me falta algo, pregunte por favor. También hay una gran variedad de tipos que serializo ... así que si puedes imaginarlo, probablemente tenga algo similar que se serialice.

 public class BackEnd<T> {
 public string FileSaveLocation = "this gets set on startup";
 public bool DisabledSerial;
 public virtual void BeforeDeserialize() { }
 public virtual void BeforeSerialize() { }
 public virtual void OnSuccessfulSerialize() { }
 protected virtual void OnSuccessfulDeserialize(ListBackEnd<T> tmpList) { }
 protected virtual void OnDeserialize(ListBackEnd<T> tmpList) { }

 public virtual void serialize()
    {
        if (DisabledSerial)
            return;
        try
        {
            BeforeSerialize();

            using (TextWriter textWrite = new StreamWriter(FileSaveLocation))
            {
                (new XmlSerializer(this.GetType())).Serialize(textWrite, this);
                Debug.WriteLine(" [S]");
                textWrite.Close();
            }
            OnSuccessfulSerialize();
        }
        catch (Exception e)
        {
            Static.Backup.XmlFile(FileSaveLocation);
            Log.ErrorCatch(e,
                "xml",
                "serialize - " + typeof(T) + " - " + (new FileInfo(FileSaveLocation)).Name);
        }

    }

    public virtual object deserialize(TextReader reader)
    {
        if (this.DisabledSerial)
            return false;


        ListBackEnd<T> tmp = null;


        this.BeforeDeserialize();

        if (reader == null && !File.Exists(this.FileSaveLocation))
        {
            Log.Write(Family.Error,
                "xml",
                "deserialize - " + this.GetType() + " - file not found. " + (new FileInfo(FileSaveLocation)).Name);
        }
        else
        {
            try
            {
                using (TextReader textRead = ((reader == null) ? new StreamReader(this.FileSaveLocation) : reader))
                {
                    tmp = (ListBackEnd<T>)this.get_serializer().Deserialize(textRead);
                    Debug.WriteLine(" [D]");
                    textRead.Close();
                }
                OnSuccessfulDeserialize(tmp);

                if (tmp != null)
                {
                    this._Items = tmp._Items;
                    this.AutoIncrementSeed = tmp.AutoIncrementSeed;
                    if (this._Items.Count > this.AutoIncrementSeed && this._Items[0] is ItemStorage)
                        this.AutoIncrementSeed = this._Items.Max(item => (item as ItemStorage).Key);
                }
            }
            catch (Exception e)
            {
                // this only copies the file
                Static.Backup.XmlFile(FileSaveLocation);
                // this only logs the exception
                Log.ErrorCatch(e,
                    "xml",
                    "deserialize - " + typeof(T) + " - " + (new FileInfo(FileSaveLocation)).Name);
            }
        }
        //{ Log.ErrorCatch(e, "xml", "deserialize" + this.GetType() + " - " + this.FileSaveLocation); }

        OnDeserialize(tmp);

        tmp = null;

        return (_Items.Count > 0);
    }
}

Respuestas a la pregunta(2)

Su respuesta a la pregunta