Xamarin表单:自移植到WkWebView以来偶发崩溃

时间:2019-03-20 10:17:41

标签: ios xamarin.forms wkwebview crash-reports watchdog

我们将应用程序从UIWebView移植到WkWebView。

此后,该应用在后台运行时偶尔崩溃(有时几分钟后,有时数小时后,有时根本不崩溃)。

从终止原因0x8badf00d(请参阅下面的崩溃报告)和Apple的开发人员文档(Understanding and Analyzing Application Crash Reports)来看,崩溃似乎与看门狗超时有关。

当应用程序移至后台时,我们在代码中启动的唯一任务嵌入在对UIApplication.SharedApplication.BeginBackgroundTask和UIApplication.SharedApplication.EndBackgroundTask的适当调用中。该任务是一个不在主UI线程上运行的网络请求,它在一秒钟内完成。

那是说我认为崩溃与WebKit / JavaScriptCore问题有关。

其他人是否遇到过此类崩溃(异常类型EXC_BAD_ACCESS(SIGKILL)和终止原因命名空间ASSERTIOND,代码0x8badf00d)并且可以提供有关如何避免此类崩溃的任何具体提示?

在此先感谢您,并致以最诚挚的问候!

马里奥。

Incident Identifier: 2084FF7B-EDFB-41D4-849F-E03F75335214
CrashReporter Key:   0af317c4eee2f011df0e1a9fc253199241998699
Hardware Model:      iPhone10,6
Process:             App [1798]
Path:                /private/var/containers/Bundle/Application/A4FF0F47-4ED6-4A97-8F15-E6AC432FC62D/App.app/App
Identifier:          com.abc.app
Version:             7000025 (7.0.25)
Code Type:           ARM-64 (Native)
Role:                Non UI
Parent Process:      launchd [1]
Coalition:           com.abc.app [792]


Date/Time:           2019-03-20 10:15:43.9491 +0100
Launch Time:         2019-03-20 09:55:44.7537 +0100
OS Version:          iPhone OS 12.1.4 (16D57)
Baseband Version:    2.02.51
Report Version:      104

Exception Type:  EXC_BAD_ACCESS (SIGKILL)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000
VM Region Info: 0 is not in any region.  Bytes before following region: 4370874368
      REGION TYPE                      START - END             [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      __TEXT                 0000000104864000-0000000105bdc000 [ 19.5M] r-x/r-x SM=COW  ...honeMobileiOS

Termination Reason: Namespace ASSERTIOND, Code 0x8badf00d
Triggered by Thread:  0

Thread 0 name:  tid_303  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib          0x00000001841bef0c __psynch_cvwait + 8
1   libsystem_pthread.dylib         0x0000000184241410 _pthread_cond_wait$VARIANT$armv81 + 620
2   JavaScriptCore                  0x000000018b95b7d8 WTF::ThreadCondition::timedWait+ 305112 (WTF::Mutex&, WTF::WallTime) + 148
3   JavaScriptCore                  0x000000018b9429a0 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void + 203168 ()> const&, WTF::TimeWithDynamicClockType const&) + 2004
4   JavaScriptCore                  0x000000018b91c2e4 bool WTF::Condition::waitUntil<WTF::Lock>+ 45796 (WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 184
5   JavaScriptCore                  0x000000018b920010 WTF::BinarySemaphore::wait+ 61456 (WTF::TimeWithDynamicClockType) + 112
6   WebKit                          0x000000019400a2b0 IPC::Connection::waitForSyncReply+ 455344 (unsigned long long, WTF::Seconds, WTF::OptionSet<IPC::SendSyncOption>) + 276
7   WebKit                          0x0000000194009af8 IPC::Connection::sendSyncMessage+ 453368 (unsigned long long, std::__1::unique_ptr<IPC::Encoder, std::__1::default_delete<IPC::Encoder> >, WTF::Seconds, WTF::OptionSet<IPC::SendSyncOption>) + 416
8   WebKit                          0x00000001942cac3c bool IPC::Connection::sendSync<Messages::WebProcess::ProcessWillSuspendImminently>+ 3341372 (Messages::WebProcess::ProcessWillSuspendImminently&&, Messages::WebProcess::ProcessWillSuspendImminently::Reply&&, unsigned long long, WTF::Seconds, WTF::OptionSet<IPC::SendSyncOption>) + 176
9   WebKit                          0x00000001942c5a70 bool WebKit::ChildProcessProxy::sendSync<Messages::WebProcess::ProcessWillSuspendImminently>+ 3320432 (Messages::WebProcess::ProcessWillSuspendImminently&&, Messages::WebProcess::ProcessWillSuspendImminently::Reply&&, unsigned long long, WTF::Seconds, WTF::OptionSet<IPC::SendSyncOption>) + 120
10  WebKit                          0x00000001942c59e8 WebKit::WebProcessProxy::sendProcessWillSuspendImminently+ 3320296 () + 76
11  WebKit                          0x0000000193fafabc -[WKProcessAssertionBackgroundTaskManager _notifyClientsOfImminentSuspension] + 72
12  WebKit                          0x00000001940ea7fc __64-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]_block_invoke + 168
13  UIKitCore                       0x00000001b1801a8c _fireBackgroundExpirationHandlers + 300
14  FrontBoardServices              0x0000000187057504 __69-[FBSUIApplicationWorkspace clientHandleAssertionExpirationImminent:]_block_invoke + 76
15  FrontBoardServices              0x000000018706ae94 __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 64
16  libdispatch.dylib               0x0000000184062484 _dispatch_client_callout + 16
17  libdispatch.dylib               0x00000001840393e0 _dispatch_block_invoke_direct$VARIANT$armv81 + 216
18  FrontBoardServices              0x000000018709fa9c __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 40
19  FrontBoardServices              0x000000018709f728 -[FBSSerialQueue _performNext] + 416
20  FrontBoardServices              0x000000018709fd44 -[FBSSerialQueue _performNextFromRunLoopSource] + 56
21  CoreFoundation                  0x00000001845ba0e0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
22  CoreFoundation                  0x00000001845ba060 __CFRunLoopDoSource0 + 88
23  CoreFoundation                  0x00000001845b9944 __CFRunLoopDoSources0 + 176
24  CoreFoundation                  0x00000001845b4810 __CFRunLoopRun + 1040
25  CoreFoundation                  0x00000001845b40e0 CFRunLoopRunSpecific + 436
26  GraphicsServices                0x000000018682d584 GSEventRunModal + 100
27  UIKitCore                       0x00000001b1804c00 UIApplicationMain + 212
28  Xamarin.Sdk                     0x0000000106da9518 0x106224000 + 12080408
29  Xamarin.Sdk                     0x0000000106cfac8c 0x106224000 + 11365516
30  Xamarin.Sdk                     0x0000000106cfac4c 0x106224000 + 11365452
31  App                             0x00000001049cf7fc App_Application_Main_string__ + 1488892 (/<unknown>:1)
32  Xamarin.Sdk                     0x0000000106526bb8 0x106224000 + 3156920
33  Mono                            0x0000000105fd7374 mono_jit_runtime_invoke + 904
34  Mono                            0x000000010605d1a0 mono_runtime_invoke_checked + 148
35  Mono                            0x0000000106063084 mono_runtime_exec_main_checked + 120
36  Mono                            0x0000000105fb6c1c mono_jit_exec + 268
37  Xamarin                         0x0000000105d76cc8 xamarin_main + 1132
38  App                             0x00000001049c8e4c main + 1461836 (main.m:155)
39  libdyld.dylib                   0x0000000184072bb4 start + 4

0 个答案:

没有答案