iOS 26 beta5 crash – CALayer position contains NaN when selecting text / showing magnifier / selecting Image's Text in WKWebView

Environment

• Device: iOS 26 Developer Beta 5 (23A5308g) • Xcode: 16.3

Short description

The app crashes the moment the user tries to long-press to select text inside a WKWebView, double-tap an image with Text (magnifier appears)

The exception is CALayer position contains NaN. frame = (nan,0;0,48) chorPoint=(inf, 0) and it is thrown in the UI process.

Build & run any project that hosts a WKWebView. Inject the following CSS via script (this is what we do to suppress the native callout menu):

WKWebView *webView = [[WKWebView alloc] initWithFrame:self.view.bounds
                                        configuration:[WKWebViewConfiguration new]];
NSString *js =
  @"document.documentElement.style.webkitUserSelect='none';"
   "document.documentElement.style.webkitTouchCallout='none';";
[webView evaluateJavaScript:js completionHandler:nil];
[self.view addSubview:webView];
Incident Identifier: EE6FB046-5087-4F15-A72D-A74965347A30
CrashReporter Key:   29e8e58e02a07557adb4ce3f463d764f3ce8bbd5
Hardware Model:      iPhone16,1
Process:             wallet [642]
Path:                /private/var/containers/Bundle/Application/4B4E609A-C8BF-4C56-AB2A-1638249B98A5/wallet.app/wallet
Identifier:          xxxx
Version:             xxxx
AppStoreTools:       16F7
AppVariant:          1:iPhone16,1:18
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           xxxxx

Date/Time:           2025-08-06 12:05:24.0732 +0800
Launch Time:         2025-08-06 11:49:40.3802 +0800
OS Version:          iPhone OS 26.0 (23A5308g)
Release Type:        Beta
Baseband Version:    3.02.02
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: SIGNAL 6 Abort trap: 6
Terminating Process: wallet [642]

Triggered by Thread:  0

Application Specific Information:
abort() called


Last Exception Backtrace:
0   CoreFoundation                	       0x185e058c8 __exceptionPreprocess + 164
1   libobjc.A.dylib               	       0x182d797c4 objc_exception_throw + 88
2   CoreFoundation                	       0x185e908d4 -[NSException initWithCoder:] + 0
3   QuartzCore                    	       0x18678a874 CA::Layer::set_position(CA::Vec2<double> const&, bool) + 160
4   QuartzCore                    	       0x1869a7270 -[CALayer setPosition:] + 52
5   UIKitCore                     	       0x18c4ac564 -[UIView _backing_setPosition:] + 176
6   UIKitCore                     	       0x18cefdf0c -[UIView setCenter:] + 220
7   UIKitCore                     	       0x18cd9f794 -[_UIEditMenuContentPresentation _displayPreparedMenu:titleView:reason:didDismissMenu:configuration:] + 936
8   UIKitCore                     	       0x18cd9f3c0 __54-[_UIEditMenuContentPresentation _displayMenu:reason:]_block_invoke + 104
9   UIKitCore                     	       0x18ced1060 -[UIEditMenuInteraction _editMenuPresentation:preparedMenuForDisplay:completion:] + 384
10  UIKitCore                     	       0x18cd9f2e4 -[_UIEditMenuContentPresentation _displayMenu:reason:] + 304
11  UIKitCore                     	       0x18cd9f0d8 -[_UIEditMenuContentPresentation displayMenu:configuration:] + 64
12  UIKitCore                     	       0x18ced0344 __58-[UIEditMenuInteraction presentEditMenuWithConfiguration:]_block_invoke + 260
13  UIKitCore                     	       0x18ced1f8c __80-[UIEditMenuInteraction _prepareMenuAtLocation:configuration:completionHandler:]_block_invoke + 80
14  UIKitCore                     	       0x18cc8403c __109-[UITextContextMenuInteraction _editMenuInteraction:menuForConfiguration:suggestedActions:completionHandler:]_block_invoke + 180
15  UIKitCore                     	       0x18cc84584 __107-[UITextContextMenuInteraction _querySelectionCommandsForConfiguration:suggestedActions:completionHandler:]_block_invoke + 148
16  WebKit                        	       0x1a05ae5d4 WTF::CompletionHandler<void (WebKit::DocumentEditingContext&&)>::operator()(WebKit::DocumentEditingContext&&) + 64
17  WebKit                        	       0x1a05bb468 WTF::Detail::CallableWrapper<WTF::CompletionHandler<void (IPC::Connection*, IPC::Decoder*)> IPC::Connection::makeAsyncReplyCompletionHandler<Messages::WebPage::RequestDocumentEditingContext, WTF::CompletionHandler<void (WebKit::DocumentEditingContext&&)>>(WTF::CompletionHandler<void (WebKit::DocumentEditingContext&&)>&&, WTF::ThreadLikeAssertion)::'lambda'(IPC::Connection*, IPC::Decoder*), void, IPC::Connection*, IPC::Decoder*>::call(IPC::Connection*, IPC::Decoder*) + 196
18  WebKit                        	       0x19fcf5db8 WTF::Detail::CallableWrapper<WebKit::AuxiliaryProcessProxy::sendMessage(WTF::UniqueRef<IPC::Encoder>&&, WTF::OptionSet<IPC::SendOption>, std::__1::optional<IPC::ConnectionAsyncReplyHandler>, WebKit::AuxiliaryProcessProxy::ShouldStartProcessThrottlerActivity)::$_1, void, IPC::Connection*, IPC::Decoder*>::call(IPC::Connection*, IPC::Decoder*) + 64
19  WebKit                        	       0x19fce54f0 IPC::Connection::dispatchMessage(WTF::UniqueRef<IPC::Decoder>) + 340
20  WebKit                        	       0x19fcf5aa0 IPC::Connection::dispatchIncomingMessages() + 536
21  JavaScriptCore                	       0x19a8f85d4 WTF::RunLoop::performWork() + 552
22  JavaScriptCore                	       0x19a8f838c WTF::RunLoop::performWork(void*) + 36
23  CoreFoundation                	       0x185da6230 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
24  CoreFoundation                	       0x185da61a4 __CFRunLoopDoSource0 + 172
25  CoreFoundation                	       0x185d83c6c __CFRunLoopDoSources0 + 232
26  CoreFoundation                	       0x185d598b0 __CFRunLoopRun + 820
27  CoreFoundation                	       0x185d58c44 _CFRunLoopRunSpecificWithOptions + 532
28  GraphicsServices              	       0x224ce0498 GSEventRunModal + 120
29  UIKitCore                     	       0x18b6c84b8 -[UIApplication _run] + 792
30  UIKitCore                     	       0x18b66cbc0 UIApplicationMain + 336
31  wallet                        	       0x1046f8558 0x1046f4000 + 17752
32  dyld                          	       0x182dcdb18 start + 6332
Answered by AdamChen in 852762022

And I check Weibo ,have same issue

Accepted Answer

And I check Weibo ,have same issue

bug report number: FB19457633

Also seeing this bug report number 19447384

Our app has also received many reports of this crash recently. Could you please tell us how to solve it?

Hi team, can you please address this, we are facing same crash for iOS 26 users.

iOS 26 beta5 crash – CALayer position contains NaN when selecting text / showing magnifier / selecting Image's Text in WKWebView
 
 
Q