I am encountering a crash in my .NET 6 MAUI utility operating on iOS. This situation solely seems within the launch construct; the debug construct works with out points. The crash appears to happen randomly, and I’ve symbolicated the crash stories to determine potential causes.
Listed below are the main points from the crash report:
- Crash when accessing
mono_aot_Microsoft_Maui_Controls_eh_frame + 369012
- Crash at
Microsoft_iOS_UIKit_UINavigationItem_get_RightBarButtonItems (UINavigationItem.g.cs:1087)
And this is the output from atos
symbolication:
mono_aot_Microsoft_Maui_Controls_eh_frame (in ixxX) + 369012
Microsoft_iOS_UIKit_UINavigationItem_get_RightBarButtonItems (in ixxX) (UINavigationItem.g.cs:1087)
Surroundings:
- .NET MAUI model: 6
- Xamarin.Kinds model: [if applicable]
- iOS model: 16.6.1
- Machine: iPhone 11
- Construct configuration: Launch
- Improvement setting: Visible Studio for Mac 17.6.6
Pakcages we use:
- BouncyCastle.NetCore (1.9.0)
- CsvHelper (30.0.1)
- Microsoft.Extensions.Internet hosting.Abstractions (7.0.0)
- MudBlazor (6.9.0)
- Moveable.BouncyCastle (1.9.0)
- sqlite-net-pcl (1.8.116)
- SQLiteNetExtensions (2.1.0)
- SQLiteNetExtensions.Async (2.1.0)
- SQLitePCLRaw.bundle_green (2.1.6)
- SQLitePCLRaw.supplier.dynamic_cdecl (2.1.6)
My questions are as follows:
- What could possibly be inflicting a crash within the
mono_aot
portion of a .NET 6 MAUI app, particularly in launch builds? - Is the
UINavigationItem
‘s proper bar button objects crash a recognized situation in .NET 6 MAUI apps on iOS, and what are potential workarounds?
To diagnose or resolve the problem, I’ve:
- Cleaned and rebuilt the venture a number of occasions.
- Reviewed the Xamarin.Kinds and .NET MAUI repositories for comparable points. I’ve observed others experiencing issues with launch builds, the place setting the interpreter to
true
is commonly recommended as a workaround, however this has not resolved my situation. - Confirmed that the problem is particular to the discharge construct and isn’t current within the debug construct.
Related issues:
https://github.com/dotnet/maui/points/11266
https://github.com/dotnet/maui/points/13019