-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
area-Serializationos-iosApple iOSApple iOSos-maccatalystMacCatalyst OSMacCatalyst OSos-tvosApple tvOSApple tvOS
Milestone
Description
Description
Calling XmlSerializer.Deserialize ends up throwing a System.ExecutionEngineException: "Attempting to JIT compile method 'void Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializerContract:.ctor ()' while running in aot-only mode."
EXCEPTION: System.InvalidOperationException: XmlSerializeErrorDetails, 0, 0
---> System.ExecutionEngineException: Attempting to JIT compile method 'void Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializerContract:.ctor ()' while running in aot-only mode. See https://docs.microsoft.com/xamarin/ios/internals/limitations for more information.
at System.Reflection.RuntimeConstructorInfo.InternalInvoke(Object , Object[] , Boolean ) in System.Private.CoreLib.dll:token 0x600269a+0x5
Exception_EndOfInnerExceptionStack
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader , String , XmlDeserializationEvents ) in System.Private.Xml.dll:token 0x6001b05+0x10d
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader , String ) in System.Private.Xml.dll:token 0x6001b04+0x0
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader ) in System.Private.Xml.dll:token 0x6001b02+0x0
at MySimpleApp.Program.XmlSerializationTest.Response.Deserialize(String xml) in /Users/rolf/work/maccore/main/xamarin-macios/tests/dotnet/MySimpleApp/AppDelegate.cs:line 67
at MySimpleApp.Program.XmlSerializationTest.Bug1820_GenericList() in /Users/rolf/work/maccore/main/xamarin-macios/tests/dotnet/MySimpleApp/AppDelegate.cs:line 184
at MySimpleApp.Program.Main(String[] args) in /Users/rolf/work/maccore/main/xamarin-macios/tests/dotnet/MySimpleApp/AppDelegate.cs:line 22
To reproduce:
-
Download & install Xcode 13 beta 3.
-
Clone my fork of xamarin-macios, and checkout the
Bug1820_GenericList-testcasebranch, and build it:git clone https://github.com/rolfbjarne/xamarin-macios git checkout Bug1820_GenericList-testcase cd xamarin-macios ./configure --enable-dotnet --enable-xamarin make reset make all -j8 make install -j8 -
Connect an iOS device
-
Build & run the test project:
make -C tests/dotnet/MySimpleApp/iOS run-dev
Configuration
6.0.100-rc.1.21377.4
Regression?
With regards to legacy Xamarin, yes.
Metadata
Metadata
Assignees
Labels
area-Serializationos-iosApple iOSApple iOSos-maccatalystMacCatalyst OSMacCatalyst OSos-tvosApple tvOSApple tvOS