xamarin-macios/tools/dotnet-linker/Compat.cs

206 строки
5.5 KiB
C#
Исходник Обычный вид История

// Compat.cs: might not be ideal but it eases code sharing with existing code during the initial implementation.
using System;
using System.Collections.Generic;
2021-01-25 17:38:17 +03:00
using System.IO;
using System.Runtime.CompilerServices;
using Mono.Cecil;
using Mono.Linker;
using Mono.Linker.Steps;
[dotnet] Define and implement a 'framework' or 'sdk' assembly as an assembly that comes from the .NET BCL NuGet. (#9571) The Assembly.IsFrameworkAssembly property is used in two places: * In Driver.IsBoundAssembly to return early when determining if an assembly has any NSObject subclasses: https://github.com/xamarin/xamarin-macios/blob/c1c5b9aac67461122a3b66334876ed9aeb4cd63c/tools/mtouch/mtouch.cs#L1155-L1168 * In Assembly.ExtractNativeLinkInfo to return early when looking for assemblies with LinkWith attributes: https://github.com/xamarin/xamarin-macios/blob/c1c5b9aac67461122a3b66334876ed9aeb4cd63c/tools/common/Assembly.cs#L150-L154 In both cases this definition of framework assembly works today and seems likely to work in the future as well. I also went through and looked at all the usages of Profile.IsSdkAssembly, and it's used to: * Decide which assemblies are selected for "link sdk" * Decide which assemblies are considered an 'sdk' assembly for creating a user framework of all the sdk assemblies * Bail out early when deciding whether: * An assembly references the product assembly (Xamarin.iOS.dll, etc.) * An assembly can contain references to UIWebView * An assembly can contain user resources * An assembly is a binding project / has third-party native resources * An assembly needs the dynamic registrar * An assembly has FieldAttributes whose native fields must be preserved by the native linker In all cases our .NET definition of 'SDK' seems to work both for now and in the future. There are also a few usages which does not apply to .NET, so I've ignored them: * When looking for a few BCL APIs that must be preserved (MobileApplyPreserveAttribute.cs): this is to be done in the upstream .NET linker now, so it doesn't apply to our own code * When linking away parameter names (MonoTouchMarkStep.cs): this is to be done in the upstream .NET linker now, so it doesn't apply to our own code
2020-09-07 19:33:53 +03:00
using Xamarin.Bundler;
using Xamarin.Linker;
using Xamarin.Utils;
namespace Xamarin.Bundler {
public partial class Application {
public LinkerConfiguration Configuration { get; private set; }
public string RuntimeConfigurationFile { get; set; }
public Application (LinkerConfiguration configuration)
{
this.Configuration = configuration;
}
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";
case ApplePlatform.MacCatalyst:
return "Microsoft.MacCatalyst";
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);
}
}
}
public void SelectRegistrar ()
{
if (Registrar == RegistrarMode.Default) {
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
Registrar = RegistrarMode.PartialStatic;
} else {
// Last option is the dynamic registrar
Registrar = RegistrarMode.Dynamic;
}
}
Driver.Log (1, $"Registrar mode: {Registrar}");
}
public void Initialize ()
{
// mSYM support is not implemented in the runtime on .NET 6 afaik
EnableMSym = false;
}
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;
}
}
}
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 ();
}
public static string SdkRoot {
get => sdk_root;
set => sdk_root = value;
}
}
[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.
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;
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;
}
}
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);
}
}
public class Pipeline {
}
}
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)
{
}
}
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;
}
public bool IsProductAssembly (AssemblyDefinition assembly)
{
return assembly.Name.Name == Configuration.PlatformAssembly;
}
[dotnet] Define and implement a 'framework' or 'sdk' assembly as an assembly that comes from the .NET BCL NuGet. (#9571) The Assembly.IsFrameworkAssembly property is used in two places: * In Driver.IsBoundAssembly to return early when determining if an assembly has any NSObject subclasses: https://github.com/xamarin/xamarin-macios/blob/c1c5b9aac67461122a3b66334876ed9aeb4cd63c/tools/mtouch/mtouch.cs#L1155-L1168 * In Assembly.ExtractNativeLinkInfo to return early when looking for assemblies with LinkWith attributes: https://github.com/xamarin/xamarin-macios/blob/c1c5b9aac67461122a3b66334876ed9aeb4cd63c/tools/common/Assembly.cs#L150-L154 In both cases this definition of framework assembly works today and seems likely to work in the future as well. I also went through and looked at all the usages of Profile.IsSdkAssembly, and it's used to: * Decide which assemblies are selected for "link sdk" * Decide which assemblies are considered an 'sdk' assembly for creating a user framework of all the sdk assemblies * Bail out early when deciding whether: * An assembly references the product assembly (Xamarin.iOS.dll, etc.) * An assembly can contain references to UIWebView * An assembly can contain user resources * An assembly is a binding project / has third-party native resources * An assembly needs the dynamic registrar * An assembly has FieldAttributes whose native fields must be preserved by the native linker In all cases our .NET definition of 'SDK' seems to work both for now and in the future. There are also a few usages which does not apply to .NET, so I've ignored them: * When looking for a few BCL APIs that must be preserved (MobileApplyPreserveAttribute.cs): this is to be done in the upstream .NET linker now, so it doesn't apply to our own code * When linking away parameter names (MonoTouchMarkStep.cs): this is to be done in the upstream .NET linker now, so it doesn't apply to our own code
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));
}
}
}
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)
{
[dotnet-linker] Add ApplyPreserveAttribute into the pipeline. (#9529) This means: * Move the parts of the ApplyPreserveAttribute step that we don't need for.NET into a new MobileApplyPreserveAttribute step, and have mtouch and mmp use that step instead of the ApplyPreserveAttribute step. * Copy ApplyPreserveAttributeBase into dotnet-linker from the upstream tuner source (with minor modifications) so that our ApplyPreserveAttribute step compiles. * Create a DotNetSubStepDispatcher class that we're going to use as our substep dispatcher, create an instance of it and insert it into the list of linker steps. * Also a workaround for the lack of LinkContext.GetAssemblies (): add a step that collects all the assemblies and stores them in a list, so that we can have our own GetAssemblies implementation. I filed a linker issue to see if we can get LinkContext.GetAssemblies () exposed to us: https://github.com/mono/linker/issues/1455. Fixes this startup crash with the linkall test: 2020-08-26 19:47:10.219697+0200 link all[32709:6065783] Xamarin.iOS: Fatal error: failed to load the method 'ObjCRuntime.Runtime.Initialize'. ================================================================= 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: ================================================================= 0x104007b0e - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/4A5F3968-6980-4E90-88A2-2E77AE039C40/link all.app/libmonosgen-2.0.dylib : mono_dump_native_crash_info 0x103fb4437 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/4A5F3968-6980-4E90-88A2-2E77AE039C40/link all.app/libmonosgen-2.0.dylib : mono_handle_native_crash 0x104007365 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/4A5F3968-6980-4E90-88A2-2E77AE039C40/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 0x103daad98 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/4A5F3968-6980-4E90-88A2-2E77AE039C40/link all.app/libxamarin-debug.dylib : xamarin_assertion_message 0x103dade77 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/4A5F3968-6980-4E90-88A2-2E77AE039C40/link all.app/libxamarin-debug.dylib : xamarin_initialize 0x103dbf80b - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/4A5F3968-6980-4E90-88A2-2E77AE039C40/link all.app/libxamarin-debug.dylib : xamarin_main 0x103cd2f0d - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/4A5F3968-6980-4E90-88A2-2E77AE039C40/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 This is a partial/modified port of the initial linker support (bc88790201) Co-authored-by: Sebastien Pouliot <sebastien@xamarin.com>
2020-08-27 19:30:19 +03:00
return LinkerConfiguration.GetInstance (context).Assemblies;
}
static ConditionalWeakTable<AnnotationStore, Dictionary<string, Dictionary<IMetadataTokenProvider, object>>> custom_annotations = new ConditionalWeakTable<AnnotationStore, Dictionary<string, Dictionary<IMetadataTokenProvider, object>>> ();
public static Dictionary<IMetadataTokenProvider, object> GetCustomAnnotations (this AnnotationStore self, string name)
{
var store = custom_annotations.GetOrCreateValue (self);
if (!store.TryGetValue (name, out var dict))
store [name] = dict = new Dictionary<IMetadataTokenProvider, object> ();
return dict;
}
}
}