-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Microsoft.EntityFrameworkCore.Sqlite 7 crash on iOS #28773
Comments
@eerhardt thanks for you attention! I'm using Visual Studio 17.3.1 for Windows 11 and real device iPhone 7plus with hotrestart. Only iOS this error happen! I have already worked with EFCore 3.1 and Xamarin for three plataforms and works well. On Xamarin configuration iOS is:
let me show what is happen on MAUI: 2022_08_19_09_02_50.mp4I've already add : NullabilityInfoContextSupport = true on project file but it doesn't work do you have any idea? |
Can you list what version of
I'm using a mac with When running the app on an iPad simulator in Debug mode, the app works fine. When running with |
I'm using 6.0.8 I'm using a real device "iPhone 7" plus iSO version 15 .. in debug mode .. and hotrestar enable |
What is the output of |
Installed Workload Ids Manifest Version Installation Sourcemaui-android 6.0.486/6.0.400 VS 17.3.32811.315 Use |
Unfortunately, I can't repro this behavior. If I launch the app on a physical phone using VS for Mac, it works correctly. I don't see an exception being thrown. I'm not able to deploy any Maui app to a physical phone from VS on Windows for some reason, and I spent too much time trying to get it to work. I've given up. My suggestions for debugging this would be to get a binlog of the build and inspect the If a binlog doesn't help, inspecting the .dlls in something like ILSpy may help give a clue. Look for the code using this switch: |
Another thing to look for is in the "Build" output (on a fresh build/install), look for the string Here's a snippet of my build output:
|
hey @eerhardt ! something very crazy is happen! When I use iOS emulator error disappear, but if i try real device "iPhone 7 Plus" happens error . see: 2022_08_25_09_10_06.mp4 |
I have tryed to change : System.Reflection.NullabilityInfoContext.IsSupported = true or false.. but error happens |
I've run the EFCore app both from VS for Mac preview on my mac, and from VS for Windows paired with my mac, to a physical iPhone 6S and can't repro this behavior. Can you try running the app on a different development machine? My guess is that there is something specific about your dev machine that is causing this. |
One idea to try to figure this out:
The only thing I can guess is that somehow the |
hi @eerhardt same error here on iPhone 6S Plus and 7Plus, on real device |
@RobertoGFilho - did you try the above to get a binlog? |
hi folks! WORKS: public class Person : ObservableObject DOESN'T WORK public class Person : ObservableObject |
What is ObservableObject? |
hi @ErikEJ , ObservableObject is from MVVMHelpers, you can remove this, but the same error will show up! This error happen only string properties on Model. Only iOS plataform. Please you can reproduce this erro on this demo : https://github.com/RobertoGFilho/EFCore |
|
Hi @eerhardt ! I have done in different machine, the same error shows up! |
Are you able to get a binlog? See #28773 (comment) |
Hi @eerhardt binlog files are bellow: |
Hmm, unfortunately those logs don't contain much information. One thing I was able to confirm was that Did you delete the |
Hi @eerhardt this binlog wore created after: delete the bin and obj folders to ensure everything is clean. the problem is when we have a string property on Model. if i remove this property everythings works see: this error shows up only iOS.. Android and Windows, it's ok |
I don't see why
|
@RobertoGFilho just in order to narrow things down: do you get the same behavior if you use Visual Studio for Mac (on the Mac)? |
hi @rolfbjarne ! I just work on Visual Studio for Windows! i have shared this demo : https://github.com/RobertoGFilho/EFCore |
We set and the test project does not set @RobertoGFilho can you try adding this to your project: <PropertyGroup>
<NullabilityInfoContextSupport>true</NullabilityInfoContextSupport>
</PropertyGroup> and see if that works? |
@rolfbjarne - the efcore/src/EFCore/buildTransitive/net6.0/Microsoft.EntityFrameworkCore.props Lines 3 to 7 in 767bc93
|
@rolfbjarne, @eerhardt i have already tryed , but it doesn't work |
The test project from the initial description works fine when I run it on a Mac. The two binlogs (#28773 (comment), #28773 (comment)) come from a build that wasn't connected to the Mac, and thus only a very simple build was done. @RobertoGFilho, please connect to a mac, build again and get the binlog, or try directly on the Mac (using Visual Studio for Mac) to see if that works for you. |
hi @rolfbjarne @eerhardt binlogs connected to a mac: binlog.zip |
@RobertoGFilho those builds are still not connected to a mac. See: https://learn.microsoft.com/en-us/xamarin/ios/get-started/installation/windows/connecting-to-mac/ |
@rolfbjarne, @ajcvickers @ErikEJ @jsuarezruiz @eerhardt @Eilon @mattleibow i connected to a MAC, but my envioment doesn't use MAC to build a app. See: My Envioroment:
Thecnologies:
I understand that you test on MAC is ok, But the problem here is working on Windows without a MAC. I've been working this way with Xamarin Forms and EF Core 3.1 without problem. But when i started working MAUI and EF 7.xx i not able to work on iOS, because string property on model trigger this error. public class Person On Android and Windows works perfectly. Conclusion |
This is unlikely to be a problem in EFCore if it only occurs in certain build environments, so I'm moving this issue. |
This issue was moved to xamarin/xamarin-macios#16228 |
this is can be worked around this way: https://stackoverflow.com/a/74786481/7149454 |
EfCore 7 crash on iOS MAUI app. Please you can reproduce this erro on this demo : https://github.com/RobertoGFilho/EFCore
Visual studio 17.3.1
Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.0-preview.7.22376.2"
The text was updated successfully, but these errors were encountered: