This is easy to see in the AvalonDock.MVVMTestApp. Replace
```
layoutSerializer.Deserialize(@".\AvalonDock.Layout.config");
```
with
```
using (var stream = new StreamReader(@".\AvalonDock.Layout.config"))
{
using (var xmlReader = System.Xml.XmlReader.Create(stream))
{
layoutSerializer.Deserialize(xmlReader);
}
}
```
and an exception will be thrown on deserialization.
The problem is in LayoutGroup.cs. ReadXml() does not handle the case that reader.NodeType == XmlNodeType.Whitespace after the call to reader.Read(). This results in a NullArgumentException, because serializer will remain null.
Comments: ** Comment from web user: BoucherS **
```
layoutSerializer.Deserialize(@".\AvalonDock.Layout.config");
```
with
```
using (var stream = new StreamReader(@".\AvalonDock.Layout.config"))
{
using (var xmlReader = System.Xml.XmlReader.Create(stream))
{
layoutSerializer.Deserialize(xmlReader);
}
}
```
and an exception will be thrown on deserialization.
The problem is in LayoutGroup.cs. ReadXml() does not handle the case that reader.NodeType == XmlNodeType.Whitespace after the call to reader.Read(). This results in a NullArgumentException, because serializer will remain null.
Comments: ** Comment from web user: BoucherS **
Hi,
Thanks for pointing this out.
Can you submit the AvalonDock.MVVMTestApp please ?
Thanks.