Hi all. I have embedded a WKWebView in my app as a rich text editor, and while some users are inputing text in the web view, the WebContent process crashes as follow and the web view becomes blank. It seems that the WebKit crashes while the keyboard is auto-correcting. Has anyone encounter the same problem and how to fix it.
Incident Identifier: D4D6D054-6ED7-4394-B1AF-6187C7A42D71
CrashReporter Key: 9bef8993f82177bb71ecaa43ed03ca8219f31a7a
Hardware Model: iPhone13,4
Process: com.apple.WebKit.WebContent [22022]
Path: /System/Library/Frameworks/WebKit.framework/XPCServices/com.apple.WebKit.WebContent.xpc/com.apple.WebKit.WebContent
Identifier: com.apple.WebKit.WebContent
Version: 8610.3.7.0.3 (8610)
Code Type: ARM-64 (Native)
Role: Unspecified
Parent Process: launchd [1]
Coalition: com.bytedance.ee.lark [1483]
Date/Time: 2021-07-28 14:54:34.6932 +0800
Launch Time: 2021-07-27 14:00:24.6782 +0800
OS Version: iPhone OS 14.3 (18C66)
Release Type: User
Baseband Version: 1.31.03-5
Report Version: 104
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x0000000197c2e89c
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [22022]
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 WebKit 0x0000000197c2e89c WebKit::WebPage::requestAutocorrectionData(***::String const&, ***::CompletionHandler<void + 4806812 (WebKit::WebAutocorrectionData)>&&) + 1368
1 WebKit 0x0000000197c2e55c WebKit::WebPage::requestAutocorrectionData(***::String const&, ***::CompletionHandler<void + 4805980 (WebKit::WebAutocorrectionData)>&&) + 536
2 WebKit 0x0000000197d9d378 WebKit::WebPage::didReceiveWebPageMessage+ 6308728 (IPC::Connection&, IPC::Decoder&) + 11328
3 WebKit 0x00000001977e6cbc IPC::MessageReceiverMap::dispatchMessage+ 318652 (IPC::Connection&, IPC::Decoder&) + 124
4 WebKit 0x0000000197c6e6c8 WebKit::WebProcess::didReceiveMessage+ 5068488 (IPC::Connection&, IPC::Decoder&) + 40
5 WebKit 0x00000001977c9eec IPC::Connection::dispatchMessage+ 200428 (std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >) + 852
6 WebKit 0x00000001977cc968 ***::Detail::CallableWrapper<IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_7, void>::call+ 211304 () + 224
7 JavaScriptCore 0x00000001954fa504 ***::RunLoop::performWork+ 15070468 () + 484
8 JavaScriptCore 0x00000001954fb1ec ***::RunLoop::performWork+ 15073772 (void*) + 36
9 CoreFoundation 0x000000018b22576c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
10 CoreFoundation 0x000000018b225668 __CFRunLoopDoSource0 + 208
11 CoreFoundation 0x000000018b224960 __CFRunLoopDoSources0 + 268
12 CoreFoundation 0x000000018b21ea8c __CFRunLoopRun + 824
13 CoreFoundation 0x000000018b21e21c CFRunLoopRunSpecific + 600
14 Foundation 0x000000018c4cddf0 -[NSRunLoop+ 36336 (NSRunLoop) runMode:beforeDate:] + 232
15 Foundation 0x000000018c5016bc -[NSRunLoop+ 247484 (NSRunLoop) run] + 92
16 libxpc.dylib 0x00000001d6aaac2c _xpc_objc_main + 688
17 libxpc.dylib 0x00000001d6aacf48 xpc_main + 180
18 WebKit 0x000000019792f70c WebKit::XPCServiceMain+ 1664780 (int, char const**) + 444
19 libdyld.dylib 0x000000018aede6b0 start + 4