Open sadeghgoo opened 2 years ago
Not really sure what this could be, other than maybe toView and fromView being equal and causing issues,
I'm going to try this change to test equality
if let toView = toView, let fromView = fromView, toView != fromView {
// if we're presenting a view controller, remember the position & dimension
// of the view relative to the transition container so that we can:
// - correctly place the view in the transition container when presenting
// - correctly place the view back to where it was when dismissing
if isPresenting && !inContainerController {
originalFrameInContainer = fromView.superview?.convert(
fromView.frame, to: container
)
}
I added this fix to #736 cause I'm too lazy to make a new PR for this :p
Not really sure what this could be, other than maybe toView and fromView being equal and causing issues,
I'm going to try this change to test equality
if let toView = toView, let fromView = fromView, toView != fromView { // if we're presenting a view controller, remember the position & dimension // of the view relative to the transition container so that we can: // - correctly place the view in the transition container when presenting // - correctly place the view back to where it was when dismissing if isPresenting && !inContainerController { originalFrameInContainer = fromView.superview?.convert( fromView.frame, to: container ) }
No they are not equal.
weird, other than a threading issue not sure why this would crash here.
Hi 👋
We have a recurrent crash in production around this issue (actually it's our crash number one in production, by far and at least on iOS 15 & iOS 16)...
Do you have any idea about how to fix this or any workaround to avoid it ?
Thanks for your answer and have a great day
Best regards
Jeremie
Crashed: com.apple.main-thread
0 Qobuz 0xa126d4 HeroTransition.start() + 4314769108 (HeroTransition+Start.swift:4314769108)
1 Qobuz 0xa13770 HeroTransition.animateTransition(using:) + 65 (HeroTransition+UIViewControllerTransitioningDelegate.swift:65)
2 Qobuz 0xa137b4 @objc HeroTransition.animateTransition(using:) + 4314773428 (<compiler-generated>:4314773428)
3 UIKitCore 0x489fd0 ___UIViewControllerTransitioningRunCustomTransition_block_invoke_2 + 72
4 UIKitCore 0x2c8500 +[UIKeyboardSceneDelegate _pinInputViewsForKeyboardSceneDelegate:onBehalfOfResponder:duringBlock:] + 104
5 UIKitCore 0x33b0c4 ___UIViewControllerTransitioningRunCustomTransition_block_invoke.641 + 176
6 UIKitCore 0x3c1b84 +[UIView(Animation) _setAlongsideAnimations:toRunByEndOfBlock:] + 172
7 UIKitCore 0x265278 _UIViewControllerTransitioningRunCustomTransition + 572
8 UIKitCore 0x8903cc __56-[UIPresentationController runTransitionForCurrentState]_block_invoke.401 + 2152
9 UIKitCore 0x30c234 -[_UIAfterCACommitBlock run] + 64
10 UIKitCore 0x227764 -[_UIAfterCACommitQueue flush] + 200
11 UIKitCore 0x155ea4 _runAfterCACommitDeferredBlocks + 640
12 UIKitCore 0x156570 _cleanUpAfterCAFlushAndRunDeferredBlocks + 128
13 UIKitCore 0x15673c _afterCACommitHandler + 56
14 CoreFoundation 0x3e78c <redacted> + 32
15 CoreFoundation 0xf9b4 <redacted> + 616
16 CoreFoundation 0x1e1e8 CFRunLoopRunSpecific + 656
17 GraphicsServices 0x1988 GSEventRunModal + 160
18 UIKitCore 0x4e5a88 -[UIApplication _run] + 1080
19 UIKitCore 0x27efc8 UIApplicationMain + 336
20 Qobuz 0xa56c main + 16 (AppDelegate.swift:16)
21 ??? 0x1031084d0 (Manquant)