2020-06-05 14:09:28 +03:00
// Compat.cs: might not be ideal but it eases code sharing with existing code during the initial implementation.
2020-06-29 16:55:05 +03:00
using System ;
2020-07-17 17:38:40 +03:00
using System.Collections.Generic ;
2021-01-25 17:38:17 +03:00
using System.IO ;
2020-09-10 09:30:45 +03:00
using System.Runtime.CompilerServices ;
2020-07-17 17:38:40 +03:00
using Mono.Cecil ;
using Mono.Linker ;
using Mono.Linker.Steps ;
2020-06-29 16:55:05 +03:00
2020-09-07 19:33:53 +03:00
using Xamarin.Bundler ;
2020-06-29 16:55:05 +03:00
using Xamarin.Linker ;
using Xamarin.Utils ;
2020-06-05 14:09:28 +03:00
namespace Xamarin.Bundler {
2020-07-17 17:38:40 +03:00
public partial class Application {
2020-06-29 16:55:05 +03:00
public LinkerConfiguration Configuration { get ; private set ; }
2021-06-16 16:22:02 +03:00
public string RuntimeConfigurationFile { get ; set ; }
2020-06-29 16:55:05 +03:00
2020-08-20 18:33:50 +03:00
public Application ( LinkerConfiguration configuration )
2020-06-29 16:55:05 +03:00
{
this . Configuration = configuration ;
}
2020-08-14 18:09:40 +03:00
public string ProductName {
get {
switch ( Platform ) {
case ApplePlatform . iOS :
return "Microsoft.iOS" ;
case ApplePlatform . TVOS :
return "Microsoft.tvOS" ;
case ApplePlatform . WatchOS :
return "Microsoft.watchOS" ;
case ApplePlatform . MacOSX :
return "Microsoft.macOS" ;
2021-02-18 19:25:45 +03:00
case ApplePlatform . MacCatalyst :
return "Microsoft.MacCatalyst" ;
2020-08-14 18:09:40 +03:00
default :
throw ErrorHelper . CreateError ( 177 , Errors . MX0177 /* "Unknown platform: {0}. This usually indicates a bug; please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case." */ , Platform ) ;
}
2020-06-29 16:55:05 +03:00
}
}
2020-07-17 17:38:40 +03:00
public void SelectRegistrar ( )
{
2020-08-18 20:32:56 +03:00
if ( Registrar = = RegistrarMode . Default ) {
2020-09-11 15:08:48 +03:00
if ( IsDeviceBuild ) {
// mobile device builds use the static registrar by default
Registrar = RegistrarMode . Static ;
} else if ( Platform = = ApplePlatform . MacOSX & & ! EnableDebug ) {
// release macOS builds use the static registrar by default
Registrar = RegistrarMode . Static ;
} else if ( LinkMode = = LinkMode . None & & IsDefaultMarshalManagedExceptionMode ) {
// Otherwise use the partial static registrar if we can
2020-08-18 20:32:56 +03:00
Registrar = RegistrarMode . PartialStatic ;
} else {
2020-09-11 15:08:48 +03:00
// Last option is the dynamic registrar
2020-08-18 20:32:56 +03:00
Registrar = RegistrarMode . Dynamic ;
}
}
Driver . Log ( 1 , $"Registrar mode: {Registrar}" ) ;
2020-07-17 17:38:40 +03:00
}
2020-08-18 20:32:56 +03:00
2021-01-25 17:38:17 +03:00
public void Initialize ( )
{
// mSYM support is not implemented in the runtime on .NET 6 afaik
EnableMSym = false ;
}
2020-08-18 20:32:56 +03:00
public bool HasAnyDynamicLibraries {
get { throw new NotImplementedException ( ) ; }
}
public string GetLibMono ( AssemblyBuildTarget build_target )
{
throw new NotImplementedException ( ) ;
}
public string GetLibXamarin ( AssemblyBuildTarget build_target )
{
throw new NotImplementedException ( ) ;
}
2021-01-25 17:38:17 +03:00
public Profile Profile {
get {
return Configuration . Profile ;
}
}
2020-06-05 14:09:28 +03:00
}
2020-07-17 17:38:40 +03:00
2020-07-17 17:38:40 +03:00
public partial class Driver {
public static string NAME {
get { return "xamarin-bundler" ; }
}
public static string GetArch32Directory ( Application app )
{
throw new NotImplementedException ( ) ;
}
public static string GetArch64Directory ( Application app )
{
throw new NotImplementedException ( ) ;
}
2021-02-22 14:29:32 +03:00
public static string SdkRoot {
get = > sdk_root ;
set = > sdk_root = value ;
}
2020-07-17 17:38:40 +03:00
}
[dotnet-linker] Add MarkNSObjects into the pipeline. (#9543)
A few compat fixes were necessary to make the code compile and run correctly.
Fixes this startup crash with the linkall test:
2020-08-27 18:15:09.648352+0200 link all[91128:1963430] *** Assertion failure in void _UIApplicationMainPreparations(int, char **, NSString *__strong, NSString *__strong)(), /Library/Caches/com.apple.xbs/Sources/UIKitCore_Sim/UIKit-3920.31.100/UIApplication.m:4765
2020-08-27 18:15:09.697128+0200 link all[91128:1963430]
Unhandled Exception:
Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Unable to instantiate the UIApplication delegate instance. No class named AppDelegate is loaded.
Native stack trace:
0 CoreFoundation 0x00007fff23e3cf0e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50ba89b2 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23e3cc88 +[NSException raise:format:arguments:] + 88
3 Foundation 0x00007fff258b8c9b -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
4 UIKitCore 0x00007fff48c8baed UIApplicationMain + 1862
5 ??? 0x00000001087d2504 0x0 + 4437386500
6 ??? 0x00000001087d237b 0x0 + 4437386107
7 ??? 0x00000001087cef93 0x0 + 4437372819
8 ??? 0x00000001087cedcb 0x0 + 4437372363
9 ??? 0x00000001087ceec1 0x0 + 4437372609
10 libmonosgen-2.0.dylib 0x00000001081a2d7e mono_jit_runtime_invoke + 1911
11 libmonosgen-2.0.dylib 0x000000010832ee0a do_runtime_invoke + 80
12 libmonosgen-2.0.dylib 0x0000000108331fd0 do_exec_main_checked + 92
13 libmonosgen-2.0.dylib 0x00000001081f191e mono_jit_exec + 369
14 libxamarin-debug.dylib 0x000000010802badd xamarin_main + 2685
15 link all 0x0000000107f0cced main + 45
16 libdyld.dylib 0x00007fff51a231fd start + 1
at ObjCRuntime.Runtime.ThrowNSException(IntPtr ns_exception)
at ObjCRuntime.Runtime.throw_ns_exception(IntPtr exc)
at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate)
at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName)
at LinkAll.Application.Main(String[] args) in [...]/xamarin-macios/tests/linker/ios/link all/Main.cs:line 15
--- End of stack trace from previous location ---
at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate)
at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName)
at LinkAll.Application.Main(String[] args) in [...]/xamarin-macios/tests/linker/ios/link all/Main.cs:line 15 0 CoreFoundation 0x00007fff23e3cf0e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50ba89b2 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23e3cc88 +[NSException raise:format:arguments:] + 88
3 Foundation 0x00007fff258b8c9b -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
4 UIKitCore 0x00007fff48c8baed UIApplicationMain + 1862
5 ??? 0x00000001087d2504 0x0 + 4437386500
6 ??? 0x00000001087d237b 0x0 + 4437386107
7 ??? 0x00000001087cef93 0x0 + 4437372819
8 ??? 0x00000001087cedcb 0x0 + 4437372363
9 ??? 0x00000001087ceec1 0x0 + 4437372609
10 libmonosgen-2.0.dylib 0x00000001081a2d7e mono_jit_runtime_invoke + 1911
11 libmonosgen-2.0.dylib 0x000000010832ee0a do_runtime_invoke + 80
12 libmonosgen-2.0.dylib 0x0000000108331fd0 do_exec_main_checked + 92
13 libmonosgen-2.0.dylib 0x00000001081f191e mono_jit_exec + 369
14 libxamarin-debug.dylib 0x000000010802badd xamarin_main + 2685
15 link all 0x0000000107f0cced main + 45
16 libdyld.dylib 0x00007fff51a231fd start + 1
2020-08-27 18:15:09.698283+0200 link all[91128:1963430] Unhandled managed exception: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Unable to instantiate the UIApplication delegate instance. No class named AppDelegate is loaded.
Native stack trace:
0 CoreFoundation 0x00007fff23e3cf0e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50ba89b2 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23e3cc88 +[NSException raise:format:arguments:] + 88
3 Foundation 0x00007fff258b8c9b -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
4 UIKitCore 0x00007fff48c8baed UIApplicationMain + 1862
5 ??? 0x00000001087d2504 0x0 + 4437386500
6 ??? 0x00000001087d237b 0x0 + 4437386107
7 ??? 0x00000001087cef93 0x0 + 4437372819
8 ??? 0x00000001087cedcb 0x0 + 4437372363
9 ??? 0x00000001087ceec1 0x0 + 4437372609
10 libmonosgen-2.0.dylib 0x00000001081a2d7e mono_jit_runtime_invoke + 1911
11 libmonosgen-2.0.dylib 0x000000010832ee0a do_runtime_invoke + 80
12 libmonosgen-2.0.dylib 0x0000000108331fd0 do_exec_main_checked + 92
13 libmonosgen-2.0.dylib 0x00000001081f191e mono_jit_exec + 369
14 libxamarin-debug.dylib 0x000000010802badd xamarin_main + 2685
15 link all 0x0000000107f0cced main + 45
16 libdyld.dylib 0x00007fff51a231fd start + 1
(Foundation.MonoTouchException)
at ObjCRuntime.Runtime.ThrowNSException(IntPtr ns_exception)
at ObjCRuntime.Runtime.throw_ns_exception(IntPtr exc)
at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate)
at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName)
at LinkAll.Application.Main(String[] args) in [...]/xamarin-macios/tests/linker/ios/link all/Main.cs:line 15
--- End of stack trace from previous location ---
at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate)
at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName)
at LinkAll.Application.Main(String[] args) in [...]/xamarin-macios/tests/linker/ios/link all/Main.cs:line 15
=================================================================
Native Crash Reporting
=================================================================
Got a abrt 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:
=================================================================
0x108273f92 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_dump_native_crash_info
0x1082207bd - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_native_crash
0x1082737e9 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : sigabrt_signal_handler
0x7fff51c005fd - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_platform.dylib : _sigtramp
0x0 - Unknown
0x7fff51af0b7c - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_c.dylib : abort
0x10801979f - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_unhandled_exception_handler
0x1082e4980 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_invoke_unhandled_exception_hook
0x108220166 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_exception_internal
0x10821ea47 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_exception
0x10826ea06 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_amd64_throw_exception
0x1086105b0 - Unknown
0x1080194fb - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_process_managed_exception
0x108019377 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_process_managed_exception_gchandle
0x108019333 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_ftnptr_exception_handler
0x10821feeb - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_exception_internal
0x10821ea47 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_exception
0x10826ea06 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_amd64_throw_exception
0x1086105b0 - Unknown
0x1087d264b - Unknown
0x10869439b - Unknown
0x108016c07 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_throw_ns_exception
0x10801a1cb - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : _ZL17exception_handlerP11NSException
0x7fff23e3d36d - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : __handleUncaughtException
0x7fff50ba8c05 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libobjc.A.dylib : _ZL15_objc_terminatev
0x7fff4f9f6c87 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libc++abi.dylib : _ZSt11__terminatePFvvE
0x7fff4f9f940b - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libc++abi.dylib : __cxa_get_exception_ptr
0x7fff4f9f93d2 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libc++abi.dylib : _ZN10__cxxabiv1L22exception_cleanup_funcE19_Unwind_Reason_CodeP17_Unwind_Exception
0x7fff50ba8ad6 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libobjc.A.dylib : _ZL26_objc_exception_destructorPv
0x7fff23e3cc88 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : +[NSException raise:format:arguments:]
0x7fff258b8c9b - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Foundation.framework/Foundation : -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:]
0x7fff48c8baed - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : UIApplicationMain
0x1087d2504 - Unknown
0x1087d237b - Unknown
0x1087cef93 - Unknown
0x1087cedcb - Unknown
0x1087ceec1 - Unknown
0x1081a2d7e - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_jit_runtime_invoke
0x10832ee0a - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : do_runtime_invoke
0x108331fd0 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : do_exec_main_checked
0x1081f191e - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_jit_exec
0x10802badd - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_main
0x107f0cced - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/link all : main
0x7fff51a231fd - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libdyld.dylib : start
2020-08-31 09:38:11 +03:00
// We can't make the linker use a LinkerContext subclass (DerivedLinkerContext), so we make DerivedLinkerContext
// derive from this class, and then we redirect to the LinkerContext instance here.
2020-07-17 17:38:40 +03:00
public class DotNetLinkContext {
[dotnet-linker] Add MarkNSObjects into the pipeline. (#9543)
A few compat fixes were necessary to make the code compile and run correctly.
Fixes this startup crash with the linkall test:
2020-08-27 18:15:09.648352+0200 link all[91128:1963430] *** Assertion failure in void _UIApplicationMainPreparations(int, char **, NSString *__strong, NSString *__strong)(), /Library/Caches/com.apple.xbs/Sources/UIKitCore_Sim/UIKit-3920.31.100/UIApplication.m:4765
2020-08-27 18:15:09.697128+0200 link all[91128:1963430]
Unhandled Exception:
Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Unable to instantiate the UIApplication delegate instance. No class named AppDelegate is loaded.
Native stack trace:
0 CoreFoundation 0x00007fff23e3cf0e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50ba89b2 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23e3cc88 +[NSException raise:format:arguments:] + 88
3 Foundation 0x00007fff258b8c9b -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
4 UIKitCore 0x00007fff48c8baed UIApplicationMain + 1862
5 ??? 0x00000001087d2504 0x0 + 4437386500
6 ??? 0x00000001087d237b 0x0 + 4437386107
7 ??? 0x00000001087cef93 0x0 + 4437372819
8 ??? 0x00000001087cedcb 0x0 + 4437372363
9 ??? 0x00000001087ceec1 0x0 + 4437372609
10 libmonosgen-2.0.dylib 0x00000001081a2d7e mono_jit_runtime_invoke + 1911
11 libmonosgen-2.0.dylib 0x000000010832ee0a do_runtime_invoke + 80
12 libmonosgen-2.0.dylib 0x0000000108331fd0 do_exec_main_checked + 92
13 libmonosgen-2.0.dylib 0x00000001081f191e mono_jit_exec + 369
14 libxamarin-debug.dylib 0x000000010802badd xamarin_main + 2685
15 link all 0x0000000107f0cced main + 45
16 libdyld.dylib 0x00007fff51a231fd start + 1
at ObjCRuntime.Runtime.ThrowNSException(IntPtr ns_exception)
at ObjCRuntime.Runtime.throw_ns_exception(IntPtr exc)
at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate)
at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName)
at LinkAll.Application.Main(String[] args) in [...]/xamarin-macios/tests/linker/ios/link all/Main.cs:line 15
--- End of stack trace from previous location ---
at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate)
at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName)
at LinkAll.Application.Main(String[] args) in [...]/xamarin-macios/tests/linker/ios/link all/Main.cs:line 15 0 CoreFoundation 0x00007fff23e3cf0e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50ba89b2 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23e3cc88 +[NSException raise:format:arguments:] + 88
3 Foundation 0x00007fff258b8c9b -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
4 UIKitCore 0x00007fff48c8baed UIApplicationMain + 1862
5 ??? 0x00000001087d2504 0x0 + 4437386500
6 ??? 0x00000001087d237b 0x0 + 4437386107
7 ??? 0x00000001087cef93 0x0 + 4437372819
8 ??? 0x00000001087cedcb 0x0 + 4437372363
9 ??? 0x00000001087ceec1 0x0 + 4437372609
10 libmonosgen-2.0.dylib 0x00000001081a2d7e mono_jit_runtime_invoke + 1911
11 libmonosgen-2.0.dylib 0x000000010832ee0a do_runtime_invoke + 80
12 libmonosgen-2.0.dylib 0x0000000108331fd0 do_exec_main_checked + 92
13 libmonosgen-2.0.dylib 0x00000001081f191e mono_jit_exec + 369
14 libxamarin-debug.dylib 0x000000010802badd xamarin_main + 2685
15 link all 0x0000000107f0cced main + 45
16 libdyld.dylib 0x00007fff51a231fd start + 1
2020-08-27 18:15:09.698283+0200 link all[91128:1963430] Unhandled managed exception: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Unable to instantiate the UIApplication delegate instance. No class named AppDelegate is loaded.
Native stack trace:
0 CoreFoundation 0x00007fff23e3cf0e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50ba89b2 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23e3cc88 +[NSException raise:format:arguments:] + 88
3 Foundation 0x00007fff258b8c9b -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
4 UIKitCore 0x00007fff48c8baed UIApplicationMain + 1862
5 ??? 0x00000001087d2504 0x0 + 4437386500
6 ??? 0x00000001087d237b 0x0 + 4437386107
7 ??? 0x00000001087cef93 0x0 + 4437372819
8 ??? 0x00000001087cedcb 0x0 + 4437372363
9 ??? 0x00000001087ceec1 0x0 + 4437372609
10 libmonosgen-2.0.dylib 0x00000001081a2d7e mono_jit_runtime_invoke + 1911
11 libmonosgen-2.0.dylib 0x000000010832ee0a do_runtime_invoke + 80
12 libmonosgen-2.0.dylib 0x0000000108331fd0 do_exec_main_checked + 92
13 libmonosgen-2.0.dylib 0x00000001081f191e mono_jit_exec + 369
14 libxamarin-debug.dylib 0x000000010802badd xamarin_main + 2685
15 link all 0x0000000107f0cced main + 45
16 libdyld.dylib 0x00007fff51a231fd start + 1
(Foundation.MonoTouchException)
at ObjCRuntime.Runtime.ThrowNSException(IntPtr ns_exception)
at ObjCRuntime.Runtime.throw_ns_exception(IntPtr exc)
at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate)
at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName)
at LinkAll.Application.Main(String[] args) in [...]/xamarin-macios/tests/linker/ios/link all/Main.cs:line 15
--- End of stack trace from previous location ---
at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate)
at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName)
at LinkAll.Application.Main(String[] args) in [...]/xamarin-macios/tests/linker/ios/link all/Main.cs:line 15
=================================================================
Native Crash Reporting
=================================================================
Got a abrt 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:
=================================================================
0x108273f92 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_dump_native_crash_info
0x1082207bd - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_native_crash
0x1082737e9 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : sigabrt_signal_handler
0x7fff51c005fd - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_platform.dylib : _sigtramp
0x0 - Unknown
0x7fff51af0b7c - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_c.dylib : abort
0x10801979f - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_unhandled_exception_handler
0x1082e4980 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_invoke_unhandled_exception_hook
0x108220166 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_exception_internal
0x10821ea47 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_exception
0x10826ea06 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_amd64_throw_exception
0x1086105b0 - Unknown
0x1080194fb - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_process_managed_exception
0x108019377 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_process_managed_exception_gchandle
0x108019333 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_ftnptr_exception_handler
0x10821feeb - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_exception_internal
0x10821ea47 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_exception
0x10826ea06 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_amd64_throw_exception
0x1086105b0 - Unknown
0x1087d264b - Unknown
0x10869439b - Unknown
0x108016c07 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_throw_ns_exception
0x10801a1cb - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : _ZL17exception_handlerP11NSException
0x7fff23e3d36d - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : __handleUncaughtException
0x7fff50ba8c05 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libobjc.A.dylib : _ZL15_objc_terminatev
0x7fff4f9f6c87 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libc++abi.dylib : _ZSt11__terminatePFvvE
0x7fff4f9f940b - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libc++abi.dylib : __cxa_get_exception_ptr
0x7fff4f9f93d2 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libc++abi.dylib : _ZN10__cxxabiv1L22exception_cleanup_funcE19_Unwind_Reason_CodeP17_Unwind_Exception
0x7fff50ba8ad6 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libobjc.A.dylib : _ZL26_objc_exception_destructorPv
0x7fff23e3cc88 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : +[NSException raise:format:arguments:]
0x7fff258b8c9b - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Foundation.framework/Foundation : -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:]
0x7fff48c8baed - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : UIApplicationMain
0x1087d2504 - Unknown
0x1087d237b - Unknown
0x1087cef93 - Unknown
0x1087cedcb - Unknown
0x1087ceec1 - Unknown
0x1081a2d7e - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_jit_runtime_invoke
0x10832ee0a - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : do_runtime_invoke
0x108331fd0 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : do_exec_main_checked
0x1081f191e - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_jit_exec
0x10802badd - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_main
0x107f0cced - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/link all : main
0x7fff51a231fd - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libdyld.dylib : start
2020-08-31 09:38:11 +03:00
public LinkerConfiguration LinkerConfiguration ;
2020-07-17 17:38:40 +03:00
public AssemblyAction UserAction {
get { throw new NotImplementedException ( ) ; }
set { throw new NotImplementedException ( ) ; }
}
public AnnotationStore Annotations {
get {
[dotnet-linker] Add MarkNSObjects into the pipeline. (#9543)
A few compat fixes were necessary to make the code compile and run correctly.
Fixes this startup crash with the linkall test:
2020-08-27 18:15:09.648352+0200 link all[91128:1963430] *** Assertion failure in void _UIApplicationMainPreparations(int, char **, NSString *__strong, NSString *__strong)(), /Library/Caches/com.apple.xbs/Sources/UIKitCore_Sim/UIKit-3920.31.100/UIApplication.m:4765
2020-08-27 18:15:09.697128+0200 link all[91128:1963430]
Unhandled Exception:
Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Unable to instantiate the UIApplication delegate instance. No class named AppDelegate is loaded.
Native stack trace:
0 CoreFoundation 0x00007fff23e3cf0e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50ba89b2 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23e3cc88 +[NSException raise:format:arguments:] + 88
3 Foundation 0x00007fff258b8c9b -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
4 UIKitCore 0x00007fff48c8baed UIApplicationMain + 1862
5 ??? 0x00000001087d2504 0x0 + 4437386500
6 ??? 0x00000001087d237b 0x0 + 4437386107
7 ??? 0x00000001087cef93 0x0 + 4437372819
8 ??? 0x00000001087cedcb 0x0 + 4437372363
9 ??? 0x00000001087ceec1 0x0 + 4437372609
10 libmonosgen-2.0.dylib 0x00000001081a2d7e mono_jit_runtime_invoke + 1911
11 libmonosgen-2.0.dylib 0x000000010832ee0a do_runtime_invoke + 80
12 libmonosgen-2.0.dylib 0x0000000108331fd0 do_exec_main_checked + 92
13 libmonosgen-2.0.dylib 0x00000001081f191e mono_jit_exec + 369
14 libxamarin-debug.dylib 0x000000010802badd xamarin_main + 2685
15 link all 0x0000000107f0cced main + 45
16 libdyld.dylib 0x00007fff51a231fd start + 1
at ObjCRuntime.Runtime.ThrowNSException(IntPtr ns_exception)
at ObjCRuntime.Runtime.throw_ns_exception(IntPtr exc)
at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate)
at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName)
at LinkAll.Application.Main(String[] args) in [...]/xamarin-macios/tests/linker/ios/link all/Main.cs:line 15
--- End of stack trace from previous location ---
at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate)
at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName)
at LinkAll.Application.Main(String[] args) in [...]/xamarin-macios/tests/linker/ios/link all/Main.cs:line 15 0 CoreFoundation 0x00007fff23e3cf0e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50ba89b2 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23e3cc88 +[NSException raise:format:arguments:] + 88
3 Foundation 0x00007fff258b8c9b -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
4 UIKitCore 0x00007fff48c8baed UIApplicationMain + 1862
5 ??? 0x00000001087d2504 0x0 + 4437386500
6 ??? 0x00000001087d237b 0x0 + 4437386107
7 ??? 0x00000001087cef93 0x0 + 4437372819
8 ??? 0x00000001087cedcb 0x0 + 4437372363
9 ??? 0x00000001087ceec1 0x0 + 4437372609
10 libmonosgen-2.0.dylib 0x00000001081a2d7e mono_jit_runtime_invoke + 1911
11 libmonosgen-2.0.dylib 0x000000010832ee0a do_runtime_invoke + 80
12 libmonosgen-2.0.dylib 0x0000000108331fd0 do_exec_main_checked + 92
13 libmonosgen-2.0.dylib 0x00000001081f191e mono_jit_exec + 369
14 libxamarin-debug.dylib 0x000000010802badd xamarin_main + 2685
15 link all 0x0000000107f0cced main + 45
16 libdyld.dylib 0x00007fff51a231fd start + 1
2020-08-27 18:15:09.698283+0200 link all[91128:1963430] Unhandled managed exception: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Unable to instantiate the UIApplication delegate instance. No class named AppDelegate is loaded.
Native stack trace:
0 CoreFoundation 0x00007fff23e3cf0e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50ba89b2 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23e3cc88 +[NSException raise:format:arguments:] + 88
3 Foundation 0x00007fff258b8c9b -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
4 UIKitCore 0x00007fff48c8baed UIApplicationMain + 1862
5 ??? 0x00000001087d2504 0x0 + 4437386500
6 ??? 0x00000001087d237b 0x0 + 4437386107
7 ??? 0x00000001087cef93 0x0 + 4437372819
8 ??? 0x00000001087cedcb 0x0 + 4437372363
9 ??? 0x00000001087ceec1 0x0 + 4437372609
10 libmonosgen-2.0.dylib 0x00000001081a2d7e mono_jit_runtime_invoke + 1911
11 libmonosgen-2.0.dylib 0x000000010832ee0a do_runtime_invoke + 80
12 libmonosgen-2.0.dylib 0x0000000108331fd0 do_exec_main_checked + 92
13 libmonosgen-2.0.dylib 0x00000001081f191e mono_jit_exec + 369
14 libxamarin-debug.dylib 0x000000010802badd xamarin_main + 2685
15 link all 0x0000000107f0cced main + 45
16 libdyld.dylib 0x00007fff51a231fd start + 1
(Foundation.MonoTouchException)
at ObjCRuntime.Runtime.ThrowNSException(IntPtr ns_exception)
at ObjCRuntime.Runtime.throw_ns_exception(IntPtr exc)
at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate)
at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName)
at LinkAll.Application.Main(String[] args) in [...]/xamarin-macios/tests/linker/ios/link all/Main.cs:line 15
--- End of stack trace from previous location ---
at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate)
at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName)
at LinkAll.Application.Main(String[] args) in [...]/xamarin-macios/tests/linker/ios/link all/Main.cs:line 15
=================================================================
Native Crash Reporting
=================================================================
Got a abrt 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:
=================================================================
0x108273f92 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_dump_native_crash_info
0x1082207bd - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_native_crash
0x1082737e9 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : sigabrt_signal_handler
0x7fff51c005fd - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_platform.dylib : _sigtramp
0x0 - Unknown
0x7fff51af0b7c - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_c.dylib : abort
0x10801979f - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_unhandled_exception_handler
0x1082e4980 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_invoke_unhandled_exception_hook
0x108220166 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_exception_internal
0x10821ea47 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_exception
0x10826ea06 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_amd64_throw_exception
0x1086105b0 - Unknown
0x1080194fb - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_process_managed_exception
0x108019377 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_process_managed_exception_gchandle
0x108019333 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_ftnptr_exception_handler
0x10821feeb - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_exception_internal
0x10821ea47 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_exception
0x10826ea06 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_amd64_throw_exception
0x1086105b0 - Unknown
0x1087d264b - Unknown
0x10869439b - Unknown
0x108016c07 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_throw_ns_exception
0x10801a1cb - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : _ZL17exception_handlerP11NSException
0x7fff23e3d36d - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : __handleUncaughtException
0x7fff50ba8c05 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libobjc.A.dylib : _ZL15_objc_terminatev
0x7fff4f9f6c87 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libc++abi.dylib : _ZSt11__terminatePFvvE
0x7fff4f9f940b - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libc++abi.dylib : __cxa_get_exception_ptr
0x7fff4f9f93d2 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libc++abi.dylib : _ZN10__cxxabiv1L22exception_cleanup_funcE19_Unwind_Reason_CodeP17_Unwind_Exception
0x7fff50ba8ad6 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libobjc.A.dylib : _ZL26_objc_exception_destructorPv
0x7fff23e3cc88 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : +[NSException raise:format:arguments:]
0x7fff258b8c9b - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Foundation.framework/Foundation : -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:]
0x7fff48c8baed - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : UIApplicationMain
0x1087d2504 - Unknown
0x1087d237b - Unknown
0x1087cef93 - Unknown
0x1087cedcb - Unknown
0x1087ceec1 - Unknown
0x1081a2d7e - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_jit_runtime_invoke
0x10832ee0a - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : do_runtime_invoke
0x108331fd0 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : do_exec_main_checked
0x1081f191e - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_jit_exec
0x10802badd - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_main
0x107f0cced - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/link all : main
0x7fff51a231fd - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libdyld.dylib : start
2020-08-31 09:38:11 +03:00
return LinkerConfiguration . Context . Annotations ;
2020-07-17 17:38:40 +03:00
}
}
public AssemblyDefinition GetAssembly ( string name )
{
[dotnet-linker] Add MarkNSObjects into the pipeline. (#9543)
A few compat fixes were necessary to make the code compile and run correctly.
Fixes this startup crash with the linkall test:
2020-08-27 18:15:09.648352+0200 link all[91128:1963430] *** Assertion failure in void _UIApplicationMainPreparations(int, char **, NSString *__strong, NSString *__strong)(), /Library/Caches/com.apple.xbs/Sources/UIKitCore_Sim/UIKit-3920.31.100/UIApplication.m:4765
2020-08-27 18:15:09.697128+0200 link all[91128:1963430]
Unhandled Exception:
Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Unable to instantiate the UIApplication delegate instance. No class named AppDelegate is loaded.
Native stack trace:
0 CoreFoundation 0x00007fff23e3cf0e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50ba89b2 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23e3cc88 +[NSException raise:format:arguments:] + 88
3 Foundation 0x00007fff258b8c9b -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
4 UIKitCore 0x00007fff48c8baed UIApplicationMain + 1862
5 ??? 0x00000001087d2504 0x0 + 4437386500
6 ??? 0x00000001087d237b 0x0 + 4437386107
7 ??? 0x00000001087cef93 0x0 + 4437372819
8 ??? 0x00000001087cedcb 0x0 + 4437372363
9 ??? 0x00000001087ceec1 0x0 + 4437372609
10 libmonosgen-2.0.dylib 0x00000001081a2d7e mono_jit_runtime_invoke + 1911
11 libmonosgen-2.0.dylib 0x000000010832ee0a do_runtime_invoke + 80
12 libmonosgen-2.0.dylib 0x0000000108331fd0 do_exec_main_checked + 92
13 libmonosgen-2.0.dylib 0x00000001081f191e mono_jit_exec + 369
14 libxamarin-debug.dylib 0x000000010802badd xamarin_main + 2685
15 link all 0x0000000107f0cced main + 45
16 libdyld.dylib 0x00007fff51a231fd start + 1
at ObjCRuntime.Runtime.ThrowNSException(IntPtr ns_exception)
at ObjCRuntime.Runtime.throw_ns_exception(IntPtr exc)
at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate)
at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName)
at LinkAll.Application.Main(String[] args) in [...]/xamarin-macios/tests/linker/ios/link all/Main.cs:line 15
--- End of stack trace from previous location ---
at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate)
at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName)
at LinkAll.Application.Main(String[] args) in [...]/xamarin-macios/tests/linker/ios/link all/Main.cs:line 15 0 CoreFoundation 0x00007fff23e3cf0e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50ba89b2 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23e3cc88 +[NSException raise:format:arguments:] + 88
3 Foundation 0x00007fff258b8c9b -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
4 UIKitCore 0x00007fff48c8baed UIApplicationMain + 1862
5 ??? 0x00000001087d2504 0x0 + 4437386500
6 ??? 0x00000001087d237b 0x0 + 4437386107
7 ??? 0x00000001087cef93 0x0 + 4437372819
8 ??? 0x00000001087cedcb 0x0 + 4437372363
9 ??? 0x00000001087ceec1 0x0 + 4437372609
10 libmonosgen-2.0.dylib 0x00000001081a2d7e mono_jit_runtime_invoke + 1911
11 libmonosgen-2.0.dylib 0x000000010832ee0a do_runtime_invoke + 80
12 libmonosgen-2.0.dylib 0x0000000108331fd0 do_exec_main_checked + 92
13 libmonosgen-2.0.dylib 0x00000001081f191e mono_jit_exec + 369
14 libxamarin-debug.dylib 0x000000010802badd xamarin_main + 2685
15 link all 0x0000000107f0cced main + 45
16 libdyld.dylib 0x00007fff51a231fd start + 1
2020-08-27 18:15:09.698283+0200 link all[91128:1963430] Unhandled managed exception: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Unable to instantiate the UIApplication delegate instance. No class named AppDelegate is loaded.
Native stack trace:
0 CoreFoundation 0x00007fff23e3cf0e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50ba89b2 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23e3cc88 +[NSException raise:format:arguments:] + 88
3 Foundation 0x00007fff258b8c9b -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
4 UIKitCore 0x00007fff48c8baed UIApplicationMain + 1862
5 ??? 0x00000001087d2504 0x0 + 4437386500
6 ??? 0x00000001087d237b 0x0 + 4437386107
7 ??? 0x00000001087cef93 0x0 + 4437372819
8 ??? 0x00000001087cedcb 0x0 + 4437372363
9 ??? 0x00000001087ceec1 0x0 + 4437372609
10 libmonosgen-2.0.dylib 0x00000001081a2d7e mono_jit_runtime_invoke + 1911
11 libmonosgen-2.0.dylib 0x000000010832ee0a do_runtime_invoke + 80
12 libmonosgen-2.0.dylib 0x0000000108331fd0 do_exec_main_checked + 92
13 libmonosgen-2.0.dylib 0x00000001081f191e mono_jit_exec + 369
14 libxamarin-debug.dylib 0x000000010802badd xamarin_main + 2685
15 link all 0x0000000107f0cced main + 45
16 libdyld.dylib 0x00007fff51a231fd start + 1
(Foundation.MonoTouchException)
at ObjCRuntime.Runtime.ThrowNSException(IntPtr ns_exception)
at ObjCRuntime.Runtime.throw_ns_exception(IntPtr exc)
at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate)
at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName)
at LinkAll.Application.Main(String[] args) in [...]/xamarin-macios/tests/linker/ios/link all/Main.cs:line 15
--- End of stack trace from previous location ---
at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate)
at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName)
at LinkAll.Application.Main(String[] args) in [...]/xamarin-macios/tests/linker/ios/link all/Main.cs:line 15
=================================================================
Native Crash Reporting
=================================================================
Got a abrt 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:
=================================================================
0x108273f92 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_dump_native_crash_info
0x1082207bd - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_native_crash
0x1082737e9 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : sigabrt_signal_handler
0x7fff51c005fd - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_platform.dylib : _sigtramp
0x0 - Unknown
0x7fff51af0b7c - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_c.dylib : abort
0x10801979f - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_unhandled_exception_handler
0x1082e4980 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_invoke_unhandled_exception_hook
0x108220166 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_exception_internal
0x10821ea47 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_exception
0x10826ea06 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_amd64_throw_exception
0x1086105b0 - Unknown
0x1080194fb - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_process_managed_exception
0x108019377 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_process_managed_exception_gchandle
0x108019333 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_ftnptr_exception_handler
0x10821feeb - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_exception_internal
0x10821ea47 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_exception
0x10826ea06 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_amd64_throw_exception
0x1086105b0 - Unknown
0x1087d264b - Unknown
0x10869439b - Unknown
0x108016c07 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_throw_ns_exception
0x10801a1cb - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : _ZL17exception_handlerP11NSException
0x7fff23e3d36d - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : __handleUncaughtException
0x7fff50ba8c05 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libobjc.A.dylib : _ZL15_objc_terminatev
0x7fff4f9f6c87 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libc++abi.dylib : _ZSt11__terminatePFvvE
0x7fff4f9f940b - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libc++abi.dylib : __cxa_get_exception_ptr
0x7fff4f9f93d2 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libc++abi.dylib : _ZN10__cxxabiv1L22exception_cleanup_funcE19_Unwind_Reason_CodeP17_Unwind_Exception
0x7fff50ba8ad6 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libobjc.A.dylib : _ZL26_objc_exception_destructorPv
0x7fff23e3cc88 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : +[NSException raise:format:arguments:]
0x7fff258b8c9b - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Foundation.framework/Foundation : -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:]
0x7fff48c8baed - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : UIApplicationMain
0x1087d2504 - Unknown
0x1087d237b - Unknown
0x1087cef93 - Unknown
0x1087cedcb - Unknown
0x1087ceec1 - Unknown
0x1081a2d7e - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_jit_runtime_invoke
0x10832ee0a - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : do_runtime_invoke
0x108331fd0 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : do_exec_main_checked
0x1081f191e - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_jit_exec
0x10802badd - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_main
0x107f0cced - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/link all : main
0x7fff51a231fd - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libdyld.dylib : start
2020-08-31 09:38:11 +03:00
return LinkerConfiguration . Context . GetLoadedAssembly ( name ) ;
2020-07-17 17:38:40 +03:00
}
}
public class Pipeline {
}
}
2020-08-27 16:43:22 +03:00
namespace Xamarin.Linker {
[dotnet-linker] Add MarkNSObjects into the pipeline. (#9543)
A few compat fixes were necessary to make the code compile and run correctly.
Fixes this startup crash with the linkall test:
2020-08-27 18:15:09.648352+0200 link all[91128:1963430] *** Assertion failure in void _UIApplicationMainPreparations(int, char **, NSString *__strong, NSString *__strong)(), /Library/Caches/com.apple.xbs/Sources/UIKitCore_Sim/UIKit-3920.31.100/UIApplication.m:4765
2020-08-27 18:15:09.697128+0200 link all[91128:1963430]
Unhandled Exception:
Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Unable to instantiate the UIApplication delegate instance. No class named AppDelegate is loaded.
Native stack trace:
0 CoreFoundation 0x00007fff23e3cf0e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50ba89b2 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23e3cc88 +[NSException raise:format:arguments:] + 88
3 Foundation 0x00007fff258b8c9b -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
4 UIKitCore 0x00007fff48c8baed UIApplicationMain + 1862
5 ??? 0x00000001087d2504 0x0 + 4437386500
6 ??? 0x00000001087d237b 0x0 + 4437386107
7 ??? 0x00000001087cef93 0x0 + 4437372819
8 ??? 0x00000001087cedcb 0x0 + 4437372363
9 ??? 0x00000001087ceec1 0x0 + 4437372609
10 libmonosgen-2.0.dylib 0x00000001081a2d7e mono_jit_runtime_invoke + 1911
11 libmonosgen-2.0.dylib 0x000000010832ee0a do_runtime_invoke + 80
12 libmonosgen-2.0.dylib 0x0000000108331fd0 do_exec_main_checked + 92
13 libmonosgen-2.0.dylib 0x00000001081f191e mono_jit_exec + 369
14 libxamarin-debug.dylib 0x000000010802badd xamarin_main + 2685
15 link all 0x0000000107f0cced main + 45
16 libdyld.dylib 0x00007fff51a231fd start + 1
at ObjCRuntime.Runtime.ThrowNSException(IntPtr ns_exception)
at ObjCRuntime.Runtime.throw_ns_exception(IntPtr exc)
at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate)
at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName)
at LinkAll.Application.Main(String[] args) in [...]/xamarin-macios/tests/linker/ios/link all/Main.cs:line 15
--- End of stack trace from previous location ---
at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate)
at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName)
at LinkAll.Application.Main(String[] args) in [...]/xamarin-macios/tests/linker/ios/link all/Main.cs:line 15 0 CoreFoundation 0x00007fff23e3cf0e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50ba89b2 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23e3cc88 +[NSException raise:format:arguments:] + 88
3 Foundation 0x00007fff258b8c9b -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
4 UIKitCore 0x00007fff48c8baed UIApplicationMain + 1862
5 ??? 0x00000001087d2504 0x0 + 4437386500
6 ??? 0x00000001087d237b 0x0 + 4437386107
7 ??? 0x00000001087cef93 0x0 + 4437372819
8 ??? 0x00000001087cedcb 0x0 + 4437372363
9 ??? 0x00000001087ceec1 0x0 + 4437372609
10 libmonosgen-2.0.dylib 0x00000001081a2d7e mono_jit_runtime_invoke + 1911
11 libmonosgen-2.0.dylib 0x000000010832ee0a do_runtime_invoke + 80
12 libmonosgen-2.0.dylib 0x0000000108331fd0 do_exec_main_checked + 92
13 libmonosgen-2.0.dylib 0x00000001081f191e mono_jit_exec + 369
14 libxamarin-debug.dylib 0x000000010802badd xamarin_main + 2685
15 link all 0x0000000107f0cced main + 45
16 libdyld.dylib 0x00007fff51a231fd start + 1
2020-08-27 18:15:09.698283+0200 link all[91128:1963430] Unhandled managed exception: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Unable to instantiate the UIApplication delegate instance. No class named AppDelegate is loaded.
Native stack trace:
0 CoreFoundation 0x00007fff23e3cf0e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50ba89b2 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23e3cc88 +[NSException raise:format:arguments:] + 88
3 Foundation 0x00007fff258b8c9b -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
4 UIKitCore 0x00007fff48c8baed UIApplicationMain + 1862
5 ??? 0x00000001087d2504 0x0 + 4437386500
6 ??? 0x00000001087d237b 0x0 + 4437386107
7 ??? 0x00000001087cef93 0x0 + 4437372819
8 ??? 0x00000001087cedcb 0x0 + 4437372363
9 ??? 0x00000001087ceec1 0x0 + 4437372609
10 libmonosgen-2.0.dylib 0x00000001081a2d7e mono_jit_runtime_invoke + 1911
11 libmonosgen-2.0.dylib 0x000000010832ee0a do_runtime_invoke + 80
12 libmonosgen-2.0.dylib 0x0000000108331fd0 do_exec_main_checked + 92
13 libmonosgen-2.0.dylib 0x00000001081f191e mono_jit_exec + 369
14 libxamarin-debug.dylib 0x000000010802badd xamarin_main + 2685
15 link all 0x0000000107f0cced main + 45
16 libdyld.dylib 0x00007fff51a231fd start + 1
(Foundation.MonoTouchException)
at ObjCRuntime.Runtime.ThrowNSException(IntPtr ns_exception)
at ObjCRuntime.Runtime.throw_ns_exception(IntPtr exc)
at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate)
at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName)
at LinkAll.Application.Main(String[] args) in [...]/xamarin-macios/tests/linker/ios/link all/Main.cs:line 15
--- End of stack trace from previous location ---
at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate)
at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName)
at LinkAll.Application.Main(String[] args) in [...]/xamarin-macios/tests/linker/ios/link all/Main.cs:line 15
=================================================================
Native Crash Reporting
=================================================================
Got a abrt 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:
=================================================================
0x108273f92 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_dump_native_crash_info
0x1082207bd - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_native_crash
0x1082737e9 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : sigabrt_signal_handler
0x7fff51c005fd - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_platform.dylib : _sigtramp
0x0 - Unknown
0x7fff51af0b7c - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_c.dylib : abort
0x10801979f - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_unhandled_exception_handler
0x1082e4980 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_invoke_unhandled_exception_hook
0x108220166 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_exception_internal
0x10821ea47 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_exception
0x10826ea06 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_amd64_throw_exception
0x1086105b0 - Unknown
0x1080194fb - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_process_managed_exception
0x108019377 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_process_managed_exception_gchandle
0x108019333 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_ftnptr_exception_handler
0x10821feeb - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_exception_internal
0x10821ea47 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_exception
0x10826ea06 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_amd64_throw_exception
0x1086105b0 - Unknown
0x1087d264b - Unknown
0x10869439b - Unknown
0x108016c07 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_throw_ns_exception
0x10801a1cb - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : _ZL17exception_handlerP11NSException
0x7fff23e3d36d - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : __handleUncaughtException
0x7fff50ba8c05 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libobjc.A.dylib : _ZL15_objc_terminatev
0x7fff4f9f6c87 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libc++abi.dylib : _ZSt11__terminatePFvvE
0x7fff4f9f940b - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libc++abi.dylib : __cxa_get_exception_ptr
0x7fff4f9f93d2 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libc++abi.dylib : _ZN10__cxxabiv1L22exception_cleanup_funcE19_Unwind_Reason_CodeP17_Unwind_Exception
0x7fff50ba8ad6 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libobjc.A.dylib : _ZL26_objc_exception_destructorPv
0x7fff23e3cc88 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : +[NSException raise:format:arguments:]
0x7fff258b8c9b - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Foundation.framework/Foundation : -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:]
0x7fff48c8baed - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : UIApplicationMain
0x1087d2504 - Unknown
0x1087d237b - Unknown
0x1087cef93 - Unknown
0x1087cedcb - Unknown
0x1087ceec1 - Unknown
0x1081a2d7e - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_jit_runtime_invoke
0x10832ee0a - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : do_runtime_invoke
0x108331fd0 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : do_exec_main_checked
0x1081f191e - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_jit_exec
0x10802badd - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_main
0x107f0cced - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/link all : main
0x7fff51a231fd - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libdyld.dylib : start
2020-08-31 09:38:11 +03:00
public class BaseProfile : Profile {
public BaseProfile ( LinkerConfiguration config )
: base ( config )
{
}
}
2020-08-27 16:43:22 +03:00
public class Profile {
public LinkerConfiguration Configuration { get ; private set ; }
public Profile ( LinkerConfiguration config )
{
Configuration = config ;
}
[dotnet-linker] Add MarkNSObjects into the pipeline. (#9543)
A few compat fixes were necessary to make the code compile and run correctly.
Fixes this startup crash with the linkall test:
2020-08-27 18:15:09.648352+0200 link all[91128:1963430] *** Assertion failure in void _UIApplicationMainPreparations(int, char **, NSString *__strong, NSString *__strong)(), /Library/Caches/com.apple.xbs/Sources/UIKitCore_Sim/UIKit-3920.31.100/UIApplication.m:4765
2020-08-27 18:15:09.697128+0200 link all[91128:1963430]
Unhandled Exception:
Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Unable to instantiate the UIApplication delegate instance. No class named AppDelegate is loaded.
Native stack trace:
0 CoreFoundation 0x00007fff23e3cf0e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50ba89b2 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23e3cc88 +[NSException raise:format:arguments:] + 88
3 Foundation 0x00007fff258b8c9b -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
4 UIKitCore 0x00007fff48c8baed UIApplicationMain + 1862
5 ??? 0x00000001087d2504 0x0 + 4437386500
6 ??? 0x00000001087d237b 0x0 + 4437386107
7 ??? 0x00000001087cef93 0x0 + 4437372819
8 ??? 0x00000001087cedcb 0x0 + 4437372363
9 ??? 0x00000001087ceec1 0x0 + 4437372609
10 libmonosgen-2.0.dylib 0x00000001081a2d7e mono_jit_runtime_invoke + 1911
11 libmonosgen-2.0.dylib 0x000000010832ee0a do_runtime_invoke + 80
12 libmonosgen-2.0.dylib 0x0000000108331fd0 do_exec_main_checked + 92
13 libmonosgen-2.0.dylib 0x00000001081f191e mono_jit_exec + 369
14 libxamarin-debug.dylib 0x000000010802badd xamarin_main + 2685
15 link all 0x0000000107f0cced main + 45
16 libdyld.dylib 0x00007fff51a231fd start + 1
at ObjCRuntime.Runtime.ThrowNSException(IntPtr ns_exception)
at ObjCRuntime.Runtime.throw_ns_exception(IntPtr exc)
at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate)
at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName)
at LinkAll.Application.Main(String[] args) in [...]/xamarin-macios/tests/linker/ios/link all/Main.cs:line 15
--- End of stack trace from previous location ---
at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate)
at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName)
at LinkAll.Application.Main(String[] args) in [...]/xamarin-macios/tests/linker/ios/link all/Main.cs:line 15 0 CoreFoundation 0x00007fff23e3cf0e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50ba89b2 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23e3cc88 +[NSException raise:format:arguments:] + 88
3 Foundation 0x00007fff258b8c9b -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
4 UIKitCore 0x00007fff48c8baed UIApplicationMain + 1862
5 ??? 0x00000001087d2504 0x0 + 4437386500
6 ??? 0x00000001087d237b 0x0 + 4437386107
7 ??? 0x00000001087cef93 0x0 + 4437372819
8 ??? 0x00000001087cedcb 0x0 + 4437372363
9 ??? 0x00000001087ceec1 0x0 + 4437372609
10 libmonosgen-2.0.dylib 0x00000001081a2d7e mono_jit_runtime_invoke + 1911
11 libmonosgen-2.0.dylib 0x000000010832ee0a do_runtime_invoke + 80
12 libmonosgen-2.0.dylib 0x0000000108331fd0 do_exec_main_checked + 92
13 libmonosgen-2.0.dylib 0x00000001081f191e mono_jit_exec + 369
14 libxamarin-debug.dylib 0x000000010802badd xamarin_main + 2685
15 link all 0x0000000107f0cced main + 45
16 libdyld.dylib 0x00007fff51a231fd start + 1
2020-08-27 18:15:09.698283+0200 link all[91128:1963430] Unhandled managed exception: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Unable to instantiate the UIApplication delegate instance. No class named AppDelegate is loaded.
Native stack trace:
0 CoreFoundation 0x00007fff23e3cf0e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50ba89b2 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23e3cc88 +[NSException raise:format:arguments:] + 88
3 Foundation 0x00007fff258b8c9b -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
4 UIKitCore 0x00007fff48c8baed UIApplicationMain + 1862
5 ??? 0x00000001087d2504 0x0 + 4437386500
6 ??? 0x00000001087d237b 0x0 + 4437386107
7 ??? 0x00000001087cef93 0x0 + 4437372819
8 ??? 0x00000001087cedcb 0x0 + 4437372363
9 ??? 0x00000001087ceec1 0x0 + 4437372609
10 libmonosgen-2.0.dylib 0x00000001081a2d7e mono_jit_runtime_invoke + 1911
11 libmonosgen-2.0.dylib 0x000000010832ee0a do_runtime_invoke + 80
12 libmonosgen-2.0.dylib 0x0000000108331fd0 do_exec_main_checked + 92
13 libmonosgen-2.0.dylib 0x00000001081f191e mono_jit_exec + 369
14 libxamarin-debug.dylib 0x000000010802badd xamarin_main + 2685
15 link all 0x0000000107f0cced main + 45
16 libdyld.dylib 0x00007fff51a231fd start + 1
(Foundation.MonoTouchException)
at ObjCRuntime.Runtime.ThrowNSException(IntPtr ns_exception)
at ObjCRuntime.Runtime.throw_ns_exception(IntPtr exc)
at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate)
at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName)
at LinkAll.Application.Main(String[] args) in [...]/xamarin-macios/tests/linker/ios/link all/Main.cs:line 15
--- End of stack trace from previous location ---
at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate)
at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName)
at LinkAll.Application.Main(String[] args) in [...]/xamarin-macios/tests/linker/ios/link all/Main.cs:line 15
=================================================================
Native Crash Reporting
=================================================================
Got a abrt 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:
=================================================================
0x108273f92 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_dump_native_crash_info
0x1082207bd - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_native_crash
0x1082737e9 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : sigabrt_signal_handler
0x7fff51c005fd - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_platform.dylib : _sigtramp
0x0 - Unknown
0x7fff51af0b7c - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_c.dylib : abort
0x10801979f - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_unhandled_exception_handler
0x1082e4980 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_invoke_unhandled_exception_hook
0x108220166 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_exception_internal
0x10821ea47 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_exception
0x10826ea06 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_amd64_throw_exception
0x1086105b0 - Unknown
0x1080194fb - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_process_managed_exception
0x108019377 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_process_managed_exception_gchandle
0x108019333 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_ftnptr_exception_handler
0x10821feeb - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_exception_internal
0x10821ea47 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_exception
0x10826ea06 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_amd64_throw_exception
0x1086105b0 - Unknown
0x1087d264b - Unknown
0x10869439b - Unknown
0x108016c07 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_throw_ns_exception
0x10801a1cb - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : _ZL17exception_handlerP11NSException
0x7fff23e3d36d - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : __handleUncaughtException
0x7fff50ba8c05 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libobjc.A.dylib : _ZL15_objc_terminatev
0x7fff4f9f6c87 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libc++abi.dylib : _ZSt11__terminatePFvvE
0x7fff4f9f940b - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libc++abi.dylib : __cxa_get_exception_ptr
0x7fff4f9f93d2 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libc++abi.dylib : _ZN10__cxxabiv1L22exception_cleanup_funcE19_Unwind_Reason_CodeP17_Unwind_Exception
0x7fff50ba8ad6 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libobjc.A.dylib : _ZL26_objc_exception_destructorPv
0x7fff23e3cc88 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : +[NSException raise:format:arguments:]
0x7fff258b8c9b - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Foundation.framework/Foundation : -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:]
0x7fff48c8baed - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : UIApplicationMain
0x1087d2504 - Unknown
0x1087d237b - Unknown
0x1087cef93 - Unknown
0x1087cedcb - Unknown
0x1087ceec1 - Unknown
0x1081a2d7e - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_jit_runtime_invoke
0x10832ee0a - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : do_runtime_invoke
0x108331fd0 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : do_exec_main_checked
0x1081f191e - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_jit_exec
0x10802badd - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_main
0x107f0cced - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/link all : main
0x7fff51a231fd - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libdyld.dylib : start
2020-08-31 09:38:11 +03:00
public Profile Current {
get { return this ; }
}
public string ProductAssembly {
get { return Configuration . PlatformAssembly ; }
}
2021-01-25 17:38:17 +03:00
public bool IsProductAssembly ( string filename )
{
return Assembly . GetIdentity ( filename ) = = Configuration . PlatformAssembly ;
}
2020-08-27 16:43:22 +03:00
public bool IsProductAssembly ( AssemblyDefinition assembly )
{
return assembly . Name . Name = = Configuration . PlatformAssembly ;
}
2020-09-07 19:33:53 +03:00
public bool IsSdkAssembly ( AssemblyDefinition assembly )
{
return Configuration . FrameworkAssemblies . Contains ( Assembly . GetIdentity ( assembly ) ) ;
}
2021-01-25 17:38:17 +03:00
public bool IsSdkAssembly ( string filename )
{
return Configuration . FrameworkAssemblies . Contains ( Assembly . GetIdentity ( filename ) ) ;
}
2020-08-27 16:43:22 +03:00
}
}
2020-07-17 17:38:40 +03:00
namespace Mono.Linker {
public static class LinkContextExtensions {
public static void LogMessage ( this LinkContext context , string messsage )
{
throw new NotImplementedException ( ) ;
}
public static IEnumerable < AssemblyDefinition > GetAssemblies ( this LinkContext context )
{
2020-08-27 19:30:19 +03:00
return LinkerConfiguration . GetInstance ( context ) . Assemblies ;
2020-07-17 17:38:40 +03:00
}
2020-09-10 09:30:45 +03:00
static ConditionalWeakTable < AnnotationStore , Dictionary < string , Dictionary < IMetadataTokenProvider , object > > > custom_annotations = new ConditionalWeakTable < AnnotationStore , Dictionary < string , Dictionary < IMetadataTokenProvider , object > > > ( ) ;
2020-07-17 17:38:40 +03:00
public static Dictionary < IMetadataTokenProvider , object > GetCustomAnnotations ( this AnnotationStore self , string name )
{
2020-09-10 09:30:45 +03:00
var store = custom_annotations . GetOrCreateValue ( self ) ;
if ( ! store . TryGetValue ( name , out var dict ) )
store [ name ] = dict = new Dictionary < IMetadataTokenProvider , object > ( ) ;
return dict ;
2020-07-17 17:38:40 +03:00
}
}
2020-06-05 14:09:28 +03:00
}