WSL-DistroManager icon indicating copy to clipboard operation
WSL-DistroManager copied to clipboard

SerializationException

Open merkuriy opened this issue 5 years ago • 7 comments

This exception is thrown when starting an app and when call Refresh [F5].


WslManager v0.7.0 https://github.com/rkttu/WSL-DistroManager/releases/download/0.7.0/WslManagerSetup.exe Intel Core i5-4200H CPU @ 2800Ghz Windows 10 Home x64 1903 (10.0.18362) WSL v1


************** Exception text **************
System.Runtime.Serialization.SerializationException: Ожидается элемент "root" из пространства имен "".. Обнаружен "None" с именем "", пространство имен "". 
   в System.Runtime.Serialization.Json.DataContractJsonSerializer.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName)
   в System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver)
   в System.Runtime.Serialization.Json.DataContractJsonSerializer.ReadObject(XmlDictionaryReader reader)
   в WslManager.Shared.Extensions.LoadWslDistroInfo(String wslQueryExecPath) в C:\Users\rkttu\Projects\WSL-DistroManager\WslManager.Shared\Extensions.cs:строка 58
   в WslManager.SharedRoutines.LoadDistroList() в C:\Users\rkttu\Projects\WSL-DistroManager\WslManager\SharedRoutines.cs:строка 48
   в WslManager.MainForm.PerformRefreshDistroList(Boolean triggeredByUser) в C:\Users\rkttu\Projects\WSL-DistroManager\WslManager\MainForm.cs:строка 45
   в System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   в System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   в System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   в System.Windows.Forms.ToolStripItem.PerformClick()
   в WslManager.MainForm.MainForm_Load(Object sender, EventArgs e) в C:\Users\rkttu\Projects\WSL-DistroManager\WslManager\MainForm.cs:строка 538
   в System.Windows.Forms.Form.OnLoad(EventArgs e)
   в System.Windows.Forms.Form.OnCreateControl()
   в System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   в System.Windows.Forms.Control.CreateControl()
   в System.Windows.Forms.Control.WmShowWindow(Message& m)
   в System.Windows.Forms.Control.WndProc(Message& m)
   в System.Windows.Forms.Form.WmShowWindow(Message& m)
   в System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded builds **************
mscorlib
    Версия сборки: 4.0.0.0
    Версия Win32: 4.8.3815.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
WslManager
    Версия сборки: 1.0.0.0
    Версия Win32: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/WSLManager/WslManager.exe
----------------------------------------
System.Windows.Forms
    Версия сборки: 4.0.0.0
    Версия Win32: 4.8.3815.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Версия сборки: 4.0.0.0
    Версия Win32: 4.8.3801.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Версия сборки: 4.0.0.0
    Версия Win32: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Версия сборки: 4.0.0.0
    Версия Win32: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
    Версия сборки: 4.0.0.0
    Версия Win32: 4.8.3815.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    Версия сборки: 4.0.0.0
    Версия Win32: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Windows.Forms.resources
    Версия сборки: 4.0.0.0
    Версия Win32: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_ru_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
WslManager.Shared
    Версия сборки: 1.0.0.0
    Версия Win32: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/WSLManager/WslManager.Shared.DLL
----------------------------------------
System.Runtime.Serialization
    Версия сборки: 4.0.0.0
    Версия Win32: 4.8.3825.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
----------------------------------------
SMDiagnostics
    Версия сборки: 4.0.0.0
    Версия Win32: 4.8.3825.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/SMDiagnostics/v4.0_4.0.0.0__b77a5c561934e089/SMDiagnostics.dll
----------------------------------------
System.ServiceModel.Internals
    Версия сборки: 4.0.0.0
    Версия Win32: 4.8.3825.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ServiceModel.Internals/v4.0_4.0.0.0__31bf3856ad364e35/System.ServiceModel.Internals.dll
----------------------------------------
System.RunTime.Serialization.resources
    Версия сборки: 4.0.0.0
    Версия Win32: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization.resources/v4.0_4.0.0.0_ru_b77a5c561934e089/System.Runtime.Serialization.resources.dll
----------------------------------------
mscorlib.resources
    Версия сборки: 4.0.0.0
    Версия Win32: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_ru_b77a5c561934e089/mscorlib.resources.dll

merkuriy avatar Aug 15 '19 14:08 merkuriy

WslManager v0.7.0 is working fine.

merkuriy avatar Aug 15 '19 14:08 merkuriy

Thank you for your reporting. I will update this part of code to ensure better error handling.

rkttu avatar Aug 15 '19 15:08 rkttu

See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text ************** System.Runtime.Serialization.SerializationException: Expecting element 'root' from namespace ''.. Encountered 'None' with name '', namespace ''. at System.Runtime.Serialization.Json.DataContractJsonSerializer.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName) at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver) at System.Runtime.Serialization.Json.DataContractJsonSerializer.ReadObject(XmlDictionaryReader reader) at WslManager.Shared.Extensions.LoadWslDistroInfo(String wslQueryExecPath) in C:\Users\rkttu\Projects\WSL-DistroManager\WslManager.Shared\Extensions.cs:line 58 at WslManager.SharedRoutines.LoadDistroList() in C:\Users\rkttu\Projects\WSL-DistroManager\WslManager\SharedRoutines.cs:line 48 at WslManager.MainForm.PerformRefreshDistroList(Boolean triggeredByUser) in C:\Users\rkttu\Projects\WSL-DistroManager\WslManager\MainForm.cs:line 45 at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e) at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e) at System.Windows.Forms.ToolStripItem.PerformClick() at WslManager.MainForm.MainForm_Load(Object sender, EventArgs e) in C:\Users\rkttu\Projects\WSL-DistroManager\WslManager\MainForm.cs:line 538 at System.Windows.Forms.Form.OnLoad(EventArgs e) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Form.WmShowWindow(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies ************** mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.8.3815.0 built by: NET48REL1LAST_C CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll

WslManager Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Program%20Files/WSLManager/WslManager.exe

System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.8.3815.0 built by: NET48REL1LAST_C CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System Assembly Version: 4.0.0.0 Win32 Version: 4.8.3801.0 built by: NET48REL1LAST_B CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.8.3752.0 built by: NET48REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

System.Configuration Assembly Version: 4.0.0.0 Win32 Version: 4.8.3752.0 built by: NET48REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.8.3815.0 built by: NET48REL1LAST_C CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

System.Xml Assembly Version: 4.0.0.0 Win32 Version: 4.8.3752.0 built by: NET48REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

WslManager.Shared Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Program%20Files/WSLManager/WslManager.Shared.DLL

System.Runtime.Serialization Assembly Version: 4.0.0.0 Win32 Version: 4.8.3825.0 built by: NET48REL1LAST_B CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll

SMDiagnostics Assembly Version: 4.0.0.0 Win32 Version: 4.8.3825.0 built by: NET48REL1LAST_B CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/SMDiagnostics/v4.0_4.0.0.0__b77a5c561934e089/SMDiagnostics.dll

System.ServiceModel.Internals Assembly Version: 4.0.0.0 Win32 Version: 4.8.3825.0 built by: NET48REL1LAST_B CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ServiceModel.Internals/v4.0_4.0.0.0__31bf3856ad364e35/System.ServiceModel.Internals.dll

************** JIT Debugging ************** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled.

For example:

When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.

Peredery avatar Aug 16 '19 11:08 Peredery

@merkuriy @ArtyomPerederiy v0.7.0 uses separate utility called WslQuery to list up installed WSL distros. I assume that WslQuery fails to query due to unexpected conditions. Could you attach the result of WslQuery exeuction? It'll be helpful. (WslQuery.exe comes from https://github.com/rkttu/WslQuery and it's binary included with the v0.7.0 release.)

rkttu avatar Aug 16 '19 14:08 rkttu

After ~10s, i got nothing clear_wsl_querry

Peredery avatar Aug 16 '19 14:08 Peredery

After run, I also have silence. I tried to run as admin and as a regular user.

PS C:\Program Files\WSLManager> .\WslQuery.exe --pretty
PS C:\Program Files\WSLManager>

merkuriy avatar Aug 16 '19 15:08 merkuriy

I have the same problem. I have Windows 10 1909 I tested the separately downloaded wslquery and it does not show any output - as in the comments above.

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Runtime.Serialization.SerializationException: Expecting element 'root' from namespace ''.. Encountered 'None'  with name '', namespace ''. 
   at System.Runtime.Serialization.Json.DataContractJsonSerializer.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName)
   at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver)
   at System.Runtime.Serialization.Json.DataContractJsonSerializer.ReadObject(XmlDictionaryReader reader)
   at WslManager.Shared.Extensions.LoadWslDistroInfo(String wslQueryExecPath) in C:\Users\rkttu\Projects\WSL-DistroManager\WslManager.Shared\Extensions.cs:line 58
   at WslManager.SharedRoutines.LoadDistroList() in C:\Users\rkttu\Projects\WSL-DistroManager\WslManager\SharedRoutines.cs:line 48
   at WslManager.MainForm.PerformRefreshDistroList(Boolean triggeredByUser) in C:\Users\rkttu\Projects\WSL-DistroManager\WslManager\MainForm.cs:line 45
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.PerformClick()
   at WslManager.MainForm.MainForm_Load(Object sender, EventArgs e) in C:\Users\rkttu\Projects\WSL-DistroManager\WslManager\MainForm.cs:line 538
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4075.0 built by: NET48REL1LAST
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
WslManager
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/WSLManager/WslManager.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4042.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4001.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4075.0 built by: NET48REL1LAST
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
WslManager.Shared
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/WSLManager/WslManager.Shared.DLL
----------------------------------------
System.Runtime.Serialization
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3825.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
----------------------------------------
SMDiagnostics
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3825.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/SMDiagnostics/v4.0_4.0.0.0__b77a5c561934e089/SMDiagnostics.dll
----------------------------------------
System.ServiceModel.Internals
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3825.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ServiceModel.Internals/v4.0_4.0.0.0__31bf3856ad364e35/System.ServiceModel.Internals.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

vbrozik avatar Jan 02 '20 14:01 vbrozik