52inc / Pulley

A library to imitate the iOS 10 Maps UI.
https://cocoapods.org/pods/Pulley
MIT License
2.02k stars 265 forks source link

Pulley hangs on iOS 14 Beta 4 #390

Open florianbuerger opened 4 years ago

florianbuerger commented 4 years ago

After upgrading to iOS 14 Beta 4, even the example projects won't launch anymore and the CPU is at 100%. I didn't have time to investigate further so I don't know if this is a bug from iOS 14 or Pulley. It worked fine until iOS 14 Beta 3.

Anyway, a short term fix I found is to slightly delay the layout code for Pulley with a good old DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) — which, in my initial testing — seems to resolve the issue. See for an example https://github.com/florianbuerger/Pulley/commit/ea6c287f4153e510ede4baffd0e3c96bb6a000e0

Just wanted to leave that here in case anyone else is running into it.

150vb commented 3 years ago

Hello, Pulley still hangs on iOS 14 when I set the view alpha, and I am using release 2.8.3.

func drawerPositionDidChange(drawer: PulleyViewController, bottomSafeArea: CGFloat)
    {
        if drawer.drawerPosition != .collapsed
        {
            view.backgroundColor = .white
            drawer.drawerBackgroundVisualEffectView?.alpha = 0.1
            drawer.drawerContentContainerView?.alpha = 1.0
            drawer.shadowOpacity = 0.1
        } else {
            view.backgroundColor = .clear
             drawer.drawerBackgroundVisualEffectView?.alpha = 0.0
             drawer.drawerContentContainerView?.alpha = 0.0
             drawer.shadowOpacity = 0.0
        }
    }
ulmentflam commented 3 years ago

@pmacro The xcode12 branch that everyone is reporting as working is equal to the 2.8.3 release as of now. As new issues come in related to Xcode 12 it will be the bugfix branch for continued development

ulmentflam commented 3 years ago

@150vb I will look into that as soon I get a chance. In the meantime can you please look in to running your app with -UIViewLayoutFeedbackLoopDebuggingThreshold 100 as referenced here and posting any useful information you can on the auto-layout feedback loop that your app is running into?

150vb commented 3 years ago

@ulmentflam Thanks for the replies, I posted the logs here, I thought these would be useful. I was able to reappearance it via PullyDemo.

2020-09-23 13:12:07.161330+0800 PulleyDemo[18818:574117] [LayoutLoop] Degenerate layout! Layout feedback loop detected in subtree of <UIView: 0x7f95d20056e0; frame = (0 0; 375 812); wants auto layout; hosts layout engine; tAMIC = YES; >. 

Top-level view = <UIView: 0x7f95d20056e0; frame = (0 0; 375 812); wants auto layout; hosts layout engine; tAMIC = YES; >

Views caught in loop: 
3 <UIView: 0x7f95d20056e0; frame = (0 0; 375 812); wants auto layout; hosts layout engine; tAMIC = YES; >
|   <UIView: 0x7f95d06075a0; frame = (0 0; 375 812); wants auto layout; tAMIC = NO; >
|   |   <UIView: 0x7f95d220c2d0; frame = (0 0; 375 812); wants auto layout; tAMIC = NO; >
|   |   |   <MKMapView: 0x7f95d4817600; frame = (0 0; 375 812); wants auto layout; tAMIC = NO; >
|   |   |   |   <_MKMapContentView: 0x7f95d0606ab0; frame = (0 0; 375 812); >
|   |   |   |   |   <MKBasicMapView: 0x7f95d06178b0; frame = (0 0; 375 812); >
|   |   |   |   |   |   <_MKMapLayerHostingView: 0x7f95d0617c40; frame = (0 0; 375 812); >
|   |   |   |   |   <MKScrollContainerView: 0x7f95d061b640; frame = (-5277.33 -1968.67; 6192.75 6192.75); >
|   |   |   |   |   <MKAnnotationContainerView: 0x7f95d0617db0; frame = (0 0; 375 812); >
|   |   |   |   <MKAppleLogoImageView: 0x7f95d2125ad0; baseClass = UIImageView; frame = (10 752; 90 19); >
|   |   |   |   <MKAttributionLabel: 0x7f95d070b8c0; frame = (336.426 757.26; 28.5742 10.7402); >
|   |   |   <UIVisualEffectView: 0x7f95d220dc30; frame = (0 0; 375 44); wants auto layout; tAMIC = NO; >
|   |   |   |   <_UIVisualEffectBackdropView: 0x7f95d220e1a0; frame = (0 0; 375 44); >
|   |   |   |   <_UIVisualEffectSubview: 0x7f95d220f0b0; frame = (0 0; 375 44); >
|   |   |   |   <_UIVisualEffectContentView: 0x7f95d220de00; frame = (0 0; 375 44); >
|   |   |   <UIView: 0x7f95d060df90; frame = (323 52; 44 74); wants auto layout; tAMIC = NO; >
|   |   |   |   <UIButton: 0x7f95d0610550; frame = (11 10; 22 22); wants auto layout; tAMIC = NO; >
|   |   |   |   |   <UIImageView: 0x7f95d0610a30; frame = (-39 -39; 100 100); >
|   |   |   |   |   <UIImageView: 0x7f95d210c7b0; frame = (0 0; 22 22); >
|   |   |   |   <UIButton: 0x7f95d270a900; frame = (11 42; 22 22); wants auto layout; tAMIC = NO; >
|   |   |   |   |   <UIImageView: 0x7f95d212f490; frame = (0 0; 22 22); >
|   |   |   <UILabel: 0x7f95d220cc40; frame = (325 677; 42 25); text = '78°'; wants auto layout; tAMIC = NO; >
|   <UIView: 0x7f95d0608cd0; frame = (0 -76; 375 2187); >
|   1 <Pulley.PulleyPassthroughScrollView: 0x7f95d0813200; baseClass = UIScrollView; frame = (0 64; 375 748); wants auto layout; tAMIC = YES; >
|   |   <UIView: 0x7f95d0607c80; frame = (0 646; 375 768); >
|   |   <UIVisualEffectView: 0x7f95d0608e40; frame = (0 646; 375 768); >
|   |   |   <_UIVisualEffectBackdropView: 0x7f95d0609210; frame = (0 0; 375 768); >
|   |   <UIView: 0x7f95d0607b10; frame = (0 646; 375 768); wants auto layout; tAMIC = YES; >
|   |   |   2 <UIView: 0x7f95d07144c0; frame = (0 0; 375 768); wants auto layout; tAMIC = NO; >
|   |   |   |   <UIView: 0x7f95d0714d40; frame = (0 0; 375 778); wants auto layout; tAMIC = NO; >
|   |   |   |   |   <UIView: 0x7f95d0713870; frame = (0 0; 375 102); wants auto layout; tAMIC = NO; >
|   |   |   |   |   |   <UISearchBar: 0x7f95d22132f0; frame = (0 6; 375 56); text = ''; wants auto layout; tAMIC = NO; >
|   |   |   |   |   |   |   <UIView: 0x7f95d2213fb0; frame = (0 0; 375 56); >
|   |   |   |   |   |   |   |   <_UISearchBarScopeContainerView: 0x7f95d0713700; frame = (0 56; 375 0); >
|   |   |   |   |   |   |   |   |   <_UISearchBarScopeBarBackground: 0x7f95d0713c70; frame = (0 0; 375 0); >
|   |   |   |   |   |   |   |   |   <UISegmentedControl: 0x7f95d07132d0; frame = (188 7; 0 32); >
|   |   |   |   |   |   |   |   <UISearchBarBackground: 0x7f95d2214120; frame = (0 0; 375 56); >
|   |   |   |   |   |   |   |   |   <_UIBackdropView: 0x7f95d07148c0; frame = (0 0; 375 56); >
|   |   |   |   |   |   |   |   |   |   <_UIBackdropEffectView: 0x7f95d07152b0; frame = (0 0; 375 56); >
|   |   |   |   |   |   |   |   |   |   <UIView: 0x7f95d061b3b0; frame = (0 0; 375 56); >
|   |   |   |   |   |   |   |   <_UISearchBarSearchContainerView: 0x7f95d2214740; frame = (0 0; 375 56); >
|   |   |   |   |   |   |   |   |   <UISearchBarTextField: 0x7f95d303a600; frame = (8 10; 359 36); text = ''; >
|   |   |   |   |   |   |   |   |   |   <_UISearchBarSearchFieldBackgroundView: 0x7f95d070d5d0; frame = (0 0; 359 36); >
|   |   |   |   |   |   |   |   |   |   |   <_UISearchBarSearchFieldBackgroundView: 0x7f95d070d980; frame = (0 0; 359 36); >
|   |   |   |   |   |   |   |   |   |   <UIImageView: 0x7f95d210ceb0; frame = (6 8.66667; 19.6667 18); >
|   |   |   |   |   |   |   |   |   |   <UISearchBarTextFieldLabel: 0x7f95d0714040; frame = (29.6667 8; 199.667 20.3333); text = 'Where do you want to go?'; >
|   |   |   |   |   |   |   |   |   |   <_UISearchTextFieldCanvasView: 0x7f95d2215700; frame = (29.6667 2; 322.333 32); >
|   |   |   |   |   |   |   |   |   |   |   <UITextSelectionView: 0x7f95d500b3a0; frame = (0 0; 0 0); >
|   |   |   |   |   |   <UIView: 0x7f95d0713e40; frame = (0 101.667; 375 0.333333); wants auto layout; tAMIC = NO; >
|   |   |   |   |   <UITableView: 0x7f95d1825800; frame = (0 102; 375 646); wants auto layout; tAMIC = NO; >
|   |   |   |   |   |   <UITableViewCell: 0x7f95d2145aa0; frame = (0 567; 375 81); text = 'Neighborhood Market'; >
|   |   |   |   |   |   |   <UITableViewCellContentView: 0x7f95d2145e70; frame = (0 0; 375 81); >
|   |   |   |   |   |   |   |   <UITableViewLabel: 0x7f95d2146000; frame = (16 15.3333; 200.333 24); text = 'Neighborhood Market'; >
|   |   |   |   |   |   |   |   <UITableViewLabel: 0x7f95d21462a0; frame = (16 43; 58.3333 20.3333); text = 'Subtitle'; >
|   |   |   |   |   |   |   <_UITableViewCellSeparatorView: 0x7f95d2146540; frame = (15 80; 360 1); >
|   |   |   |   |   |   |   <_UITableViewCellSeparatorView: 0x7f95d21475c0; frame = (16 80.6667; 359 0.333333); >
|   |   |   |   |   |   <UITableViewCell: 0x7f95d2143df0; frame = (0 486; 375 81); text = 'Neighborhood Market'; >
|   |   |   |   |   |   |   <UITableViewCellContentView: 0x7f95d21441c0; frame = (0 0; 375 81); >
|   |   |   |   |   |   |   |   <UITableViewLabel: 0x7f95d2144350; frame = (16 15.3333; 200.333 24); text = 'Neighborhood Market'; >
|   |   |   |   |   |   |   |   <UITableViewLabel: 0x7f95d21445f0; frame = (16 43; 58.3333 20.3333); text = 'Subtitle'; >
|   |   |   |   |   |   |   <_UITableViewCellSeparatorView: 0x7f95d2144890; frame = (15 80; 360 1); >
|   |   |   |   |   |   |   <_UITableViewCellSeparatorView: 0x7f95d2145910; frame = (16 80.6667; 359 0.333333); >
|   |   |   |   |   |   <UITableViewCell: 0x7f95d2142250; frame = (0 405; 375 81); text = 'Neighborhood Market'; >
|   |   |   |   |   |   |   <UITableViewCellContentView: 0x7f95d2142620; frame = (0 0; 375 81); >
|   |   |   |   |   |   |   |   <UITableViewLabel: 0x7f95d21427b0; frame = (16 15.3333; 200.333 24); text = 'Neighborhood Market'; >
|   |   |   |   |   |   |   |   <UITableViewLabel: 0x7f95d2142a50; frame = (16 43; 58.3333 20.3333); text = 'Subtitle'; >
|   |   |   |   |   |   |   <_UITableViewCellSeparatorView: 0x7f95d2142cf0; frame = (15 80; 360 1); >
|   |   |   |   |   |   |   <_UITableViewCellSeparatorView: 0x7f95d2143c60; frame = (16 80.6667; 359 0.333333); >
|   |   |   |   |   |   <UITableViewCell: 0x7f95d21407a0; frame = (0 324; 375 81); text = 'Neighborhood Market'; >
|   |   |   |   |   |   |   <UITableViewCellContentView: 0x7f95d2140b70; frame = (0 0; 375 81); >
|   |   |   |   |   |   |   |   <UITableViewLabel: 0x7f95d2140d00; frame = (16 15.3333; 200.333 24); text = 'Neighborhood Market'; >
|   |   |   |   |   |   |   |   <UITableViewLabel: 0x7f95d2140fa0; frame = (16 43; 58.3333 20.3333); text = 'Subtitle'; >
|   |   |   |   |   |   |   <_UITableViewCellSeparatorView: 0x7f95d2141240; frame = (15 80; 360 1); >
|   |   |   |   |   |   |   <_UITableViewCellSeparatorView: 0x7f95d21420c0; frame = (16 80.6667; 359 0.333333); >
|   |   |   |   |   |   <UITableViewCell: 0x7f95d213ec10; frame = (0 243; 375 81); text = 'Neighborhood Market'; >
|   |   |   |   |   |   |   <UITableViewCellContentView: 0x7f95d213efe0; frame = (0 0; 375 81); >
|   |   |   |   |   |   |   |   <UITableViewLabel: 0x7f95d213f170; frame = (16 15.3333; 200.333 24); text = 'Neighborhood Market'; >
|   |   |   |   |   |   |   |   <UITableViewLabel: 0x7f95d213f410; frame = (16 43; 58.3333 20.3333); text = 'Subtitle'; >
|   |   |   |   |   |   |   <_UITableViewCellSeparatorView: 0x7f95d213f6b0; frame = (15 80; 360 1); >
|   |   |   |   |   |   |   <_UITableViewCellSeparatorView: 0x7f95d2140610; frame = (16 80.6667; 359 0.333333); >
|   |   |   |   |   |   <UITableViewCell: 0x7f95d213cda0; frame = (0 162; 375 81); text = 'Neighborhood Market'; >
|   |   |   |   |   |   |   <UITableViewCellContentView: 0x7f95d213d170; frame = (0 0; 375 81); >
|   |   |   |   |   |   |   |   <UITableViewLabel: 0x7f95d213d300; frame = (16 15.3333; 200.333 24); text = 'Neighborhood Market'; >
|   |   |   |   |   |   |   |   <UITableViewLabel: 0x7f95d213d5a0; frame = (16 43; 58.3333 20.3333); text = 'Subtitle'; >
|   |   |   |   |   |   |   <_UITableViewCellSeparatorView: 0x7f95d213d840; frame = (15 80; 360 1); >
|   |   |   |   |   |   |   <_UITableViewCellSeparatorView: 0x7f95d213e720; frame = (16 80.6667; 359 0.333333); >
|   |   |   |   |   |   <UITableViewCell: 0x7f95d213b1c0; frame = (0 81; 375 81); text = 'Neighborhood Market'; >
|   |   |   |   |   |   |   <UITableViewCellContentView: 0x7f95d213b590; frame = (0 0; 375 81); >
|   |   |   |   |   |   |   |   <UITableViewLabel: 0x7f95d213b720; frame = (16 15.3333; 200.333 24); text = 'Neighborhood Market'; >
|   |   |   |   |   |   |   |   <UITableViewLabel: 0x7f95d213b9c0; frame = (16 43; 58.3333 20.3333); text = 'Subtitle'; >
|   |   |   |   |   |   |   <_UITableViewCellSeparatorView: 0x7f95d213bc60; frame = (15 80; 360 1); >
|   |   |   |   |   |   |   <_UITableViewCellSeparatorView: 0x7f95d213cc10; frame = (16 80.6667; 359 0.333333); >
|   |   |   |   |   |   <UITableViewCell: 0x7f95d2135990; frame = (0 0; 375 81); text = 'Neighborhood Market'; >
|   |   |   |   |   |   |   <UITableViewCellContentView: 0x7f95d2135f60; frame = (0 0; 375 81); >
|   |   |   |   |   |   |   |   <UITableViewLabel: 0x7f95d21362f0; frame = (16 15.3333; 200.333 24); text = 'Neighborhood Market'; >
|   |   |   |   |   |   |   |   <UITableViewLabel: 0x7f95d2136ce0; frame = (16 43; 58.3333 20.3333); text = 'Subtitle'; >
|   |   |   |   |   |   |   <_UITableViewCellSeparatorView: 0x7f95d2136f80; frame = (15 80; 360 1); >
|   |   |   |   |   |   |   <_UITableViewCellSeparatorView: 0x7f95d213af10; frame = (16 80.6667; 359 0.333333); >
|   |   |   |   |   |   <_UIScrollViewScrollIndicator: 0x7f95d061f430; frame = (369 235.5; 3 7); >
|   |   |   |   |   |   |   <UIView: 0x7f95d061f5c0; frame = (0 0; 3 7); >
|   |   |   |   |   |   <_UIScrollViewScrollIndicator: 0x7f95d061f130; frame = (365 640; 7 3); >
|   |   |   |   |   |   |   <UIView: 0x7f95d061f2c0; frame = (0 0; 7 3); >
|   |   |   |   <UIView: 0x7f95d0713500; frame = (169.667 6; 36 5); wants auto layout; tAMIC = NO; >
|   |   |   |   <UIView: 0x7f95d20124a0; frame = (0 748; 375 0.666667); wants auto layout; tAMIC = NO; >

Views receiving layout in order: (
    <Pulley.PulleyPassthroughScrollView: 0x7f95d0813200; baseClass = UIScrollView; frame = (0 64; 375 748); wants auto layout; tAMIC = YES; >
    <UIView: 0x7f95d07144c0; frame = (0 0; 375 768); wants auto layout; tAMIC = NO; >
    <UIView: 0x7f95d20056e0; frame = (0 0; 375 812); wants auto layout; hosts layout engine; tAMIC = YES; >
)

*** Views With Geometry Changes ***
Geometry change records for <UIView: 0x7f95d0607b10; f={{0, 646}, {375, 768}} >:
(
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >"
)
Geometry change records for <UIView: 0x7f95d0608cd0; f={{0, -76}, {375, 2187}} >:
(
    "<frame = (0, 0; 375, 2187); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, -76; 375, 2187); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 0; 375, 2187); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, -76; 375, 2187); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 0; 375, 2187); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, -76; 375, 2187); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 0; 375, 2187); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, -76; 375, 2187); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 0; 375, 2187); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, -76; 375, 2187); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 0; 375, 2187); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, -76; 375, 2187); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 0; 375, 2187); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, -76; 375, 2187); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 0; 375, 2187); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, -76; 375, 2187); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 0; 375, 2187); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, -76; 375, 2187); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 0; 375, 2187); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, -76; 375, 2187); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 0; 375, 2187); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, -76; 375, 2187); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >"
)
Geometry change records for <Pulley.PulleyPassthroughScrollView: 0x7f95d0813200; f={{0, 64}, {375, 748}} baseClass = UIScrollView; >:
(
    "<frame = (0, 64; 375, 748); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 64; 375, 748); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 64; 375, 748); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 64; 375, 748); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 64; 375, 748); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 64; 375, 748); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 64; 375, 748); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 64; 375, 748); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 64; 375, 748); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 64; 375, 748); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 64; 375, 748); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >"
)
Geometry change records for <UIView: 0x7f95d0607c80; f={{0, 646}, {375, 768}} >:
(
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >"
)
Geometry change records for <UIVisualEffectView: 0x7f95d0608e40; f={{0, 646}, {375, 768}} >:
(
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >",
    "<frame = (0, 646; 375, 768); in -viewDidLayoutSubviews of <Pulley.PulleyViewController: 0x7f95d0812800> with <UIView: 0x7f95d20056e0; f={{0, 0}, {375, 812}} >; >"
)

*** Call stacks where -setNeedsLayout is sent to the top-level view ***
{(
    (
    0   UIKitCore                           0x000000011267f694 -[_UIViewLayoutFeedbackLoopDebugger _recordSetNeedsLayoutToLayerOfView:] + 556
    1   UIKitCore                           0x0000000112625d58 -[UIView(Hierarchy) setNeedsLayout] + 389
    2   Pulley                              0x00000001028d7b75 $s6Pulley0A14ViewControllerC13shadowOpacitySfvW + 517
    3   Pulley                              0x00000001028d7968 $s6Pulley0A14ViewControllerC13shadowOpacitySfvs + 136
    4   PulleyDemo                          0x0000000102029494 $s10PulleyDemo27DrawerContentViewControllerC23drawerPositionDidChange0G014bottomSafeAreay0A00aeF0C_12CoreGraphics7CGFloatVtF + 4356
    5   PulleyDemo                          0x000000010202952e $s10PulleyDemo27DrawerContentViewControllerC23drawerPositionDidChange0G014bottomSafeAreay0A00aeF0C_12CoreGraphics7CGFloatVtFTo + 78
    6   Pulley                              0x00000001028fe213 $sTa.64 + 35
    7   Pulley                              0x00000001028f1b9c $s6Pulley0A14ViewControllerC12CoreGraphics7CGFloatVIegyy_AcFIeggy_TR + 12
    8   Pulley                              0x00000001028f0422 $s6Pulley0A14ViewControllerC17setDrawerPosition8position8animated10completionyAA0aF0C_SbySbcSgtF + 6002
    9   Pulley                              0x00000001028ea38c $s6Pulley0A14ViewControllerC21viewDidLayoutSubviewsyyF + 25532
    10  Pulley                              0x00000001028ea4bb $s6Pulley0A14ViewControllerC21viewDidLayoutSubviewsyyFTo + 43
    11  UIKitCore                           0x000000011263abcb -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 3383
    12  QuartzCore                          0x0000000103ffbd87 -[CALayer layoutSublayers] + 258
    13  QuartzCore                          0x0000000104002239 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 575
    14  QuartzCore                          0x000000010400df91 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 65
    15  QuartzCore                          0x0000000103f4e078 _ZN2CA7Context18commit_transactionEPNS_11TransactionEdPd + 496
    16  QuartzCore                          0x0000000103f84e13 _ZN2CA11Transaction6commitEv + 783
    17  UIKitCore                           0x00000001120fb27a __34-[UIApplication _firstCommitBlock]_block_invoke_2 + 81
    18  CoreFoundation                      0x0000000102fdb5db __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
    19  CoreFoundation                      0x0000000102fda9ef __CFRunLoopDoBlocks + 434
    20  CoreFoundation                      0x0000000102fd540c __CFRunLoopRun + 899
    21  CoreFoundation                      0x0000000102fd4b9e CFRunLoopRunSpecific + 567
    22  GraphicsServices                    0x000000011664cdb3 GSEventRunModal + 139
    23  UIKitCore                           0x00000001120ddaf3 -[UIApplication _run] + 912
    24  UIKitCore                           0x00000001120e2a04 UIApplicationMain + 101
    25  PulleyDemo                          0x000000010202b3eb main + 75
    26  libdyld.dylib                       0x000000010daaf415 start + 1
    27  ???                                 0x0000000000000003 0x0 + 3
)
)}
2020-09-23 13:12:07.169428+0800 PulleyDemo[18818:574117] *** Terminating app due to uncaught exception 'NSGenericException', reason: 'Degenerate layout! Layout feedback loop detected in subtree of <UIView: 0x7f95d20056e0; frame = (0 0; 375 812); wants auto layout; hosts layout engine; tAMIC = YES; >. More info may be available in the log for com.apple.UIKit.LayoutLoop'
*** First throw call stack:
(
    0   CoreFoundation                      0x000000010306d126 __exceptionPreprocess + 242
    1   libobjc.A.dylib                     0x0000000102efdf78 objc_exception_throw + 48
    2   CoreFoundation                      0x000000010306cdc7 -[NSException init] + 0
    3   UIKitCore                           0x000000011267fdfc -[_UIViewLayoutFeedbackLoopDebugger dumpInfoWithInfoCollectionSuccess:] + 507
    4   UIKitCore                           0x000000011267e97b -[_UIViewLayoutFeedbackLoopDebugger willSendLayoutSubviewsToView:] + 143
    5   UIKitCore                           0x000000011263a943 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2735
    6   QuartzCore                          0x0000000103ffbd87 -[CALayer layoutSublayers] + 258
    7   QuartzCore                          0x0000000104002239 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 575
    8   QuartzCore                          0x000000010400df91 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 65
    9   QuartzCore                          0x0000000103f4e078 _ZN2CA7Context18commit_transactionEPNS_11TransactionEdPd + 496
    10  QuartzCore                          0x0000000103f84e13 _ZN2CA11Transaction6commitEv + 783
    11  UIKitCore                           0x00000001120fb27a __34-[UIApplication _firstCommitBlock]_block_invoke_2 + 81
    12  CoreFoundation                      0x0000000102fdb5db __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
    13  CoreFoundation                      0x0000000102fda9ef __CFRunLoopDoBlocks + 434
    14  CoreFoundation                      0x0000000102fd540c __CFRunLoopRun + 899
    15  CoreFoundation                      0x0000000102fd4b9e CFRunLoopRunSpecific + 567
    16  GraphicsServices                    0x000000011664cdb3 GSEventRunModal + 139
    17  UIKitCore                           0x00000001120ddaf3 -[UIApplication _run] + 912
    18  UIKitCore                           0x00000001120e2a04 UIApplicationMain + 101
    19  PulleyDemo                          0x000000010202b3eb main + 75
    20  libdyld.dylib                       0x000000010daaf415 start + 1
    21  ???                                 0x0000000000000003 0x0 + 3
)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSGenericException', reason: 'Degenerate layout! Layout feedback loop detected in subtree of <UIView: 0x7f95d20056e0; frame = (0 0; 375 812); wants auto layout; hosts layout engine; tAMIC = YES; >. More info may be available in the log for com.apple.UIKit.LayoutLoop'
terminating with uncaught exception of type NSException
CoreSimulator 732.17 - Device: iPhone 11 Pro (901DEF38-B212-44BA-AE59-FE05F1397A01) - Runtime: iOS 14.0 (18A372) - DeviceType: iPhone 11 Pro
(lldb) 
ulmentflam commented 3 years ago

@150vb I just pushed a new fix for your issue to the xcode12 branch and would love for you to test it before I release it.

150vb commented 3 years ago

@ulmentflam Thank you very much, I tested it and it worked fine.

benjaminmestrez commented 3 years ago

@150vb I just pushed a new fix for your issue to the xcode12 branch and would love for you to test it before I release it.

@ulmentflam your latest fix on xcode12 branch fixed it for me, thanks 😀.

vladkos commented 3 years ago

@150vb I just pushed a new fix for your issue to the xcode12 branch and would love for you to test it before I release it.

For me it's fixed too. @ulmentflam good job. Thx you

ulmentflam commented 3 years ago

@150vb @benjaminmestrez @vladkos The latest from the xcode12 branch has been released in version 2.8.4!

ulmentflam commented 3 years ago

As this is the home to all issues iOS 14 and Xcode 12, see comments for issues related to dragging scrollview in issue #400

ulmentflam commented 3 years ago

More iOS 14 issues have been fixed in release 2.8.5. Please continue to report issues with iOS 14 as you run into them!

ambi1132 commented 3 years ago

App is stucking on launch screen as we are initializing the root view controller using pulley library in iOS14. I stucked in this issue from last 2 days.

ulmentflam commented 3 years ago

@ambi1132 See my comments on your issue #405

Roman-swift commented 3 years ago

@ulmentflam I have it problem now (only on iphone 11 pro, 11 pro max, 12 pro/ iOS 14.4). Pulley version 2.9.0, xCode version 12.4. It works good on other devices. This is what I know: When i don't send ".open" in func supportedDrawerPositions () -> [PulleyPosition] - no bug. DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) fixed it, but not everything works correctly. Please, help me

ulmentflam commented 3 years ago

@Roman-swift It sounds like there is an auto layout feedback loop in your implementation of the PulleyDrawerViewControllerDelegate as I am not able to replicate this issue on the sample app. You can use this article to debug the auto layout feedback loop.