-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS: Attempting to JIT compile method '(wrapper dynamic-method) void object:WriteArrayOfintToXml (System.Runtime.Serialization.XmlWriterDelegator,object,System.Runtime.Serialization.XmlObjectSerializerWriteContext,System.Runtime.Serialization.CollectionDataContract)' while running in aot-only mode. #47114
Comments
@vargaz should this work? |
Not likely, dynamic methods will only work with the interpreter. |
The test case is C# code that works in current versions of Xamarin.iOS, so one possibility is that it's the BCL that has changed. |
I suspect we may want to hit this code path instead Lines 109 to 112 in 39e8a6e
Which may mean setting this to be ReflectionOnly for iOS/tvOS/MacCatalyst Line 37 in 39e8a6e
@danmoseley who would be the best person to help us confirm this is the right approach? For iOS devices, we basically can't generate any IL on the fly. |
Maybe make it depend on RuntimeFeature.IsDynamicCodeSupported? |
It's reproducible against the simulator when executing
and using the code from the issue description as a functional test |
The issue should be fixed now by #55503, so closing it. |
Description
The following code throws an exception at runtime when running on an iOS device:
Exception:
Repro:
git clone https://github.com/rolfbjarne/xamarin-macios cd xamarin-macios git checkout dotnet-attempting-to-jit-compile-method-WriteArrayOfintToXml ./configure --enable-dotnet make reset make all -j8 make install -j8 make singleview -C tests/dotnet
Complete output
Configuration
.NET 6.0.100-alpha.1.21060.3
Binlog:
MySingleView.binlog.zip
Regression?
No (new feature)
The text was updated successfully, but these errors were encountered: