Repository navigation
Description
I have read the guidelines for contributing and I understand
- [yes ] My issue is happening in the latest version of SideMenu (older versions are no longer maintained).
- [yes ] My issue was not solved in the README.
- [yes] My issue can not be answered on stackoverflow.com.
- [yes ] My issue is not a request for new functionality that I am unwilling to build and contribute with a pull request.
- [yes] My issue is reproducible in the demo project.
Describe the bug
When app goes to background/when we try to open an external link and then when we come back to our app, there is a crash in SideMenuTransitionController (at presentationController.dismissalTransitionWillBegin() of transitionWillBegin) in iPad.
To Reproduce
Steps to reproduce the behavior:
Create an option under Push View Controller of Left Menu that takes to an external link.
Click on the above option.
Come back to Side Menu app and click on Left Menu.
Expected behavior
Side Menu does not crash in iPhone and behaves as expected. However, crash occurs in iPad.
Video
CrashRecording.zip
Additional context
Please find two different crash logs from the actual app in which I used the Side Menu :
Crashed: com.apple.main-thread
EXC_BREAKPOINT 0x000000010172cf4c
0
SideMenu
SideMenuTransitionController.swift - Line 104
closure #1 in SideMenuNavigationController.viewWillTransition(to:with:) + 104
1
SideMenu
- Line 4323856260
thunk for @escaping @callee_guaranteed (@guaranteed UIViewControllerTransitionCoordinatorContext) -> () + 4323856260
2
UIKitCore
-[_UIViewControllerTransitionCoordinator _applyBlocks:releaseBlocks:] + 264
3
UIKitCore
-[_UIViewControllerTransitionContext __runAlongsideAnimations] + 256
4
UIKitCore
-[_UIWindowAnimationController animateTransition:] + 328
5
UIKitCore
-[UIWindow _adjustSizeClassesAndResizeWindowToFrame:] + 932
6
UIKitCore
-[UIWindow _resizeWindowFrameToSceneBoundsIfNecessary] + 248
7
UIKitCore
__78-[UIWindow _rotateWindowToOrientation:updateStatusBar:duration:skipCallbacks:]_block_invoke + 388
8
UIKitCore
__58-[_UIWindowRotationAnimationController animateTransition:]_block_invoke_2 + 172
9
UIKitCore
+[UIView(Internal) _performBlockDelayingTriggeringResponderEvents:forScene:] + 204
10
UIKitCore
__58-[_UIWindowRotationAnimationController animateTransition:]_block_invoke + 164
11
UIKitCore
-[_UIWindowRotationAnimationController animateTransition:] + 492
12
UIKitCore
-[UIWindow _rotateToBounds:withAnimator:transitionContext:] + 580
13
UIKitCore
-[UIWindow _rotateWindowToOrientation:updateStatusBar:duration:skipCallbacks:] + 1420
14
UIKitCore
-[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:] + 408
15
UIKitCore
-[UIWindow _setRotatableViewOrientation:updateStatusBar:duration:force:] + 128
16
UIKitCore
-[_UIFullscreenPresentationController _placeCounterRotationViewWithView:inWindow:fromOrientation:toOrientation:force:] + 504
17
UIKitCore
-[_UIFullscreenPresentationController _adjustOrientationIfNecessaryInWindow:forViewController:preservingViewController:] + 880
18
UIKitCore
-[UIPresentationController _presentWithAnimationController:interactionController:target:didEndSelector:] + 932
19
UIKitCore
-[UIViewController _presentViewController:modalSourceViewController:presentationController:animationController:interactionController:completion:] + 1412
20
UIKitCore
-[UIViewController _presentViewController:withAnimationController:completion:] + 4228
21
UIKitCore
__63-[UIViewController _presentViewController:animated:completion:]_block_invoke + 104
22
UIKitCore
-[UIViewController _performCoordinatedPresentOrDismiss:animated:] + 508
23
UIKitCore
-[UIViewController _presentViewController:animated:completion:] + 196
24
UIKitCore
-[UIViewController presentViewController:animated:completion:] + 164
Crashed: com.apple.main-thread
EXC_BREAKPOINT 0x0000000101944f4c
0
SideMenu
(Missing)
1
SideMenu
(Missing)
2
UIKitCore
-[_UIViewControllerTransitionCoordinator _applyBlocks:releaseBlocks:] + 264
3
UIKitCore
-[_UIViewControllerTransitionContext __runAlongsideAnimations] + 256
4
UIKitCore
-[_UIWindowAnimationController animateTransition:] + 328
5
UIKitCore
-[UIWindow _adjustSizeClassesAndResizeWindowToFrame:] + 932
6
UIKitCore
-[UIWindow _resizeWindowFrameToSceneBoundsIfNecessary] + 248
7
UIKitCore
__78-[UIWindow _rotateWindowToOrientation:updateStatusBar:duration:skipCallbacks:]_block_invoke + 388
8
UIKitCore
__58-[_UIWindowRotationAnimationController animateTransition:]_block_invoke_2 + 172
9
UIKitCore
+[UIView(Internal) _performBlockDelayingTriggeringResponderEvents:forScene:] + 204
10
UIKitCore
__58-[_UIWindowRotationAnimationController animateTransition:]_block_invoke + 164
11
UIKitCore
-[_UIWindowRotationAnimationController animateTransition:] + 492
12
UIKitCore
-[UIWindow _rotateToBounds:withAnimator:transitionContext:] + 580
13
UIKitCore
-[UIWindow _rotateWindowToOrientation:updateStatusBar:duration:skipCallbacks:] + 1420
14
UIKitCore
-[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:] + 408
15
UIKitCore
-[UIWindow _setRotatableViewOrientation:updateStatusBar:duration:force:] + 128
16
UIKitCore
-[_UIFullscreenPresentationController _placeCounterRotationViewWithView:inWindow:fromOrientation:toOrientation:force:] + 504
17
UIKitCore
-[_UIFullscreenPresentationController _adjustOrientationIfNecessaryInWindow:forViewController:preservingViewController:] + 880
18
UIKitCore
-[UIPresentationController _presentWithAnimationController:interactionController:target:didEndSelector:] + 932
19
UIKitCore
-[UIViewController _presentViewController:modalSourceViewController:presentationController:animationController:interactionController:completion:] + 1412
20
UIKitCore
-[UIViewController _presentViewController:withAnimationController:completion:] + 4228
21
UIKitCore
__63-[UIViewController _presentViewController:animated:completion:]_block_invoke + 104
22
UIKitCore
-[UIViewController _performCoordinatedPresentOrDismiss:animated:] + 508
23
UIKitCore
-[UIViewController _presentViewController:animated:completion:] + 196
24
UIKitCore
-[UIViewController presentViewController:animated:completion:] + 164
In case of any clarification, please feel free to reach out to me.
Thanks.
Here's the minimal modified version of demo(example[SideMenu-master.zip])
SideMenu-master.zip
Activity
[-]https://github.com/jonkykong/SideMenu/issues/631[/-][+]App Crashes in iPad due to transition[/+]2h4u commentedon Sep 24, 2020
I have exactly the same issue, also with the newest version of SideMenu and also only on iPad.
It also is 100% reproducible:
open the app on an iPad -> open the SideDrawer -> send the app to the background -> open the app again (now the sideDrawer is gone in contrast if I do the same with an iPhone) -> try to open the sideDrawer again -> crash
2h4u commentedon Sep 24, 2020
@kirthika I made a PR which fixes the issues i had, can you try it out and tell us if it also fixes your issues?
#650
kirthika commentedon Sep 28, 2020
Thanks @2h4u I'm working on it..
kirthika commentedon Sep 28, 2020
This solves my issue though, I wonder if this could be available in a newer version(release) so that I can update my pod files.
2h4u commentedon Sep 28, 2020
@kirthika thanks for trying it out
Of course it would be beneficial if a fix would be released but I am not a 100% sure if this really fixes the issue or if it just fixes the "symptoms". Maybe one of the contributors can take a look at it?
But in the mean time, you can still use my fix by simply putting these lines into you podfile:
Of course if you do not trust my source (which you should not since i am a random person on the internet 😅), you can simply fork the original project and apply the fix to it, so you can use it instead of my fork.
kirthika commentedon Sep 29, 2020
@2h4u Got to follow some standards indeed. Anyways thanks much for the timely solution :)
kirthika commentedon Sep 29, 2020
@jonkykong Amidst your busy schedule, by any chance could this be addressed in your upcoming release?
jonkykong commentedon Oct 17, 2020
Please update to
6.5.0.kirthika commentedon Oct 21, 2020
Updating to 6.5.0 has not solved my issue. Please verify the same in example code.
Uploading Sidemenu_6.5_fix.mov.zip…
2h4u commentedon Oct 27, 2020
Updating to 6.5.0 has fixed my crash issue but introduced a new UI glitch.
If an iPad-user closes the app while the sideDrawer is still active/visible, the next time the user tries to open the sideDrawer the viewController behind, the now visible, sideDrawer rotates by 90°, thats really ugly.
I made a short video so you can better understand what i mean:
Screenrecord.mov.zip
I fear that #642 caused this issue.