Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User-reported crash #116

Closed
Arclite opened this issue May 30, 2024 · 0 comments · Fixed by #117
Closed

User-reported crash #116

Arclite opened this issue May 30, 2024 · 0 comments · Fixed by #117
Labels
Bug Something isn't working
Milestone

Comments

@Arclite
Copy link
Member

Arclite commented May 30, 2024

Exception:

*** Terminating app due to uncaught exception 'BezierPathIntersectionException', reason: 'mismatched intersection length'
*** First throw call stack:
(0x1a654cf20 0x19e3d2018 0x1063ffc6c 0x106400524 0x106401f78 0x106402fac 0x1063dbfd4 0x1063df180 0x1a4fb41bc 0x1063dbd5c 0x1063df0e4 0x1a4e26a0c 0x1063db904 0x1063deea1 0x1063c1abd 0x1063df051 0x1b1896775)
libc++abi: terminating due to uncaught exception of type NSException

Backtrace:

Thread 11 Queue : com.apple.root.default-qos.cooperative (concurrent)
#0	0x00000001ef60742c in __pthread_kill ()
#1	0x00000002033a6c0c in pthread_kill ()
#2	0x00000001ae4aaba0 in abort ()
#3	0x00000002032c4ca4 in abort_message ()
#4	0x00000002032b4e5c in demangling_terminate_handler() ()
#5	0x000000019e3ede2c in _objc_terminate() ()
#6	0x00000002032c4068 in std::__terminate(void (*)()) ()
#7	0x00000002032c735c in __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) ()
#8	0x00000002032c72a0 in __cxa_throw ()
#9	0x000000019e3d2180 in objc_exception_throw ()
#10	0x00000001063ffc6c in +[UIBezierPath(Clipping) redAndGreenAndBlueSegmentsCreatedFrom:bySlicingWithPath:andNumberOfBlueShellSegments:] at /Users/pado/Developer/Highlighter/.build/checkouts/ClippingBezier/ClippingBezier/UIBezierPath+Clipping.m:1246
#11	0x0000000106400524 in +[UIBezierPath(Clipping) redAndBlueSegmentsForShapeBuildingCreatedFrom:bySlicingWithPath:andNumberOfBlueShellSegments:] at /Users/pado/Developer/Highlighter/.build/checkouts/ClippingBezier/ClippingBezier/UIBezierPath+Clipping.m:1309
#12	0x0000000106401f78 in -[UIBezierPath(Clipping) booleanWithPath:calculateIntersection:] at /Users/pado/Developer/Highlighter/.build/checkouts/ClippingBezier/ClippingBezier/UIBezierPath+Clipping.m:1498
#13	0x0000000106402fac in -[UIBezierPath(Clipping) intersectionWithPath:] at /Users/pado/Developer/Highlighter/.build/checkouts/ClippingBezier/ClippingBezier/UIBezierPath+Clipping.m:1551
#14	0x00000001063dbfd4 in closure #1 in closure #1 in closure #1 in PhotoEditingWorkspaceView.updateRedactableObservations() at /Users/pado/Developer/Highlighter/Modules/Legacy/Editing/Sources/Editing View/Workspace/PhotoEditingWorkspaceView.swift:136
#15	0x00000001063df180 in partial apply for closure #1 in closure #1 in closure #1 in PhotoEditingWorkspaceView.updateRedactableObservations() ()
#16	0x00000001a4fb41bc in Sequence.contains(where:) ()
#17	0x00000001063dbd5c in closure #1 in closure #1 in PhotoEditingWorkspaceView.updateRedactableObservations() at /Users/pado/Developer/Highlighter/Modules/Legacy/Editing/Sources/Editing View/Workspace/PhotoEditingWorkspaceView.swift:123
#18	0x00000001063df0e4 in partial apply for closure #1 in closure #1 in PhotoEditingWorkspaceView.updateRedactableObservations() ()
#19	0x00000001a4e26a0c in _ArrayProtocol.filter(_:) ()
#20	0x00000001063db904 in closure #1 in PhotoEditingWorkspaceView.updateRedactableObservations() at /Users/pado/Developer/Highlighter/Modules/Legacy/Editing/Sources/Editing View/Workspace/PhotoEditingWorkspaceView.swift:122
#21	0x00000001063deea0 in partial apply for closure #1 in PhotoEditingWorkspaceView.updateRedactableObservations() ()
#22	0x00000001063c1abc in thunk for @escaping @callee_guaranteed @Sendable @async () -> (@out τ_0_0) ()
#23	0x00000001063df050 in partial apply for thunk for @escaping @callee_guaranteed @Sendable @async () -> (@out τ_0_0) ()

Testing intersection between paths:

(lldb) po textPath
path = UIBezierPath()
path.move(to: CGPoint(x: 148, y: 1422))
path.addLine(to: CGPoint(x: 148, y: 1456))
path.addLine(to: CGPoint(x: 153, y: 1456))
path.addLine(to: CGPoint(x: 153, y: 1422))
path.close()

(lldb) po wordPath
path = UIBezierPath()
path.move(to: CGPoint(x: 93.3019079008692, y: 1422.00000072504))
path.addLine(to: CGPoint(x: 93.3019079008692, y: 1467.087208519229))
path.addLine(to: CGPoint(x: 1164.245267275869, y: 1467.087208519229))
path.addLine(to: CGPoint(x: 1164.245267275869, y: 1422.00000072504))
path.close()

Seems related to adamwulf/ClippingBezier#24.

@Arclite Arclite added the Bug Something isn't working label May 30, 2024
@Arclite Arclite added this to the 24.1 milestone May 30, 2024
@Arclite Arclite linked a pull request May 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant