-
Notifications
You must be signed in to change notification settings - Fork 513
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
Entity Framework crashes on Xamarin iOS Device when entity contains many columns #4984
Comments
Thanks for the test case. I can reproduce the issue. It appears to be a limit (or a bug) in the AOT compiler. I'll move the issue to the mono runtime team for investigation/fix. |
https://github-issue-mover.appspot.com seems down right now. |
Hey @spouliot appreciate quick response! Good that we found an issue :) Are there any plans for the fix? Cause this is a major issue for us right now and makes our app completely unusable on iOS devices. |
@kyurkchyan the fix will need some time to be tested/backported to a mono that will be released inside XI. A possible workaround would be to use a class (not a struct) to minimize the nullable fields (you're going over an AOT limit), e.g. by using a |
In this case, the workaround is to use non-nullable fields as much as possible. |
Reopen until the fix is in xamarin.ios. |
… dyncalls. (mono#11186) * [arm64] Remove the limitation on the number of nullable arguments for dyncalls. Fixes xamarin/xamarin-macios#4984. * [amd64] Remove the limitation on the number of nullable arguments for dyncalls. * [jit] Add tests for dyncalls with lots of nullable arguments.
@vargaz @spouliot Thanks for quick responses. This same issue is present even without nullable fields. I was able to reproduce this same issue with this class
The interesting thing is as soon as I make the |
Is the error message the same with the class above ? |
So, When using the With
As you can see this is a different type of exception. As soon as I remove the last property I can assume we have 2 distinct exceptions
Correct me if I'm wrong. |
So thats a different bug, will look into that too. |
…uments for dyncalls. (#11241) * [arm64] Remove the limitation on the number of nullable arguments for dyncalls. Fixes xamarin/xamarin-macios#4984. * [amd64] Remove the limitation on the number of nullable arguments for dyncalls. * [jit] Add tests for dyncalls with lots of nullable arguments. * fix merge conflict
…uments for dyncalls. (#11240) * [arm64] Remove the limitation on the number of nullable arguments for dyncalls. Fixes xamarin/xamarin-macios#4984. * [amd64] Remove the limitation on the number of nullable arguments for dyncalls. * [jit] Add tests for dyncalls with lots of nullable arguments. * fix merge conflict
…uments for dyncalls (#11266) * [arm64] Remove the limitation on the number of nullable arguments for dyncalls. (#11186) * [arm64] Remove the limitation on the number of nullable arguments for dyncalls. Fixes xamarin/xamarin-macios#4984. * [amd64] Remove the limitation on the number of nullable arguments for dyncalls. * [jit] Add tests for dyncalls with lots of nullable arguments. * fix merge conflict
This keeps getting closed by other PR :( |
@spouliot is there a way for me to track when will this get released? |
@kyurkchyan this fix will be included in our |
@rolfbjarne this is a very serious issue for us, we basically can't ship EF core based app. Do you think there's a workaround for this? Otherwise we will have to spend a lot of time and resources to move the current code from EF core to something else. |
@kyurkchyan so the second issue you reported (#4984 (comment)) is not yet fixed. I've opened mono/mono#11613 to track this issue (otherwise we'll most likely lose track of it). Unfortunately there are no official preview releases with this fix yet (first one is planned for early December), but you can try a package from our master branch if you wish (go here: https://github.com/xamarin/xamarin-macios/commits/master, click on the green checkmark for one of the top commits, and download the xamarin.ios*.pkg that shows up). Also I don't know any workaround except tweaking the fields of your classes until the crashes go away :/ Avoid many nullable fields (which is the first bug), but there's obviously a second issue as well which is not related to nullable fields (and since it's not fixed we don't know yet what's causing it). |
@rolfbjarne thanks for the suggestions. Unfortunately the package didn't solve the issue. :( I'll have to find workarounds or switch EfCore to something else at all. |
Bumps to mono/api-snapshot@b99fc87c. Bumps to mono/bockbuild@5af573e7. Bumps to mono/boringssl@41221b45. Bumps to mono/corefx@23d0b584. Bumps to mono/corert@af496fc1. Bumps to dotnet/linker@7af03ce0. Bumps to mono/NUnitLite@00e259a4. Bumps to mono/reference-assemblies@93258263. Bumps to mono/roslyn-binaries@249709fa. Bumps to mono/xunit-binaries@bb583470. $ git diff --shortstat b63e5378..23f2024a # mono 1630 files changed, 50926 insertions(+), 92212 deletions(-) Fixes: mono/mono#6352 Fixes: mono/mono#6947 Fixes: mono/mono#6992 Fixes: mono/mono#7615 Fixes: mono/mono#8340 Fixes: mono/mono#8407 Fixes: mono/mono#8575 Fixes: mono/mono#8627 Fixes: mono/mono#8707 Fixes: mono/mono#8766 Fixes: mono/mono#8848 Fixes: mono/mono#8866 Fixes: mono/mono#8935 Fixes: mono/mono#9010 Fixes: mono/mono#9023 Fixes: mono/mono#9031 Fixes: mono/mono#9033 Fixes: mono/mono#9106 Fixes: mono/mono#9109 Fixes: mono/mono#9155 Fixes: mono/mono#9179 Fixes: mono/mono#9232 Fixes: mono/mono#9234 Fixes: mono/mono#9262 Fixes: mono/mono#9277 Fixes: mono/mono#9292 Fixes: mono/mono#9318 Fixes: mono/mono#9318 Fixes: mono/mono#9332 Fixes: mono/mono#9407 Fixes: mono/mono#9421 Fixes: mono/mono#9505 Fixes: mono/mono#9542 Fixes: mono/mono#9581 Fixes: mono/mono#9623 Fixes: mono/mono#9684 Fixes: mono/mono#9750 Fixes: mono/mono#9753 Fixes: mono/mono#9772 Fixes: mono/mono#9839 Fixes: mono/mono#9869 Fixes: mono/mono#9921 Fixes: mono/mono#9943 Fixes: mono/mono#9947 Fixes: mono/mono#9973 Fixes: mono/mono#9996 Fixes: mono/mono#10000 Fixes: mono/mono#10031 Fixes: mono/mono#10035 Fixes: mono/mono#10227 Fixes: mono/mono#10243 Fixes: mono/mono#10303 Fixes: mono/mono#10448 Fixes: mono/mono#10483 Fixes: mono/mono#10488 Fixes: mono/mono#10863 Fixes: mono/mono#11123 Fixes: mono/mono#11138 Fixes? mono/mono#11146 Fixes: mono/mono#11202 Fixes: mono/mono#11378 Fixes: mono/mono#11479 Fixes: mono/mono#11613 Fixes: #1951 Fixes: xamarin/xamarin-macios#4347 Fixes: xamarin/xamarin-macios#4617 Fixes: xamarin/xamarin-macios#4984
Bumps to mono/api-snapshot@ae01378 Bumps to mono/reference-assemblies@e5173a5 Bumps to mono/bockbuild@d30329d Bumps to mono/boringssl@3d87996 Bumps to mono/corefx@72f7d76 Bumps to mono/corert@1b7d4a1 Bumps to mono/helix-binaries@7e893ea Bumps to mono/illinker-test-assets@f21ff68 Bumps to dotnet/linker@13d864e Bumps to mono/llvm@1aaaaa5 [mono] Bumps to mono/llvm@2c2cffe [xamarin-android] Bumps to mono/NUnitLite@0029561 Bumps to mono/roslyn-binaries@0bbc9b4 Bumps to mono/xunit-binaries@8f6e62e $ git diff --shortstat 886c4901..e66c7667 # mono 3597 files changed, 350850 insertions(+), 91128 deletions(-) $ git diff --shortstat 349752c464c5fc93b32e7d45825f2890c85c8b7d..2c2cffedf01e0fe266b9aaad2c2563e05b750ff4 240 files changed, 18562 insertions(+), 6581 deletions(-) Context: https://github.com/dotnet/coreclr/issues/22046 Fixes: CVE 2018-8292 on macOS Fixes: http://work.devdiv.io/737323 Fixes: https://github.com/dotnet/corefx/issues/33965 Fixes: dotnet/standard#642 Fixes: mono/mono#6997 Fixes: mono/mono#7326 Fixes: mono/mono#7517 Fixes: mono/mono#7750 Fixes: mono/mono#7859 Fixes: mono/mono#8360 Fixes: mono/mono#8460 Fixes: mono/mono#8766 Fixes: mono/mono#8922 Fixes: mono/mono#9418 Fixes: mono/mono#9507 Fixes: mono/mono#9951 Fixes: mono/mono#10024 Fixes: mono/mono#10030 Fixes: mono/mono#10038 Fixes: mono/mono#10448 Fixes: mono/mono#10735 Fixes: mono/mono#10735 Fixes: mono/mono#10737 Fixes: mono/mono#10743 Fixes: mono/mono#10834 Fixes: mono/mono#10837 Fixes: mono/mono#10838 Fixes: mono/mono#10863 Fixes: mono/mono#10945 Fixes: mono/mono#11020 Fixes: mono/mono#11021 Fixes: mono/mono#11021 Fixes: mono/mono#11049 Fixes: mono/mono#11091 Fixes: mono/mono#11095 Fixes: mono/mono#11123 Fixes: mono/mono#11138 Fixes: mono/mono#11146 Fixes: mono/mono#11202 Fixes: mono/mono#11214 Fixes: mono/mono#11317 Fixes: mono/mono#11326 Fixes: mono/mono#11378 Fixes: mono/mono#11385 Fixes: mono/mono#11478 Fixes: mono/mono#11479 Fixes: mono/mono#11488 Fixes: mono/mono#11489 Fixes: mono/mono#11527 Fixes: mono/mono#11529 Fixes: mono/mono#11596 Fixes: mono/mono#11603 Fixes: mono/mono#11613 Fixes: mono/mono#11623 Fixes: mono/mono#11663 Fixes: mono/mono#11681 Fixes: mono/mono#11684 Fixes: mono/mono#11693 Fixes: mono/mono#11697 Fixes: mono/mono#11779 Fixes: mono/mono#11809 Fixes: mono/mono#11858 Fixes: mono/mono#11895 Fixes: mono/mono#11898 Fixes: mono/mono#11898 Fixes: mono/mono#11965 Fixes: mono/mono#12182 Fixes: mono/mono#12193 Fixes: mono/mono#12218 Fixes: mono/mono#12235 Fixes: mono/mono#12263 Fixes: mono/mono#12307 Fixes: mono/mono#12331 Fixes: mono/mono#12362 Fixes: mono/mono#12374 Fixes: mono/mono#12402 Fixes: mono/mono#12421 Fixes: mono/mono#12461 Fixes: mono/mono#12479 Fixes: mono/mono#12479 Fixes: mono/mono#12552 Fixes: mono/mono#12603 Fixes: mono/mono#12747 Fixes: mono/mono#12831 Fixes: mono/mono#12843 Fixes: mono/mono#12881 Fixes: mono/mono#13030 Fixes: mono/mono#13284 Fixes: mono/mono#13297 Fixes: mono/mono#13455 Fixes: mono/mono#13460 Fixes: mono/mono#13478 Fixes: mono/mono#13479 Fixes: mono/mono#13522 Fixes: mono/mono#13607 Fixes: mono/mono#13610 Fixes: mono/mono#13610 Fixes: mono/mono#13639 Fixes: mono/mono#13672 Fixes: mono/mono#13834 Fixes: mono/mono#13878 Fixes: mono/mono#6352 Fixes: mono/monodevelop#6898 Fixes: xamarin/maccore#1069 Fixes: xamarin/maccore#1407 Fixes: xamarin/maccore#604 Fixes: xamarin/xamarin-macios#4984 Fixes: xamarin/xamarin-macios#5289 Fixes: xamarin/xamarin-macios#5363 Fixes: xamarin/xamarin-macios#5381 Fixes: https://issuetracker.unity3d.com/issues/editor-crashes-with-g-logv-when-entering-play-mode-with-active-flowcanvas-script
Steps to Reproduce
dbContext.JobSetups.Add(js);
with the following stack traceExpected Behavior
dbContext.JobSetups.Add(js);
should successfully add the item into the DB contextActual Behavior
dbContext.JobSetups.Add(js);
throws an exceptionEnvironment
Build Logs
https://gist.github.com/kyurkchyan/37c377f8a0545837ebd9fe7d3311ade4
Example Project (If Possible)
EFCoreTest 2.zip
The text was updated successfully, but these errors were encountered: