-
Notifications
You must be signed in to change notification settings - Fork 167
Description
Describe the bug
*** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan 238]. Layer: <CALayer:0x129050a80; position = CGPoint (0 0); bounds = CGRect (0 0; 0 48); delegate = <_UIEditMenuListView: 0x12d9c8000; frame = (nan -48; 0 48); anchorPoint = (inf, 1); alpha = 0; layer = <CALayer: 0x129050a80>>; sublayers = (<CALayer: 0x12dbe0810>, <CALayer: 0x129053510>); opaque = YES; allowsGroupOpacity = YES; anchorPoint = CGPoint (inf 1); opacity = 0>'
*** First throw call stack:
(0x1890618c8 0x185fd57c4 0x1890ec8d4 0x1899e6874 0x189c03270 0x18f708564 0x190159f0c 0x18fffb794 0x18fffb3c0 0x19012d060 0x18fffb2e4 0x18fffb0d8 0x19012c344 0x19012df8c 0x18fee003c 0x18fee0584 0x1a380a5d4 0x1a3817468 0x1a2f51db8 0x1a2f414f0 0x1a2f51aa0 0x19db545d4 0x19db5438c 0x189002230 0x1890021a4 0x188fdfc6c 0x188fb58b0 0x188fb4c44 0x227d34498 0x18e9244b8 0x18e8c8bc0 0x10681b8c8 0x186029b18)
libc++abi: terminating due to uncaught exception of type NSException
How to reproduce?
- Open eBook and navigate to pages
- Try selecting text
- Then getting error
Added some helpful code but didn't work
func navigator(_ navigator: any SelectableNavigator, shouldShowMenuForSelection selection: Selection) -> Bool {
guard let highlight = selection.locator.text.highlight, !highlight.isEmpty else {
return false
}
guard let bounds = selection.frame else {
return false
}
guard bounds.isValidForMenuPresentation else {
return false
}
guard let epubNavigator = navigator as? UIViewController,
let view = epubNavigator.viewIfLoaded,
view.window != nil,
!view.isHidden,
view.alpha > 0.01,
!view.frame.isNaN,
!view.frame.isInfinite else {
return false
}
return true
}
Readium version
Latest
OS version
iOS 26.0.3 Beta
Testing device
iPad
Environment
Additional context
Need any information please let me know