If I use Xcode 12.5.1 and an iOS 14 simulator my app runs fine but if I use Xcode 13 the app crashes at the 'load' method of a WKWebView.
if let url = URL(string: stringUrl) {
webView.load(URLRequest(url: url))
}
On the thread there is a WebKit exception that didn't happen before: "The WKWebView is suspended"
WebKit`-[WKWebView loadRequest:]:
0x7fff297719e3 <+0>: pushq %rbp
0x7fff297719e4 <+1>: movq %rsp, %rbp
0x7fff297719e7 <+4>: pushq %r15
0x7fff297719e9 <+6>: pushq %r14
0x7fff297719eb <+8>: pushq %r12
0x7fff297719ed <+10>: pushq %rbx
0x7fff297719ee <+11>: subq $0x120, %rsp ; imm = 0x120
0x7fff297719f5 <+18>: movq %rdx, %r14
0x7fff297719f8 <+21>: movq 0x5cf7b751(%rip), %r12 ; WKWebView._page
0x7fff297719ff <+28>: movq (%rdi,%r12), %rbx
0x7fff29771a03 <+32>: testq %rbx, %rbx
0x7fff29771a06 <+35>: je 0x7fff29771a41 ; <+94>
0x7fff29771a08 <+37>: cmpb $0x0, 0xc42(%rbx)
0x7fff29771a0f <+44>: je 0x7fff29771a43 ; <+96>
0x7fff29771a11 <+46>: movq %rdi, %r15
0x7fff29771a14 <+49>: movq 0x5cf79e85(%rip), %rdi ; (void *)0x00007fff862dbb30: NSException
0x7fff29771a1b <+56>: movq 0x5750b20e(%rip), %rax ; (void *)0x00007fff8a4be2c0: NSInternalInconsistencyException
0x7fff29771a22 <+63>: movq (%rax), %rdx
0x7fff29771a25 <+66>: movq 0x5cf732d4(%rip), %rsi ; "raise:format:"
0x7fff29771a2c <+73>: leaq 0x57552e8d(%rip), %rcx ; @"The WKWebView is suspended"
0x7fff29771a33 <+80>: xorl %eax, %eax
0x7fff29771a35 <+82>: callq *0x5750bddd(%rip) ; (void *)0x00007fff201803c0: objc_msgSend
0x7fff29771a3b <+88>: movq (%r15,%r12), %rbx
0x7fff29771a3f <+92>: jmp 0x7fff29771a43 ; <+96>
0x7fff29771a41 <+94>: xorl %ebx, %ebx
0x7fff29771a43 <+96>: leaq -0x138(%rbp), %r15
0x7fff29771a4a <+103>: movq %r15, %rdi
0x7fff29771a4d <+106>: movq %r14, %rsi
0x7fff29771a50 <+109>: callq 0x7fff295d6434 ; WebCore::ResourceRequest::ResourceRequest(NSURLRequest*)
0x7fff29771a55 <+114>: leaq -0x28(%rbp), %rdi
0x7fff29771a59 <+118>: movq %rbx, %rsi
0x7fff29771a5c <+121>: movq %r15, %rdx
0x7fff29771a5f <+124>: movl $0x1, %ecx
0x7fff29771a64 <+129>: xorl %r8d, %r8d
0x7fff29771a67 <+132>: callq 0x7fff298b0072 ; WebKit::WebPageProxy::loadRequest(WebCore::ResourceRequest&&, WebCore::ShouldOpenExternalURLsPolicy, API::Object*)
-> 0x7fff29771a6c <+137>: movq -0x28(%rbp), %rax
0x7fff29771a70 <+141>: movq $0x0, -0x28(%rbp)
0x7fff29771a78 <+149>: testq %rax, %rax
0x7fff29771a7b <+152>: je 0x7fff29771aad ; <+202>
0x7fff29771a7d <+154>: movq 0x8(%rax), %rdi
0x7fff29771a81 <+158>: callq 0x7fff29ccd686 ; symbol stub for: CFMakeCollectable
0x7fff29771a86 <+163>: movq %rax, %rdi
0x7fff29771a89 <+166>: callq 0x7fff29cd3b6c ; symbol stub for: objc_autorelease
0x7fff29771a8e <+171>: movq %rax, %rbx
0x7fff29771a91 <+174>: movq -0x28(%rbp), %rax
0x7fff29771a95 <+178>: movq $0x0, -0x28(%rbp)
0x7fff29771a9d <+186>: testq %rax, %rax
0x7fff29771aa0 <+189>: je 0x7fff29771aaf ; <+204>
0x7fff29771aa2 <+191>: movq 0x8(%rax), %rdi
0x7fff29771aa6 <+195>: callq 0x7fff29ccd6f8 ; symbol stub for: CFRelease
0x7fff29771aab <+200>: jmp 0x7fff29771aaf ; <+204>
0x7fff29771aad <+202>: xorl %ebx, %ebx
0x7fff29771aaf <+204>: movq -0x30(%rbp), %rdi
0x7fff29771ab3 <+208>: movq $0x0, -0x30(%rbp)
0x7fff29771abb <+216>: testq %rdi, %rdi
0x7fff29771abe <+219>: je 0x7fff29771ac5 ; <+226>
0x7fff29771ac0 <+221>: callq 0x7fff29ccd6f8 ; symbol stub for: CFRelease
0x7fff29771ac5 <+226>: leaq -0x138(%rbp), %rdi
0x7fff29771acc <+233>: callq 0x7fff29503ac4 ; WebCore::ResourceRequestBase::~ResourceRequestBase()
0x7fff29771ad1 <+238>: movq %rbx, %rax
0x7fff29771ad4 <+241>: addq $0x120, %rsp ; imm = 0x120
0x7fff29771adb <+248>: popq %rbx
0x7fff29771adc <+249>: popq %r12
0x7fff29771ade <+251>: popq %r14
0x7fff29771ae0 <+253>: popq %r15
0x7fff29771ae2 <+255>: popq %rbp
0x7fff29771ae3 <+256>: retq
0x7fff29771ae4 <+257>: movq %rax, %rbx
0x7fff29771ae7 <+260>: jmp 0x7fff29771b06 ; <+291>
0x7fff29771ae9 <+262>: movq %rax, %rbx
0x7fff29771aec <+265>: movq -0x28(%rbp), %rax
0x7fff29771af0 <+269>: movq $0x0, -0x28(%rbp)
0x7fff29771af8 <+277>: testq %rax, %rax
0x7fff29771afb <+280>: je 0x7fff29771b06 ; <+291>
0x7fff29771afd <+282>: movq 0x8(%rax), %rdi
0x7fff29771b01 <+286>: callq 0x7fff29ccd6f8 ; symbol stub for: CFRelease
0x7fff29771b06 <+291>: movq -0x30(%rbp), %rdi
0x7fff29771b0a <+295>: movq $0x0, -0x30(%rbp)
0x7fff29771b12 <+303>: testq %rdi, %rdi
0x7fff29771b15 <+306>: je 0x7fff29771b1c ; <+313>
0x7fff29771b17 <+308>: callq 0x7fff29ccd6f8 ; symbol stub for: CFRelease
0x7fff29771b1c <+313>: leaq -0x138(%rbp), %rdi
0x7fff29771b23 <+320>: callq 0x7fff29503ac4 ; WebCore::ResourceRequestBase::~ResourceRequestBase()
0x7fff29771b28 <+325>: movq %rbx, %rdi
0x7fff29771b2b <+328>: callq 0x7fff29ccdd5e ; symbol stub for: _Unwind_Resume
I there something I can do to solve this?
-
—
OOPer
Add a CommentCan you show the whole message shown in the debug console? I have not tested enough, but recent iOS are eager to detect more unexpected usages than ever. Do you think of anything unusual in the usage of your WKWebView? Showing more context, including the content of
stringUrlor other project settings related to WKWebView may help.