"Uncaught ExitStatus ExitStatus" Encountered Instantiating New XmlSerializer() [WASM] #10071
Replies: 6 comments 5 replies
-
Thanks for the report. In general, this is related to the use of the linker, you may want to validate its configuration. Otherwise, this is a runtime issue we're unlikely to be able to fix directly, other than trying to upgrade to the latest Uno.Wasm.Bootstrap (7.0-dev) to target a more recent version of the .NET runtime. |
Beta Was this translation helpful? Give feedback.
-
UPDATE #2 : I have worked-around However, when I switch to RELEASE and run using WASM, I continue to experience the
When I drill into the XmlSerializer constructor's code, I observe that all the _ctor overloads have the following RequiresUnreferencedCode warning attribute. I am not sure if this is related:
I upgraded all the Uno.UI libs to v4.5.14 and the Uno.Wasm.Bootstrap libs to v7.0.0-dev.218 as detailed above.
@jeromelaban - Do you have any idea why WASM would work in DEBUG but throw exceptions in RELEASE ? |
Beta Was this translation helpful? Give feedback.
-
@jeromelaban - I dont think its the the Linker. I updated the I noticed in the Uno documentation on .NET version support that for WASM the Max .NET version is net5. I also read that :
So here are my questions :
|
Beta Was this translation helpful? Give feedback.
-
Are we talking about this WasmShellILLinkerEnabled setting (for which FALSE is already the default setting for new projects) - or is there something different that I am totally missing ?
If its Interesting observationI was, however, able further troubleshoot the issue trying to instantiate the SimulationResult class (that implements an interface which uses a default interface methods). I created a slimmed-down version of the class/interface and observed that "Uncaught ExitStatus ExitStatus" is only encountered when the default method is defined inside the interface - NOT when it is defined inside a derived class.
|
Beta Was this translation helpful? Give feedback.
-
Using Bootstrapper (version="7.0.0-dev.218") I still see the "Uncaught ExitStatus ExitStatus" message, but now there is a new "mono_wasm_stringify" bit at the top.
|
Beta Was this translation helpful? Give feedback.
-
Current behavior
In a project that has both a WinUI3 & WASM client, I have many services that make XML-based API calls ( the API calls cannot be converted to JSON ). The WinUI client can make ALL the API calls successfully. However on WASM, one particular API call fails when calling the XmlSerializer constructor. XmlSerializer _ctor takes "System.Type" as an argument - and all my the other custom classes/types can be successfully passed to the _ctor on both WinUI & WASM.
On WASM, just the one of my custom classes/types causes an "Uncaught ExitStatus ExitStatus" report to be displayed in the DEBUG OUTPUT. When this happens the C# code appears to just stop running, but the APP doesnt crash. No error is thrown by the XmlSerializer _ctor, and no further log events are recorded.
Expected behavior
The WASM client should be able to Instantiate an new XmlSerializer() in the same way that WinUI does. At a minimum, a catchable exception should be thrown - rather than the tread just seeming to end.
How to reproduce it (as minimally and precisely as possible)
The following code causes "Uncaught ExitStatus ExitStatus" do be displayed in DEBUG window OUTPUT. Note that "Finished instantiate", "About to invoke", "Failed To DeSerialize" log items never get written.
Results in the following :
Workaround
No response
Works on UWP/WinUI
Yes
Environment
No response
NuGet package version(s)
Affected platforms
No response
IDE
Visual Studio 2022
IDE version
Microsoft Visual Studio Community 2022 (64-bit) - Preview Version 17.4.0 Preview 2.0
Relevant plugins
No response
Anything else we need to know?
No response
Beta Was this translation helpful? Give feedback.
All reactions