Please join us on
Visual Studio Developer Community and in the
Xamarin and
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Links.

Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.

Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.

Below is a copy of the original issue as reported at https://github.com/aspnet/EntityFramework/issues/9249 by https://github.com/Thetyne. Repro code is provided below as a github repo. From the EF Core perspective, we would like to know if this is expected, if there anything Xamarin, EF Core or the user can do to overcome it. Please feel free to follow up on the original issue on github or on email.
EntityFramework crash when I insert a row inside table. it crash only on iOS Device (iPod Touch and iPad mini 4).
I have try successfully onAndroid Device and iOS Simulator.
But when i use on iOS device, it fall to Xamarin iOS limitation.
First way : when i have a nullable type inside TrainingDayRow table (exemple : int? unit)
```
Exception message:
Stack trace:
{System.ExecutionEngineException: Attempting to JIT compile method '(wrapper runtime-invoke) <Module>:runtime_invoke_void__this___object_int_int_int_int_DateTime_DateTime_DateTime_Nullable`1<int> (object,intptr,intptr,intptr)' while running in aot-only mode. See https://developer.xamarin.com/guides/ios/advanced_topics/limitations/ for more information.
at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.12.0.14/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:661
--- End of stack trace from previous location where exception was thrown ---
```
Second way : Have a table with a lot of column (here on TrainingExerciseRow with 14 columns)
```
Exception message:
Stack trace:
{System.ExecutionEngineException: Attempting to JIT compile method '(wrapper runtime-invoke) <Module>:runtime_invoke_void__this___object_int_int_int_int_DateTime_DateTime_DateTime_int (object,intptr,intptr,intptr)' while running in aot-only mode. See https://developer.xamarin.com/guides/ios/advanced_topics/limitations/ for more information.
at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.12.0.14/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:661
--- End of stack trace from previous location where exception was thrown ---
```
### Steps to reproduce
Clone my Github source and just click to "+".
Source code
[https://github.com/Thetyne/XamarinTodo](https://github.com/Thetyne/XamarinTodo)
### Further technical details
EntityFrameworkCore 2.0.0-preview2-final
NetStandard 2.0.0.0-preview2-25401-01
Database Provider: Microsoft.EntityFrameworkCore.Sqlite
Operating system: iOS/Macosx
IDE: Visual Studio Community 2017 for Mac Version 7.1 Preview (7.1 build 1281)

I can confirm I also have an issue with this. When loading or creating a model with a Nullable field using EFCore, it fails with an exception:
System.ExecutionEngineException: Attempting to JIT compile method '(wrapper runtime-invoke) <Module>:runtime_invoke_void__this___int_byte_byte_byte_byte_byte_object_object_object_object_object_object_object_object_object_object_Nullable1<int> (object,intptr,intptr,intptr)' while running in aot-only mode. See https://developer.xamarin.com/guides/ios/advanced_topics/limitations/ for more information.
at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:661
--- End of stack trace from previous location where exception was thrown ---
And as mentioned in the original issue from Github, it only happens on the actual iOS device, it works fine on the simulator.

I actually couldn't get the project linked in by Diego working either, so I created my own one: https://github.com/ns-wgilmour/EFCoreNullables, which produces the errors on my device.
It should just simply be a case of pull, restore packages, compile and go, using Visual Studio Community for Mac version 7.0.1, and Xamarin.iOS 10.10.0.36.
Doing this little test project seems to indicate that it may actually be just the number of columns that is causing the problem, as I can seem to create types with Nullables and a small number (3, including primary and foreign key) of fields no problem.

Hello, we are getting the same issue using EF Core on iOS with Xamarin Forms. Works fine in the simulator but crashes on the device. This is a huge blocking point for us, is there any workaround or eta?

@Zoltan, yes I can reproduce, but the test project from comment #7 doesn't crash, since it catches the ExecutionEngineExceptions (and prints them out).
Some of the application output looks like this:
// ----- NullableMultiFields ----- //
First BigFoos length: 0
Create BigFoo without related Foo: Attempting to JIT compile method '(wrapper runtime-invoke) <Module>:runtime_invoke_void__this___int_object_object_object_object_object_object_object_object_object_object_object_object_object_Nullable`1<int>_object (object,intptr,intptr,intptr)' while running in aot-only mode. See https://developer.xamarin.com/guides/ios/advanced_topics/limitations/ for more information.
Create BigFoo with related Foo: Attempting to JIT compile method '(wrapper runtime-invoke) <Module>:runtime_invoke_void__this___int_object_object_object_object_object_object_object_object_object_object_object_object_object_Nullable`1<int>_object (object,intptr,intptr,intptr)' while running in aot-only mode. See https://developer.xamarin.com/guides/ios/advanced_topics/limitations/ for more information.
BigFoo with related Foo manually created
Second BigFoo load after manual create: Attempting to JIT compile method '(wrapper runtime-invoke) <Module>:runtime_invoke_void__this___int_object_object_object_object_object_object_object_object_object_object_object_object_object_Nullable`1<int>_object (object,intptr,intptr,intptr)' while running in aot-only mode. See https://developer.xamarin.com/guides/ios/advanced_topics/limitations/ for more information.
I reproduced with our xcode9 preview (since that's what I had installed).

I can reproduce, it tries to do a method invoke on this method:
"Microsoft.EntityFrameworkCore.ChangeTracking.Internal.Snapshot`20<int, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string>:.ctor (int,string,string,string,string,string,string,string,string,string,string,string,string,string,string,string,string,string,string,string)"
xamarin.ios currently has some limits on what methods can be dynamically invoked, this method has too arguments.

Thanks Zoltan. We will discuss if thi is feasible in our next triage. We certainly have a threshold over which we use a different mechanism, so it is possible that we could just tweak it to make EF Core work within the current limit.
It would be great if we could have an exact number to work with.

I'have the same problem, when table have more than 13 colums I get this error:
Attempting to JIT compile method '(wrapper runtime-invoke) <Module>:runtime_invoke_void__this___object_byte_object_object_object_object_object_object_object_object_object_int_object_byte (object,intptr,intptr,intptr)' while running in aot-only mode. See https://developer.xamarin.com/guides/ios/advanced_topics/limitations/ for more information.
When is released the fix?