我已经和一个bug斗争了几天了。我一直在到处寻找解决方案。我无能为力。
基本上,我的iOS应用程序在启动时就崩溃了。我得到一个带有错误的SIGABT故障代码:FIXME: ftnptr_arg page trampolines
。我将在下面附上一份事故报告。我在这个网站上发现了一些与我的问题有点相似的帖子:
在执行本机代码xamarin.ios 时获得SIGABRT
上次Xamarin.iOS更新后出现SIGABRT错误
Xamarin IOS应用程序崩溃,出现异常:EXC_BAD_ACCESS(SIGABRT(
以及在GitHub上:https://github.com/mono/mono/issues/9871
我尝试过这些解决方案,但它们对我不起作用。我还想补充一点,我正在设备上使用蓝牙。我确实在Info.plist文件中添加了正确的权限。我正在使用的蓝牙库是Plugin.BLE:https://github.com/xabre/xamarin-bluetooth-le
无论如何,崩溃发生在一个无法访问蓝牙设备的页面上。它发生在登录页面上(这是向用户显示的第一个页面(。我不认为这个问题与蓝牙有关。就像我之前说的,我几乎已经无能为力了。不确定发生了什么。有其他人遇到这个问题吗?
附加说明:
我还想补充一点,我能够调试表单的初始化,并在不崩溃的情况下逐步完成代码。我只有3个功能。一个用于初始化,另一个用于窗体出现时,第三个用于按下按钮时。我可以逐步完成前两个函数的代码。程序执行完这两个之后,应用程序就会崩溃。我知道这不是我的代码的问题,因为同样的代码在Android上运行良好。
此外,我会创建一个极简主义的代码来发布,然而,该应用程序包括许多图片和图形,我认为这些图片和图形太大,无法在这里发布。我不认为这个问题与我写的代码有关。如上所述,该代码在Android上运行良好。
故障调试报告:
[HotReload] (2020-04-08 15:31:50.1): WARN: (PQEApplicationv3.iOS) Hot Reload disabled due to invalid linker settings
Loaded assembly: /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/Mono.Security.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/System.Core.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/System.Numerics.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/System.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/System.Drawing.Common.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/.monotouch-32/Xamarin.iOS.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/System.Net.Http.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/System.Xml.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/Xamarin.Forms.Platform.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/Xamarin.Forms.Core.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/System.ServiceModel.Internals.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/System.Runtime.Serialization.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/Xamarin.Forms.Platform.iOS.dll [External]
Thread started: #2
Loaded assembly: /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/Xamarin.Essentials.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/Plugin.BLE.Abstractions.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/Plugin.BLE.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/Xamarin.Forms.Xaml.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/PQEApplicationv3.dll
Loaded assembly: /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/PQEApplicationv3.iOS.exe
2020-04-08 11:31:53.660 PQEApplicationv3.iOS[403:658622] error: FIXME: ftnptr_arg page trampolines
=================================================================
Native Crash Reporting
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
=================================================================
Native stacktrace:
=================================================================
0x3ff556b - /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/libmonosgen-2.0.dylib : mono_dump_native_crash_info
0x3fed549 - /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/libmonosgen-2.0.dylib : mono_handle_native_crash
0x3ff4c2f - /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/libmonosgen-2.0.dylib : sigabrt_signal_handler
0x1d8c0259 - /usr/lib/system/libsystem_platform.dylib : _sigtramp
0x1d8c6087 - /usr/lib/system/libsystem_pthread.dylib : pthread_kill
0x1d7a295b - /usr/lib/system/libsystem_c.dylib : abort
0x4357d4c - /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/libxamarin-debug.dylib : _ZL12log_callbackPKcS0_S0_iPv
0x4123ca1 - /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/libmonosgen-2.0.dylib : eglib_log_adapter
0x3fcbfb7 - /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/libmonosgen-2.0.dylib : monoeg_g_logv_nofree
0x3fcbff5 - /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/libmonosgen-2.0.dylib : monoeg_g_log
0x3fd98cb - /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/libmonosgen-2.0.dylib : mono_aot_get_ftnptr_arg_trampoline
0xdc74f - /var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/PQEApplicationv3.iOS : (null)
0x3ff7957 - /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/libmonosgen-2.0.dylib : mono_jit_compile_method_with_opt
0x3ffea7b - /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/libmonosgen-2.0.dylib : mono_delegate_trampoline
0x72d494 - /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/libmscorlib.dll.dylib : generic_trampoline_delegate
0x6bc6a0 - /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/libmscorlib.dll.dylib : wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr
0x3ffc1ad - /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/libmonosgen-2.0.dylib : mono_jit_runtime_invoke
0x408f937 - /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/libmonosgen-2.0.dylib : mono_runtime_invoke_checked
0x40924cb - /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/libmonosgen-2.0.dylib : mono_runtime_invoke
0xbc649 - /var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/PQEApplicationv3.iOS : (null)
0xbd241 - /var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/PQEApplicationv3.iOS : (null)
0x1e985b2f - /System/Library/Frameworks/Foundation.framework/Foundation : <redacted>
0x1dffbfdd - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : <redacted>
0x1dffbaa5 - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : <redacted>
0x1dff9f51 - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : <redacted>
0x1df4d1af - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : CFRunLoopRunSpecific
0x1df4cfd1 - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : CFRunLoopRunInMode
0x1f6f7b41 - /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices : GSEventRunModal
0x232d5a53 - /System/Library/Frameworks/UIKit.framework/UIKit : UIApplicationMain
0xf57924 - /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/libXamarin.iOS.dll.dylib : wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr
0xea7358 - /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/libXamarin.iOS.dll.dylib : UIKit_UIApplication_Main_string___intptr_intptr
0xea72dc - /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/libXamarin.iOS.dll.dylib : UIKit_UIApplication_Main_string___string_string
0x16a9c8 - /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/libPQEApplicationv3.iOS.exe.dylib : PQEApplicationv3_iOS_Application_Main_string__
0x6bc6a0 - /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/libmscorlib.dll.dylib : wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr
0x3ffc1ad - /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/libmonosgen-2.0.dylib : mono_jit_runtime_invoke
0x408f937 - /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/libmonosgen-2.0.dylib : mono_runtime_invoke_checked
The app has been terminated.
0x409447d - /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/libmonosgen-2.0.dylib : mono_runtime_exec_main_checked
The app has been terminated.
0x3fdeecb - /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/libmonosgen-2.0.dylib : mono_jit_exec
0x436dd24 - /private/var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/libxamarin-debug.dylib : xamarin_main
0xdbe95 - /var/containers/Bundle/Application/4F25BE08-0DD1-4153-BAB0-DD4EAD436163/PQEApplicationv3.iOS.app/PQEApplicationv3.iOS : (null)
0x1d73a4eb - /usr/lib/system/libdyld.dylib : <redacted>
=================================================================
Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x1d80dacc):
0x1d80dabc 1c ff 2f
e1 1e ff 2f e1 52 cf
a0 e3 80
00 00 ef .
./...
/.R.......
0x1d80dacc 04 00 00 3a 04 c0 9f e5 0c c0 9f e7 00 00 00 ea ...:.......
....
.
0x1d80dadc 4c
05 70 1a 1c ff 2f e1 1e ff
2f e1 53 cf a0
e3 L.p.../.../
.S...
0x1d80daec 80 00 00 ef 04 00 00 3a 04
c0 9f
e5 0c c0 9f e7
......
.:......
..
=================================================================
Managed Stacktrace:
=================================================================
at <unknown> <0xffffffff>
at Foundation.NSAsyncActionDispatcher:Apply <0x0002f>
at System.Object:runtime_invoke_dynamic <0x000fb>
at <unknown> <0xffffffff>
at UIKit.UIApplication:UIApplicationMain <0x0004f>
at UIKit.UIApplication:Main <0x00033>
at UIKit.UIApplication:Main <0x00057>
at PQEApplicationv3.iOS.Application:Main <0x00097>
at System.Object:runtime_invoke_dynamic <0x000fb>
=================================================================
编辑:
我应该注意的是,这个应用程序是用于个人项目的,与应用商店上的任何应用程序都无关
好的,所以现在我用来解决这个问题的答案是我换了iPhone。我当时用的是iPhone 5C。现在正在做iPhone SE(不是2020款(。
目前,这将是答案。然而,我将保留这个问题,因为我想知道为什么代码没有在iPhone 5C上执行。