dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.29k stars 1.76k forks source link

iOS application crashed on startup. Microsoft.Maui.Graphics.Skia.dll incompatible with aot? #23788

Open MichaelSL opened 4 months ago

MichaelSL commented 4 months ago

Description

After recent MAUI SR7 update my iOS application crashes on startup producing following output:

INFO: xcrun devicectl -j /var/folders/m0/668nqyl96k3g67lblgmv86yh0000gn/T/tmp3bRUWT.tmp -v device process launch --terminate-existing --device "Michael’s iPhone SE" com.universley.tripsta --monodevelop-port 10000 --connection-mode usb
INFO: The app 'com.universley.tripsta' launched with pid 1275
INFO:   Command Completed, took 1.417 seconds
INFO:   2024-07-23 21:58:18.353-0600  Enabling developer disk image services.
INFO:   2024-07-23 21:58:18.426-0600  Acquired usage assertion.
INFO:   Launched application with com.universley.tripsta bundle identifier.
INFO:   Saving JSON output file to /var/folders/m0/668nqyl96k3g67lblgmv86yh0000gn/T/tmp3bRUWT.tmp
INFO:   2024-07-23 21:58:18.342-0600  Acquired tunnel connection to device.
INFO:   Using verbose logging.
INFO: Debugger connection signal received
INFO: Connecting to remote debugger on port 57027...
INFO: [iOS Debugger] Connected to "Michael’s iPhone SE" over USB on port 10000.
INFO: [iOS Debugger] Connected to "Michael’s iPhone SE" over USB on port 10000.
INFO: [iOS Debugger] Connecting to "Michael’s iPhone SE" over USB on port 10000...
INFO: [iOS Debugger] Connected to "Michael’s iPhone SE" over USB on port 10000.
INFO: Connecting to debug stream from device...
INFO: Connecting to debug stream from remote debugger...
INFO: [iOS Debugger] Connecting to "Michael’s iPhone SE" over USB on port 10000...
INFO: Connecting to debug console stream...
INFO: Waiting for the debugger connection signal...
INFO: Debugger connection completed
INFO: The application has been launched
INFO: 
Resolved pending breakpoint for 'Tripsta.Program.Main(System.String[])' to C:\projects\TrailLocator\TrailLocator\Platforms\iOS\Program.cs:9 [0x00000].
Loaded assembly: /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/System.Private.CoreLib.dll [External]
Thread started:  #2
Loaded assembly: /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Microsoft.Maui.Graphics.Skia.dll [External]
INFO: a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

=================================================================
    Native stacktrace:
=================================================================
    0x10bd72904 - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : AppleCryptoNative_X509ImportCertificate
    0x10bd5d7f0 - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : AppleCryptoNative_X509ImportCertificate
    0x10be10f3c - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : AppleCryptoNative_X509ImportCertificate
    0x10bd720f4 - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : AppleCryptoNative_X509ImportCertificate
    0x1f45dae9c - /usr/lib/system/libsystem_platform.dylib : <redacted>
    0x1f4696c0c - /
ERROR: An error occurred when writing to the output stream. Details: net_io_readfailure, Operation canceled
INFO: Closing debug connection from remote debugger (TCP)
INFO: Disposing input and output streams...
INFO: 2024-07-23 21:58:21.461 Tripsta[1275:509701] error: Failed to load AOT module 'data-0x11604c000.dylib' ('data-0x11604c000') in aot-only mode.

=================================================================
    Native Crash Reporting
=================================================================
Got a SIGABRT while executing native code. This usually indicates

INFO: usr/lib/system/libsystem_pthread.dylib : pthread_kill
    0x19f79aba0 - /usr/lib/system/libsystem_c.dylib : abort
    0x10ba48f48 - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : xamarin_find_protocol_wrapper_type
    0x10bc27c2c - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : AppleCryptoNative_X509ImportCertificate
    0x10bc27d74 - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : AppleCryptoNative_X509ImportCertificate
    0x10bd4a39c - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : AppleCryptoNative_X509ImportCertificate
    0x10bc89a2c - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : AppleCryptoNative_X509ImportCertificate
    0x10bd1cd60 - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : AppleCryptoNativ
INFO: /633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : AppleCryptoNative_X509ImportCertificate
    0x10bbd23f8 - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : AppleCryptoNative_X509ImportCertificate
    0x10bbd4958 - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : AppleCryptoNative_X509ImportCertificate
    0x10bbd40f0 - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : AppleCryptoNative_X509ImportCertificate
    0x10bbe943c - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : AppleCryptoNative_X509ImportCertificate
    0x10bbdf9ec - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : AppleCryptoNative_X509ImportCertificate
    0x10b865034 - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : 
    0x1066f6c2c - /priva
INFO: ation/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : AppleCryptoNative_X509ImportCertificate
    0x1baebde4c - /usr/lib/dyld : <redacted>

=================================================================
    Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x1e08f742c):0x1e08f741c  ff 0f 5f d6 c0 03 5f d6 10 29 80 d2 01 10 00 d4  .._..._..)......
0x1e08f742c  03 01 00 54 7f 23 03 d5 fd 7b bf a9 fd 03 00 91  ...T.#...{......
0x1e08f743c  2a ec ff 97 bf 03 00 91 fd 7b c1 a8 ff 0f 5f d6  *........{...._.
0x1e08f744c  c0 03 5f d6 10 27 80 d2 01 10 00 d4 03 01 00 54  .._..'.........T

=================================================================
    Managed Stacktrace:
=================================================================
      at <unknown> <0xffffffff>
      at System.Runtime.Loader.AssemblyLoadContext:InternalLoadFromStream <0x00007>
      at System.Runtime.Loader.AssemblyLoadContext:InternalLoad <0x0007b>
      at S
INFO: ystem.Reflection.Assembly:Load <0x0016f>
      at System.Object:runtime_invoke_dynamic <0x00127>
      at <unknown> <0xffffffff>
      at Tripsta.Program:Main <0x0006b>
      at System.Object:runtime_invoke_dynamic <0x00127>
=================================================================

INFO: e_X509ImportCertificate
    0x10bcbbd20 - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : AppleCryptoNative_X509ImportCertificate
    0x10b525c38 - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : 
    0x10b52574c - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : 
    0x10b5757e0 - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : 
    0x10b7e87c8 - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : 
    0x10bd42dd4 - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : AppleCryptoNative_X509ImportCertificate
    0x10bceb344 - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : AppleCryptoNative_X509ImportCertificate
    0x10bbd57a0 - /private/var/containers/Bundle/Application
INFO: te/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : 
    0x10b7e87c8 - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : 
    0x10bd42dd4 - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : AppleCryptoNative_X509ImportCertificate
    0x10bcea430 - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : AppleCryptoNative_X509ImportCertificate
    0x10bcf072c - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : AppleCryptoNative_X509ImportCertificate
    0x10bd482e8 - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : AppleCryptoNative_X509ImportCertificate
    0x10ba5b294 - /private/var/containers/Bundle/Application/633F9DF4-3F20-41BA-B172-9514882399ED/Tripsta.app/Tripsta : xamarin_log
    0x10bdb1544 - /private/var/containers/Bundle/Applic
INFO: Closing debug connection from device (USB)
The app has been terminated.
INFO: Disposing input and output streams...
INFO: Disposing console and debugger streams...
ERROR: An error occurred while writing to the debug stream. Details: ObjectDisposed_Generic
ObjectDisposed_ObjectName_Name, UsbStream

Log is slightly different if

<UseInterpreter>true</UseInterpreter>
<MtouchInterpreter>-all</MtouchInterpreter>

used:

INFO:   2024-07-23 21:52:35.534-0600  Acquired usage assertion.
INFO:   2024-07-23 21:52:35.466-0600  Enabling developer disk image services.
INFO:   Launched application with com.universley.tripsta bundle identifier.
INFO:   Command Completed, took 1.445 seconds
INFO:   2024-07-23 21:52:35.454-0600  Acquired tunnel connection to device.
INFO:   Using verbose logging.
INFO:   Saving JSON output file to /var/folders/m0/668nqyl96k3g67lblgmv86yh0000gn/T/tmpBIT1s0.tmp
INFO: [iOS Debugger] Connecting to "Michael’s iPhone SE" over USB on port 10000...
INFO: [iOS Debugger] Connected to "Michael’s iPhone SE" over USB on port 10000.
INFO: [iOS Debugger] Connected to "Michael’s iPhone SE" over USB on port 10000.
INFO: Waiting for the debugger connection signal...
INFO: Debugger connection signal received
INFO: Debugger connection completed
INFO: [iOS Debugger] Connected to "Michael’s iPhone SE" over USB on port 10000.
INFO: Connecting to debug console stream...
INFO: [iOS Debugger] Connecting to "Michael’s iPhone SE" over USB on port 10000...
INFO: Connecting to remote debugger on port 59797...
INFO: Connecting to debug stream from remote debugger...
INFO: Connecting to debug stream from device...
INFO: 
INFO: The application has been launched
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Private.CoreLib.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Collections.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Runtime.Numerics.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Formats.Asn1.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Memory.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Collections.Concurrent.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Collections.NonGeneric.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Private.Uri.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Net.Primitives.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Security.Cryptography.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Linq.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Security.Claims.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Diagnostics.DiagnosticSource.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Net.NameResolution.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Net.Sockets.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Net.Security.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Net.Quic.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.IO.Compression.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.IO.Compression.Brotli.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Threading.Channels.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Net.NetworkInformation.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Net.Http.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Drawing.Primitives.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Net.ServicePoint.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Collections.Specialized.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Net.WebHeaderCollection.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Net.Requests.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/Microsoft.iOS.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Runtime.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Runtime.InteropServices.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Threading.ThreadPool.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Threading.Thread.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/System.Threading.dll [External]
INFO: .._.
0x1e08f744c  c0 03 5f d6 10 27 80 d2 01 10 00 d4 03 01 00 54  .._..'.........T

=================================================================
    Managed Stacktrace:
=================================================================
=================================================================

INFO: =============================
    Native stacktrace:
=================================================================
    0x115a5ee04 - /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/Tripsta : AppleCryptoNative_X509ImportCollection
    0x115a49cf0 - /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/Tripsta : AppleCryptoNative_X509ImportCollection
    0x115ba9870 - /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/Tripsta : AppleCryptoNative_X509ImportCollection
    0x115a5e5f4 - /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/Tripsta : AppleCryptoNative_X509ImportCollection
    0x1f45dae9c - /usr/lib/system/libsystem_platform.dylib : <redacted>
    0x1f4696c0c - /usr/lib/system/libsystem_pthread.dylib : pthread_kill
    0x19f79aba0 - /usr/lib/system/libsystem_c.dylib : abort
    0x11572b3e8 - /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500
ERROR: An error occurred while writing to the debug stream. Details: ObjectDisposed_Generic
ObjectDisposed_ObjectName_Name, UsbStream
INFO: 761C59/Tripsta.app/Tripsta : xamarin_get_block_descriptor
    0x11572ec7c - /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/Tripsta : xamarin_locate_assembly_resource
    0x11572f4f8 - /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/Tripsta : xamarin_find_protocol_wrapper_type
    0x115741c94 - /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/Tripsta : xamarin_get_original_working_directory_path
    0x115a9e014 - /private/var/containers/Bundle/Application/B228FD9B-6707-4F81-831B-941500761C59/Tripsta.app/Tripsta : AppleCryptoNative_X509ImportCollection
    0x1baebde4c - /usr/lib/dyld : <redacted>

=================================================================
    Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x1e08f742c):0x1e08f741c  ff 0f 5f d6 c0 03 5f d6 10 29 80 d2 01 10 00 d4  .._..._..)......
0x1e08f
INFO: 742c  03 01 00 54 7f 23 03 d5 fd 7b bf a9 fd 03 00 91  ...T.#...{......
0x1e08f743c  2a ec ff 97 bf 03 00 91 fd 7b c1 a8 ff 0f 5f d6  *........{..
INFO: amicRegistrar.cs:line 1127
   at ObjCRuntime.Class.Register(Type type) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/Class.cs:line 237
   at ObjCRuntime.Runtime.RegisterAssembly(Assembly a) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/Runtime.cs:line 758
   at ObjCRuntime.Runtime.RegisterAssembly(IntPtr a) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/Runtime.cs:line 496
   at ObjCRuntime.Runtime.register_assembly(IntPtr assembly, IntPtr* exception_gchandle) in /Users/builder/azdo/_work/1/s/xamarin-macios/runtime/Delegates.generated.cs:line 265

=================================================================
    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.
=================================================================

====================================
INFO: timeMethodInfo:get_IsGenericMethod (System.Reflection.RuntimeMethodInfo)' while running in aot-only mode. See https://docs.microsoft.com/xamarin/ios/internals/limitations for more information.
 (System.ExecutionEngineException)
   at Registrar.DynamicRegistrar.IsGenericMethod(MethodBase method) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/DynamicRegistrar.cs:line 584
   at Registrar.Registrar.VerifyNonGenericMethod(List`1& exceptions, Type declaringType, MethodBase method) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/Registrar.cs:line 1578
   at Registrar.Registrar.RegisterTypeUnsafe(Type type, List`1& exceptions) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/Registrar.cs:line 2415
   at Registrar.Registrar.RegisterType(Type type, List`1& exceptions) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/Registrar.cs:line 1573
   at Registrar.DynamicRegistrar.Register(Type type) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/Dyn
INFO: 2024-07-23 21:52:38.249 Tripsta[1239:507299] Microsoft.iOS: An exception occurred while registering the product assembly
Attempting to JIT compile method '(wrapper managed-to-native) bool System.Reflection.RuntimeMethodInfo:get_IsGenericMethod (System.Reflection.RuntimeMethodInfo)' while running in aot-only mode. See https://docs.microsoft.com/xamarin/ios/internals/limitations for more information.
 (System.ExecutionEngineException)
   at Registrar.DynamicRegistrar.IsGenericMethod(MethodBase method) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/DynamicRegistrar.cs:line 584
   at Registrar.Registrar.VerifyNonGenericMethod(List`1& exceptions, Type declaringType, MethodBase method) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/Registrar.cs:line 1578
   at Registrar.Registrar.RegisterTypeUnsafe(Type type, List`1& exceptions) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/Registrar.cs:line 2415
   at Registrar.Registrar.RegisterType(Type type, List`1& exceptions
INFO: ) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/Registrar.cs:line 1573
   at Registrar.DynamicRegistrar.Register(Type type) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/DynamicRegistrar.cs:line 1127
   at ObjCRuntime.Class.Register(Type type) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/Class.cs:line 237
   at ObjCRuntime.Runtime.RegisterAssembly(Assembly a) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/Runtime.cs:line 758
   at ObjCRuntime.Runtime.RegisterAssembly(IntPtr a) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/Runtime.cs:line 496
   at ObjCRuntime.Runtime.register_assembly(IntPtr assembly, IntPtr* exception_gchandle) in /Users/builder/azdo/_work/1/s/xamarin-macios/runtime/Delegates.generated.cs:line 265
2024-07-23 21:52:38.249 Tripsta[1239:507299] Microsoft.iOS: An exception occurred while registering the product assembly
Attempting to JIT compile method '(wrapper managed-to-native) bool System.Reflection.Run
INFO: Closing debug connection from device (USB)
The app has been terminated.

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.70 SR7

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

8.0.40 SR5

Affected platforms

iOS

Affected platform versions

iOS 17

Did you find any workaround?

No

Relevant log output

No response

github-actions[bot] commented 4 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

kevinxufei commented 4 months ago

Hi, @MichaelSL Could you please provide a sample project for our investigation? Looking forward to your reply!

MichaelSL commented 4 months ago

@kevinxufei her you go: https://github.com/MichaelSL/MauiIosCrashRepro

kevinxufei commented 4 months ago

Thanks for the project you provided, but it seems to work well on our side. So I want to confirm with you the specific Xcode version/iOS device version/VS version. And can you clear the XMA on the Mac and re-pair the Mac? Screenshot 2024-08-08 174847

MichaelSL commented 4 months ago

@kevinxufei after I've cleared the cache and reconnected the repro project launched. My main project still fails with the same error. After I tried to clear the cache and reconnect again my build fail with

1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_17.5\17.5.8018\targets\Xamarin.Shared.Sdk.targets(1270,3): error : MessagingRemoteException: An error occurred on client Build1711092 while executing a reply for topic xvs/build/17.11.0.92/execute-task/Tripsta/df20be7002fAOTCompile
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_17.5\17.5.8018\targets\Xamarin.Shared.Sdk.targets(1270,3): error : FileNotFoundException: Could not find file "/Users/michael/Library/Caches/Xamarin/mtbs/builds/Tripsta/df20be7be4e7f44f48b9d7a1f08bc5aed42efc635a4837c0cd24902306e1836a/obj/Debug/net8.0-ios/ios-arm64/linked/System.Runtime.dll"

I've restarted VS, cleared cache, restarted the mac, didn't help.

MichaelSL commented 4 months ago

After several more restarts I was able to build my project, but it still crashed after the startup. I've removed another library which was mentioned in the logs but it didn't fix the issue.

kevinxufei commented 3 months ago
  1. We need some detailed version information, please be sure to provide it.

    Thanks for the project you provided, but it seems to work well on our side. So I want to confirm with you the specific Xcode version/iOS device version/VS version.

  2. Confirm a message with you that the application can be successfully installed on the device, but it fails to open; If so, could you please provide Xamarin.logs and Binglogs? Binglogs:
    1. Install the [Project System Tools]2022 extension
      1. In Visual Studio, choose the View > Other Windows > Build Logging menu item.
      2. Click on the "play" button.
      3. Reproduce the issue
      4. Select all entries in the build logging tool window
      5. Right-click them, Save Logs
    2. Attach the resulting zip file to this issue. Xamarin.logs: Navigate to Menu bar -> Help -> Xamarin -> Open Logs... Clear Xamarin logs and repro issue. Attach the resulting zip file to this issue.

Thank you for your patience. Looking forward to reply!

MichaelSL commented 3 months ago

Hi @kevinxufei ! I'll provide the update as soon as I come back to work next week. The device I'm testing it is a physical iPhone with the latest iOS.

dotnet-policy-service[bot] commented 5 days ago

Hi @MichaelSL. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

dotnet-policy-service[bot] commented 1 day ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.