0

I'm currently migrating a Xamarin iOS binding library to .NET 6 and when I try to run the sample app (that I've also migrated to MAUI and that works on Android), I get the following stack trace:

=================================================================
    Native Crash Reporting
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

=================================================================
    Native stacktrace:
=================================================================
    0x1032ff3e0 - /private/var/containers/Bundle/Application/F89D0267-2709-444E-A12D-D8C5FD797B03/SimpleDemo.app/SimpleDemo : _ZNK3icu6number23NumberFormatterSettingsINS0_24LocalizedNumberFormatterEE10toSkeletonER10UErrorCode
    0x1032ea4dc - /private/var/containers/Bundle/Application/F89D0267-2709-444E-A12D-D8C5FD797B03/SimpleDemo.app/SimpleDemo : _ZNK3icu6number23NumberFormatterSettingsINS0_24LocalizedNumberFormatterEE10toSkeletonER10UErrorCode
    0x1034117e4 - /private/var/containers/Bundle/Application/F89D0267-2709-444E-A12D-D8C5FD797B03/SimpleDemo.app/SimpleDemo : _ZNK3icu6number23NumberFormatterSettingsINS0_24LocalizedNumberFormatterEE10toSkeletonER10UErrorCode
    0x1032febf4 - /private/var/containers/Bundle/Application/F89D0267-2709-444E-A12D-D8C5FD797B03/SimpleDemo.app/SimpleDemo : _ZNK3icu6number23NumberFormatterSettingsINS0_24LocalizedNumberFormatterEE10toSkeletonER10UErrorCode
    0x1dc878d48 - /usr/lib/system/libsystem_platform.dylib : <redacted>
    0x1bbd4ebe0 - /usr/lib/system/libsystem_kernel.dylib : <redacted>
    0x1bbd4ec10 - /usr/lib/system/libsystem_kernel.dylib : <redacted>
    0x1d3f19708 - /System/Library/PrivateFrameworks/TCC.framework/TCC : <redacted>
    0x1d3f143d0 - /System/Library/PrivateFrameworks/TCC.framework/TCC : <redacted>
    0x1d3f16e94 - /System/Library/PrivateFrameworks/TCC.framework/TCC : <redacted>
    0x1dc8bb354 - /usr/lib/system/libxpc.dylib : <redacted>
    0x1dc8af5d0 - /usr/lib/system/libxpc.dylib : <redacted>
    0x18113410c - /usr/lib/system/libdispatch.dylib : <redacted>
    0x1810ed840 - /usr/lib/system/libdispatch.dylib : <redacted>
    0x1810e4878 - /usr/lib/system/libdispatch.dylib : <redacted>
    0x1dc884e48 - /usr/lib/system/libsystem_pthread.dylib : _pthread_wqthread
    0x1dc88493c - /usr/lib/system/libsystem_pthread.dylib : start_wqthread

=================================================================
    Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x1bbd4c64c):0x1bbd4c63c  c0 03 5f d6 c0 03 5f d6 30 41 80 d2 01 10 00 d4  .._..._.0A......
0x1bbd4c64c  e3 00 00 54 fd 7b bf a9 fd 03 00 91 ed 5b ff 97  ...T.{.......[..
0x1bbd4c65c  bf 03 00 91 fd 7b c1 a8 c0 03 5f d6 c0 03 5f d6  .....{...._..._.
0x1bbd4c66c  90 32 80 d2 01 10 00 d4 e3 00 00 54 fd 7b bf a9  .2.........T.{..

It doesn't get any details on where the crash happens and why. How can I investigate?

guillaume-tgl
  • 2,749
  • 3
  • 23
  • 30
  • You can check the NuGet packages in the project. You will need to make sure they are updated and recompiled for .NET 6 for iOS. You can also check out this article for more migration tips: [Tips & Tricks on Upgrading Xamarin.iOS & Xamarin.Android to .NET for iOS & Android](https://devblogs.microsoft.com/xamarin/upgrade-xamarin-ios-android-to-dotnet6-dotnet7/#comments) – Zack Mar 21 '23 at 02:13
  • I've checked all the dependencies and they are all compatible with .NET 6 for iOS. And the article didn't help. How can I get more details about where the error occurs? What does _ZNK3icu6number23NumberFormatterSettingsINS0_24LocalizedNumberFormatterEE10toSkeletonER10UErrorCode mean? – guillaume-tgl Mar 22 '23 at 06:15
  • Are there no error messages in your logs? You can see if this question([What trimming/linker settings are needed for Entity Framework Core in .NET MAUI on iOS?](https://stackoverflow.com/questions/75033218/what-trimming-linker-settings-are-needed-for-entity-framework-core-in-net-maui)) inspires you a bit – Zack Mar 22 '23 at 07:05
  • I was able to find the problem by adding logs in my iOS library. It would be really great to improve the stack trace – guillaume-tgl Mar 23 '23 at 09:42

1 Answers1

1

Ok, I found what was wrong. My library requires access to the camera and the Info.plist file of my demo app was missing the NSCameraUsageDescription key.

guillaume-tgl
  • 2,749
  • 3
  • 23
  • 30