I am encountering a crash in my .NET 6 MAUI software working 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 reviews to establish potential causes.
Listed here 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)
Atmosphere:
- .NET MAUI model: 6
- Xamarin.Varieties model: [if applicable]
- iOS model: 16.6.1
- Gadget: iPhone 11
- Construct configuration: Launch
- Growth atmosphere: 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)
- Transportable.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 gadgets 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 challenge a number of occasions.
- Reviewed the Xamarin.Varieties and .NET MAUI repositories for comparable points. I’ve seen 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 restricted 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