当前位置: 首页 > 知识库问答 >
问题:

xamarin_中的SIGABRTCrash

东郭凯捷
2023-03-14

我正在用Xamarin iOS和Android开发一个应用程序。在少数情况下,iOS版本(非android)通过bug报告系统报告此问题:

xamarin_中的线程0SIGABRATCRASH初始化

0libsystem_kernel.dylibpthread_kill(libsystem_kernel.dylib)8 1libsystem_c.dylib中止(libsystem_c.dylib)140 2 TouristAppxamarin_initialize(在1a944b2b614036bbba6b93191b43cf7a)(运行时。m: 938)3 TouristAppmono_invoke_unhandled_exception_hook(在1a944b2b614036bbba6b93191b43cf7a)(迷你例外。c: 2786)4 TouristAppmono_handle_exception_internal(在1a944b2b614036bbba6b93191b43cf7a)(迷你例外。c: 1727)5 TouristAppmono_handle_exception(在1a944b2b614036bbba6b93191b43cf7a)40 6 TouristApphandle_signal_exception(在1a944b2b614036bbba6b93191b43cf7a)(例外-arm64. c: 525)7 TouristAppTouristApp_TouristApp_DettaglioPunti_UpdateDescriptionAudio_bool(在1a944b2b614036bbba6b93191b43cf7a)76 8 TouristAppTouristApp_TouristApp_DettaglioPunti__UpdateDescriptionAudioc__AnonStorey3__UpdateDescriptionAudioc__AnonStorey4__m__0(在1a944b2b614036bbba6b93191b43cf7a)452 9 TouristApp应用(在1a944b2b614036bbba6b93191b43cf7a)(NSAction.cs:57)10 TouristAppwrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr(在1a944b2b614036bbba6b93191b43cf7a)244 11 TouristAppmono_jit_runtime_invoke(在1a944b2b614036bbba6b93191b43cf7a)(迷你运行时间。c: 2564)12 TouristAppmono_runtime_invoke(在1a944b2b614036bbba6b93191b43cf7a)(对象。c: 2897)13 TouristAppnative_to_managed_trampoline_1()(在1a944b2b614036bbba6b93191b43cf7a)208 14 TouristApp-[__MonoMac_NSActionDispatcherxamarinApplySelector](in 1a944b2b614036bbba6b93191b43cf7a)60 15基金会__NSThreadPerformPerform(in Foundation)340 16 CoreFoundation__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION(in CoreFoundation)24 17 CoreFoundation CFRunLoopDoSources0(in CoreFoundation)540 18 CoreFoundation__CFRunLoopRun(in CoreFoundation)724 19 CoreFoundation CFRunLoopRun特定(in CoreFoundation)384 20图形服务GSEventRunModal(in GraphicsServices)180 21 UIKit UIApplication ationMain(在UIKit)204 22 TouristApp(wrapper_managed本地)_UIKit。UIApplication: UIApplication Main(in 1a944b2b614036bbba6b93191b43cf7a)324 23 TouristApp Main(in 1a944b2b614036bbba6b93191b43cf7a)(UIApplication.cs:63)24 TouristAppTouristApp_TouristApp_Application_Main_string(in 1a944b2b614036bbba6b93191b43cf7a)56 25 TouristAppwrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr(in 1a944b2b614036bbba6b93191b43cf7a)244 26 TouristAppmono_jit_runtime_invoke(in 1a944b2b614036bbba6b93191b43cf7a)(mini runtime. c: 2564)27 TouristAppmono_runtime_invoke(in 1a944b2b614036bbba6b93191b43cf7a)(对象. c: 2897)28 TouristAppmono_runtime_exec_main(在1a944b2b614036bbba6b93191b43cf7a)(对象. c: 4221)29 TouristAppxamarin_main(在1a944b2b614036bbba6b93191b43cf7a)(monotouch-main. m: 454)30 TouristApp main(在1a944b2b614036bbba6b93191b43cf7a)96 31libdyld.dylib启动(在libdyld.dylib)4

线程1

0libsystem_kernel.dylibkevent_qos(libsystem_kernel.dylib)8 1libdispatch.dylib_dispatch_source_invoke(libdispatch.dylib)0

线程2

0libsystem_kernel.dylib__psynch_cvwait(libsystem_kernel.dylib)8 1 TouristAppthread_func(1a944b2b614036bbba6b93191b43cf7a)(mono-os-mutex. h: 106)2libsystem_pthread.dylib_pthread_body(libsystem_pthread.dylib)156 3libsystem_pthread.dylib_pthread_body(libsystem_pthread.dylib)0 4libsystem_pthread.dylibthread_start(libsystem_pthread.dylib)4

线程3

0 libu系统内核。动态库信号量_wait_trap(在libsystem_kernel.dylib中)8 1 TouristApp start_包装器(在1A944B614036BBA6B93191B43CF7A中)(threads.c:717)2 TouristApp内部_start_线程(在1A944B614036BBA6B93191B43CF7A中)(单线程posix.c:92)3 libsystem_pthread。dylibpthread_body(在libsystempthread.dylib中)156 4 libsystempthread。dylib_pthread_主体(在libsystem_pthread.dylib中)0 5 libsystem_pthread。动态库线程\u启动(在libsystem\u pthread.dylib中)4

线程4

0libsystem_kernel.dylib__psynch_cvwait(libsystem_kernel.dylib)8 1 TouristApp_wapi_handle_timedwait_signal_handle(在1a944b2b614036bbba6b93191b43cf7a)(mono-os-mutex. h: 134)2 TouristAppwapi_WaitForSingleObjectEx(在1a944b2b614036bbba6b93191b43cf7a)(wait. c: 187)3 TouristAppmono_wait_uninterrupted(在1a944b2b614036bbba6b93191b43cf7a)(线程. c: 1518)4 TouristAppves_icall_System_Threading_WaitHandle_WaitOne_internal(在1a944b2b614036bbba6b93191b43cf7a)(线程. c: 1652)5 TouristAppwrapper_managed_to_native_System_Threading_WaitHandle_WaitOne_internal_System_Threading_WaitHandle_intptr_int_bool(在1a944b2b614036bbba6b93191b43cf7a)128 6 TouristApp WaitOne(在1a944b2b614036bbba6b93191b43cf7a)(WaitHandle.cs:375)7 TouristApp WaitOne(在1a944b2b614036bbba6b93191b43cf7a)(WaitHandle.cs:388)8 TouristApp SchedulerThread(在1a944b2b614036bbba6b93191b43cf7a)(Timer.cs:395)9TouristAppThreadStart_Context(在1a944b2b614036bbba6b93191b43cf7a)(thread.cs:72)10 TouristApp运行内部(在1a944b2b614036bbba6b93191b43cf7a)(executioncontext.cs:957)11 TouristApp运行(在1a944b2b614036bbba6b93191b43cf7a)(executioncontext.cs:893)12 TouristApp线程启动(在1a944b2b614036bbba6b93191b43cf7a)(thread.cs:109)13 TouristAppwrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr(在1a944b2b614036bbba6b93191b43cf7a)244 14 TouristAppmono_jit_runtime_invoke(在1a944b2b614036bbba6b93191b43cf7a)(迷你运行时间。c: 2564)15 TouristAppmono_runtime_invoke(在1a944b2b614036bbba6b93191b43cf7a)(对象。c: 2897)16 TouristAppstart_wrapper(在1a944b2b614036bbba6b93191b43cf7a)(线程。c: 740)17 TouristAppinner_start_thread(在1a944b2b614036bbba6b93191b43cf7a)(单线程位置。c: 92)18libsystem_pthread.dylib_pthread_body(libsystem_pthread.dylib)156 19libsystem_pthread.dylib_pthread_body(libsystem_pthread.dylib)0 20libsystem_pthread.dylibthread_start(libsystem_pthread.dylib)4

线程5

0 libu系统内核。dylib\uuuworkq\ukernelreturn(在libsystem\ukernel.dylib中)8 1 libsystem\u pthread。dylib start_wqthread(在libsystem_pthread.dylib中)4

线程6

0 libu系统内核。dylib mach_msg_trap(在libsystem_kernel.dylib中)8 1 CoreFoundation CFRunLoopServiceMachPort(在CoreFoundation中)196 2 CoreFoundation(在CoreFoundation中)1032 3 CoreFoundation CFRunLoopRunSpecific(在CoreFoundation中)384 CFNetwork[NSURLConnection(Loader)(在CFNetwork中)412 5基金会NStHealRexOx启动(基金会)1000 6 LIB StultpThread。dylibpthread_body(在libsystempthread.dylib中)156 7 libsystempthread。dylibpthread_主体(在libsystempthread.dylib中)0 8 libsystempthread。动态库线程\u启动(在libsystem\u pthread.dylib中)4

线程7

0 libu系统内核。dylib选择$DARWIN_EXTSN(在libsystem_kernel.dylib中)8 1 libsystem_pthread。dylib_pthread_body(在libsystem_pthread.dylib中)156 2 libsystem_pthread。dylibpthread_body(在libsystempthread.dylib中)0 3 libsystempthread。动态库线程\u启动(在libsystem\u pthread.dylib中)4

线程8

0 libu系统内核。dylib_uuupsynch_cvwait(在libsystem_kernel.dylib中)8 1个TouristApp工作线程(在1A944B614036BBBA6B93191B43CF7A中)(mono os mutex.h:134)2个TouristApp启动_包装器(在1A944B614036BBA6B93191B43CF7A中)(threads.c:717)3个TouristApp内部_启动_线程(在1A944B614036BBB63B91B91B43CF7A中)(单线程posix.c:92)4 libsystem_pthread。dylibpthread_body(在libsystempthread.dylib中)156 5 libsystempthread。dylib_pthread_主体(在libsystem_pthread.dylib中)0 6 libsystem_pthread。动态库线程\u启动(在libsystem\u pthread.dylib中)4

线程9

0 libu系统内核。dylib_uuupsynch_cvwait(在libsystem_kernel.dylib中)8 1个TouristApp工作线程(在1A944B614036BBBA6B93191B43CF7A中)(mono os mutex.h:134)2个TouristApp启动_包装器(在1A944B614036BBA6B93191B43CF7A中)(threads.c:717)3个TouristApp内部_启动_线程(在1A944B614036BBB63B91B91B43CF7A中)(单线程posix.c:92)4 libsystem_pthread。dylibpthread_body(在libsystempthread.dylib中)156 5 libsystempthread。dylib_pthread_主体(在libsystem_pthread.dylib中)0 6 libsystem_pthread。动态库线程\u启动(在libsystem\u pthread.dylib中)4

线程10

0 libu系统内核。dylib\uuuworkq\ukernelreturn(在libsystem\ukernel.dylib中)8 1 libsystem\u pthread。dylib start_wqthread(在libsystem_pthread.dylib中)4

线程11

0 libu系统内核。dylib\uuuworkq\ukernelreturn(在libsystem\ukernel.dylib中)8 1 libsystem\u pthread。dylib start_wqthread(在libsystem_pthread.dylib中)4

Thread12

0 libu系统内核。dylib mach_msg_trap(在libsystem_kernel.dylib中)8 1 CoreFoundation(在CoreFoundation中)196 2 CoreFoundation(在CoreFoundation中)1032 3 CoreFoundation(在CoreFoundation中)CFRunLoopRunSpecific(在CoreFoundation中)384 4 4 4 4 4 GeoServices(在GeoServices中)428 5 libsystem(pthread。dylib pthread_body(在libsystem pthread.dylib中)156 6 libsystem pthread。dylibpthread_主体(在libsystempthread.dylib中)0 7 libsystempthread。动态库线程\u启动(在libsystem\u pthread.dylib中)4

Thread13

0 libu系统内核。dylib_uuupsynch_cvwait(在libsystem_kernel.dylib中)8 1个TouristApp工作线程(在1A944B614036BBBA6B93191B43CF7A中)(mono os mutex.h:134)2个TouristApp启动_包装器(在1A944B614036BBA6B93191B43CF7A中)(threads.c:717)3个TouristApp内部_启动_线程(在1A944B614036BBB63B91B91B43CF7A中)(单线程posix.c:92)4 libsystem_pthread。dylibpthread_body(在libsystempthread.dylib中)156 5 libsystempthread。dylib_pthread_主体(在libsystem_pthread.dylib中)0 6 libsystem_pthread。动态库线程\u启动(在libsystem\u pthread.dylib中)4

Thread14

0 libu系统内核。dylib\uuuworkq\ukernelreturn(在libsystem\ukernel.dylib中)8 1 libsystem\u pthread。dylib start_wqthread(在libsystem_pthread.dylib中)4

Thread15

0 libu系统内核。dylib\uuuworkq\ukernelreturn(在libsystem\ukernel.dylib中)8 1 libsystem\u pthread。dylib start_wqthread(在libsystem_pthread.dylib中)4

线程16

0libsystem_kernel.dylib__psynch_cvwait(libsystem_kernel.dylib)8 1 TouristAppmono_thread_info_sleep(在1a944b2b614036bbba6b93191b43cf7a)(mono-os-Mutex. h: 135)2 TouristAppmonitor_thread(在1a944b2b614036bbba6b93191b43cf7a)(threadpool-ms. c: 887)3 TouristAppstart_wrapper(在1a944b2b614036bbba6b93191b43cf7a)(thread. c: 717)4 TouristAppinner_start_thread(在1a944b2b614036bbba6b93191b43cf7a)(mono-threads-posx. c: 92)5libsystem_pthread.dylib_pthread_body(libsystem_pthread.dylib)156 6libsystem_pthread.dylib_pthread_body(libsystem_pthread.dylib)0 7libsystem_pthread.dylibthread_start-7/>)4

Thread17

0 libu系统内核。dylib_uuupsynch_cvwait(在libsystem_kernel.dylib中)8 1个TouristApp工作线程(在1A944B614036BBBA6B93191B43CF7A中)(mono os mutex.h:134)2个TouristApp启动_包装器(在1A944B614036BBA6B93191B43CF7A中)(threads.c:717)3个TouristApp内部_启动_线程(在1A944B614036BBB63B91B91B43CF7A中)(单线程posix.c:92)4 libsystem_pthread。dylibpthread_body(在libsystempthread.dylib中)156 5 libsystempthread。dylib_pthread_主体(在libsystem_pthread.dylib中)0 6 libsystem_pthread。动态库线程\u启动(在libsystem\u pthread.dylib中)4

线程18

0 libu系统内核。dylib_uuupsynch_cvwait(在libsystem_kernel.dylib中)8 1个TouristApp工作线程(在1A944B614036BBBA6B93191B43CF7A中)(mono os mutex.h:134)2个TouristApp启动_包装器(在1A944B614036BBA6B93191B43CF7A中)(threads.c:717)3个TouristApp内部_启动_线程(在1A944B614036BBB63B91B91B43CF7A中)(单线程posix.c:92)4 libsystem_pthread。dylibpthread_body(在libsystempthread.dylib中)156 5 libsystempthread。dylib_pthread_主体(在libsystem_pthread.dylib中)0 6 libsystem_pthread。动态库线程\u启动(在libsystem\u pthread.dylib中)4

Thread19

0 libu系统内核。dylib mach_msg_trap(在libsystem_kernel.dylib中)8 1 CoreFoundation(在CoreFoundation中)196 2 CoreFoundation(在CoreFoundation中)1032 3 CoreFoundation CFRunLoopRunSpecific(在CoreFoundation中)384 4 WebCore RunWebThread()(在WebCore中)456 5 libsystem_pthread。dylib pthread_body(在libsystem pthread.dylib中)156 6 libsystem pthread。dylibpthread_主体(在libsystempthread.dylib中)0 7 libsystempthread。动态库线程\u启动(在libsystem\u pthread.dylib中)4

Thread20

0 libu系统内核。dylib uu psynch_cvwait(在libsystem_kernel.dylib中)8 1 libc.1。dylib std::_1::condition_variable::wait()(在libc.dylib中)56 2 JavaScriptCore JSC::GCThread::waitForNextPhase()(在JavaScriptCore中)144 3 JavaScriptCore JSC::GCThread::gcThreadMain()(在JavaScriptCore中)84 4 JavaScriptCore WTF::threadEntryPoint()(在JavaScriptCore中)212 5 JavaScriptCore WTF::WTF::WTFTThreadEntryPoint()(在JavaScriptCore中)24 6 libsystem_pthread。dylibpthread_body(在libsystempthread.dylib中)156 7 libsystempthread。dylibpthread_主体(在libsystempthread.dylib中)0 8 libsystempthread。动态库线程\u启动(在libsystem\u pthread.dylib中)4

Thread21

0libsystem_kernel.dylibmach_msg_trap(libsystem_kernel.dylib)8 1 CoreFoundation__CFRunLoopServiceMachPort(在CoreFoundation中)196 2 CoreFoundation__CFRunLoopRun(在CoreFoundation中)1032 3 CoreFoundation CFRunLoopRun特定(在CoreFoundation中)384 4 libAVFAudio.dylibGenericRunLoopThread::Entry()(在libAVFAudio.dylib)164 5 libAVFAudio.dylibCAPThread::Entry()(在libAVFAudio.dylib)84 6libsystem_pthread.dylib_pthread_body(在libsystem_pthread.dylib)156 7libsystem_pthread.dylib_pthread_body(libsystem_pthread.dylib)0 8libsystem_pthread.dylibthread_start(libsystem_pthread.dylib)4

Thread22

0 libu系统内核。动态库信号量\u等待\u陷阱(在libsystem\u kernel.dylib中)8 1 MediaToolbox fpa\u AsyncMovieControlThread(在MediaToolbox中)1948 2 CoreMedia figThreadMain(在CoreMedia中)272 3 libsystem\u pthread。dylibpthread_body(在libsystempthread.dylib中)156 4 libsystempthread。dylib_pthread_主体(在libsystem_pthread.dylib中)0 5 libsystem_pthread。动态库线程\u启动(在libsystem\u pthread.dylib中)4

Thread23

0 libu系统内核。dylib\uuuworkq\ukernelreturn(在libsystem\ukernel.dylib中)8 1 libsystem\u pthread。dylib start_wqthread(在libsystem_pthread.dylib中)4

Thread24

0 libu系统内核。DyLib pSythChixCVaWin(在LbStimeSux.Ky.DyLIB)8 1基金会[NStaseWestRe](基金会)240 2基金会[NSObjult](NSTReCopyFrimeAddiation)PrimeStudio: OnthOnt:WaistunLtdo:Meals::(在基金会)792 3基金会[NStObjs](NSTReCopyFrimeAddiation)PrPrimeStudioOnSoundTyth:在144)4 ToististApp(WrPrPyPrimer-Meto to Nut.ObjurunTime.Mease:O1C4B2B614036BBA6B93191B43CF7A)140 140 5 ToististAppoundound.NSObj:VooKeon主线程(在1A94B2B614036BBA6B93191B43CF7A)中(NSObjut2.2.C4:CF7A)6((在1A944B614036BBA6B93191B43CF7A中)2367 TouristApp m_u0(在1A944B614036BBA6B93191B43CF7A中)(NSObject.g.cs:52)8 TouristApp ThreadStart_上下文(在1A944B614036BBB93191B43CF7A中)(thread.cs:72)9 TouristApp运行内部(在1A944B614036BBB614036BBA6B93191B43CF7A中)(executioncontext.cs:957)10 TouristApp运行(executioncontext.cs:893)11 TouristApp ThreadStart(在1A944B614036BBA6B93191B43CF7A中)(thread.cs:87)12 TouristApp包装器运行时调用对象运行时调用动态intptr intptr intptr intptr intptr(在1A944B614036BBA6B93191B43CF7A中)244 13 TouristApp mono jit运行时调用(在1A944B616BB616BBA6191B43CF7A中)(迷你运行时c:2564)14 TouristApp mono_runtime_invoke(在1A944B2B614036BBA6B93191B43CF7A中)(object.c:2897)15 TouristApp start_包装器(在1A944B2B614036BBB69191B43CF7A中)(threads.c:740)16 TouristApp内部_start_线程(在1A944B2B614036BBA6B93191B43CF7A中)(单线程posix.c:92)17 libSystempthread.dylibpthreadptu线程体(在libSystempthread.dylib中)156 18 libsystem_pthread.dylib_pthread_body(在libsystem_pthread.dylib中)0 19 libsystem_pthread.dylib thread_start(在libsystem_pthread.dylib中)4

我不明白这是Mono/Xamarin的问题还是我的代码。

任何想法?

在注释中按请求更新这是Main的代码

public class Application
    {
        // This is the main entry point of the application.
        static void Main (string[] args)
        {
            Xamarin.Insights.Initialize ("xxxxxxxxx"); //id of the app on insight
            UIApplication.Main (args, null, "AppDelegate");
        }
    }

这是我的AppDelegate

    [Register ("AppDelegate")]
    public class AppDelegate : UIApplicationDelegate
    {
        // class-level declarations

        public override UIWindow Window {
            get;
            set;
        }

        public static UIStoryboard Storyboard = UIStoryboard.FromName ("TouristAppStoryBoard", null);
        public static UIViewController initialViewController;

        public override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions)
        {

            Window = new UIWindow (UIScreen.MainScreen.Bounds);

            initialViewController = Storyboard.InstantiateInitialViewController ();
            Window.RootViewController = initialViewController;

            var navController = Window.RootViewController as UINavigationController;
            navController.NavigationBar.TitleTextAttributes = ViewUtility.GetAttributesForTitleNavigationBar ();

            Window.MakeKeyAndVisible ();
            return true;
        }

        public override void OnResignActivation (UIApplication application)
        {
        }

        public override void DidEnterBackground (UIApplication application)
        {

            LocationManager.GetIstance ().StopLocationUpdates ();
            var taskID = UIApplication.SharedApplication.BeginBackgroundTask( () => {});
            Task.Factory.StartNew ( () => {
                ComuniDb.GetIstance().Manutenzione();
                UIApplication.SharedApplication.EndBackgroundTask(taskID);
            });
        }

        public override void WillEnterForeground (UIApplication application)
        {    
            LocationManager.GetIstance ().StartLocationUpdates ();
        }
    }
}

我的应用程序不小,我希望你找到你想要的。

共有1个答案

翟淇
2023-03-14

我发现了问题。问题记录在设备日志中,但不记录在崩溃日志中。这对我来说很愚蠢(设备日志比崩溃日志有更多的信息?),但是我发现了错误并修复了它。

 类似资料:
  • 我使用子JPanel构造JScrollPane,然后尝试将JScrollPane添加到父JPanel中,希望有一个可滚动的自定义JPanel。 我有一个大的细白线前面的所有我的组件,他们是没有滚动。有什么想法吗?

  • 我已经为android Studio创建了一个webview应用程序。但没有加载web URL。错误为NET::ERR_ACCESS_DENIED。有谁能帮忙吗

  • 我有一个使用Java Version8的Spring和Maven的项目。当我运行maven update时,它适用于Java9或更高版本,当我编译它时,它适用于Java8。我注意到了这一点,因为用Maven更新会将一个特定的类更改为Java9,而我无法导入这个类。 这个类是:javax.annotation.generated(Java8)。 这是要导入的类。但是,当我进行maven更新时,文件的

  • 当应用程序启动EncryptionBootstrapConfiguration无法自动装配我的自定义TextEncryptor-https://github.com/spring-cloud/spring-cloud-commons/blob/cde7c7f3118382490c28776f66e0a56f248141fd/spring-cloud-context/src/main/java/or

  • 我有一个问题,找出我的源代码中的错误。 有什么办法可以解决它吗? 我的代码中抛出了“ArrayIndexOutOfBoundsException”,但我无法找到它的位置。 android studio中的logcat:

  • RISC-V 与中断相关的寄存器和指令 [info] 回顾:RISC-V 中的机器态(Machine Mode,机器模式,M 模式) 是 RISC-V 中的最高权限模式,一些底层操作的指令只能由机器态进行使用。 是所有标准 RISC-V 处理器都必须实现的模式。 默认所有中断实际上是交给机器态处理的,但是为了实现更多功能,机器态会将某些中断交由内核态处理。这些异常也正是我们编写操作系统所需要实现的