Сбой AVPlayer в полноэкранном режиме
На iOS 13.3.1 полноэкранный режим AVPlayer дает сбой. После поворота экрана консоль Xcode показывает ошибкуMake a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger
.
Я добавил символическую точку останова, и отладчик обнаружил следующую ошибку
UIWindow:0x108b99360
| UITransitionView:0x108c53a10
| | UIView:0x11be462b0
| | | UIView:0x11beab9d0
| | | UIView:0x11a7c9890
| | | UIView:0x11bebacc0
| | | UIView:0x11be10d00
| | UIDropShadowView:0x113c14b00
| | | UILayoutContainerView:0x108bf0790
| | | | UITransitionView:0x108bc1410
| | | | | UIViewControllerWrapperView:0x108ba1590
| | | | | | •UILayoutContainerView:0x108ba25c0
| | | | | | | +UINavigationTransitionView:0x108bc04b0
| | | | | | | | +UIViewControllerWrapperView:0x11ae32650
| | | | | | | | | •UIView:0x11a7c90f0
| | | | | | | | | | *<UILayoutGuide: 0x280700b60 - "UIViewSafeAreaLayoutGuide", layoutFrame = {{0, 20}, {667, 425}}, owningView = <UIView: 0x11a7c90f0; frame = (0 0; 667 375); autoresize = W+H; animations = { position=<CABasicAnimation: 0x283e654e0>; bounds.origin=<CABasicAnimation: 0x283e65420>; bounds.size=<CABasicAnimation: 0x283e65460>; position-2=<CABasicAnimation: 0x283e60a20>; bounds.origin-2=<CABasicAnimation: 0x283e60980>; bounds.size-2=<CABasicAnimation: 0x283e60920>; }; layer = <CALayer: 0x283ebb900>>>- AMBIGUOUS LAYOUT for UILayoutGuide:0x280700b60'UIViewSafeAreaLayoutGuide'.Height{id: 8167}
| | | | | | | | | | *UIView:0x11a7c8e10
| | | | | | | | | | | •UIView:0x11ae5b960
| | | | | | | | | | | | *<UILayoutGuide: 0x28071fc60 - "UIViewSafeAreaLayoutGuide", layoutFrame = {{0, 0}, {375, 375}}, owningView = <UIView: 0x11ae5b960; frame = (0 0; 375 375); autoresize = W+H; gestureRecognizers = <NSArray: 0x2830ff750>; layer = <CALayer: 0x283f1b6a0>>>
| | | | | | | | | | | | *UIView:0x11ae598b0
| | | | | | | | | | | | *UIImageView:0x108ba76e0
| | | | | | | | | | | | *UIButton:0x11aea33b0
| | | | | | | | | | | | | UIImageView:0x108cf2320
| | | | | | | | | | | | *UILabel:0x11aea3660'Tap to reload'
| | | | | | | | | | | | *NTV.GradientView:0x11ae77740
| | | | | | | | | | | | | *UIView:0x108ba8140
| | | | | | | | | | | | | | *UILabel:0x108b93db0'Now Playing- Swasthya Sar...'
| | | | | | | | | | | | | | *UILabel:0x108ba64a0'2020-02-14 09:30 - 10:00'
| | | | | | | | | | | | | *UILabel:0x114c062e0'11:59:23'
| | | | | | | | | | | | | *UISlider:0x108ba8870 alignmentRect = (16 300.5; 343 18.5) for frame = (14 300.5; 347 19.5);
| | | | | | | | | | | | | | *UIProgressView:0x108c3b7c0
| | | | | | | | | | | | | | | UIImageView:0x108c142a0
| | | | | | | | | | | | | | | UIImageView:0x108c06090
| | | | | | | | | | | | | | UIView:0x11bea2880
| | | | | | | | | | | | | | | UIImageView:0x11bea2b60
| | | | | | | | | | | | | | UIView:0x11bea29f0
| | | | | | | | | | | | | | | UIImageView:0x11bea4b20
| | | | | | | | | | | | | | UIImageView:0x11bea4cf0
| | | | | | | | | | | | | *UILabel:0x11ae01e00'00:00'
| | | | | | | | | | | | | *UILabel:0x108ba3e70'LIVE'
| | | | | | | | | | | | | *UIView:0x113c7d1e0
| | | | | | | | | | | | | | *UIStackView:0x113c61b80
| | | | | | | | | | | | | | | *UIButton:0x108ba40e0
| | | | | | | | | | | | | | | | UIImageView:0x108cf24f0
| | | | | | | | | | | | | | | *UIActivityIndicatorView:0x114c16df0
| | | | | | | | | | | | | | | | UIImageView:0x114c0c0d0
| | | | | | | | | | | | | | | *UIButton:0x113c5f6d0
| | | | | | | | | | | | | | | | UIImageView:0x108cf26c0
| | | | | | | | | | | | | | | *UIButton:0x113c4e840
| | | | | | | | | | | | | | | | UIImageView:0x108c24720
| | | | | | | | | | | | | | | *UIButton:0x11ae31150
| | | | | | | | | | | | | | | | UIImageView:0x108c248f0
| | | | | | | | | | | | | | *UIButton:0x113c37f90'Auto'
| | | | | | | | | | | | | | | UIButtonLabel:0x11bea2170'Auto'
| | | | | | | | | | | | | | *UIStackView:0x11ae30d80
| | | | | | | | | | | | | | | *<_UIOLAGapGuide: 0x280208a00 - "UISV-distributing", layoutFrame = {{30, 0}, {12, 0}}, owningView = <UIStackView: 0x11ae30d80; frame = (265 10; 94 20); opaque = NO; autoresize = RM+BM; layer = <CATransformLayer: 0x283f1ad80>>>- AMBIGUOUS LAYOUT for _UIOLAGapGuide:0x280208a00'UISV-distributing'.minY{id: 9088}, _UIOLAGapGuide:0x280208a00'UISV-distributing'.Height{id: 9089}
| | | | | | | | | | | | | | | *<_UIOLAGapGuide: 0x28021c600 - "UISV-distributing", layoutFrame = {{62, 0}, {12, 0}}, owningView = <UIStackView: 0x11ae30d80; frame = (265 10; 94 20); opaque = NO; autoresize = RM+BM; layer = <CATransformLayer: 0x283f1ad80>>>- AMBIGUOUS LAYOUT for _UIOLAGapGuide:0x28021c600'UISV-distributing'.minY{id: 9090}, _UIOLAGapGuide:0x28021c600'UISV-distributing'.Height{id: 9091}
| | | | | | | | | | | | | | | *UIButton:0x11ae967d0
| | | | | | | | | | | | | | | | UIImageView:0x108c54740
| | | | | | | | | | | | | | | *UIButton:0x11aea1a50
| | | | | | | | | | | | | | | | UIImageView:0x11a757f70
| | | | | | | | | | | | | | | *AVRoutePickerView:0x108c4f1d0
| | | | | | | | | | | | | | | | *UIButton:0x108c227f0
| | | | | | | | | | | | | | | | | UIButtonLabel:0x11be29d30
| | | | | | | | | | *UIView:0x11a7c9260- AMBIGUOUS LAYOUT for UIView:0x11a7c9260.Height{id: 8163}
| | | | | | | | | | | *XLPagerTabStrip.ButtonBarView:0x109a18c00
| | | | | | | | | | | | •XLPagerTabStrip.ButtonBarViewCell:0x11be6b470
| | | | | | | | | | | | | *UIView:0x11be6b870
| | | | | | | | | | | | | | *<UILayoutGuide: 0x280701420 - "UIViewSafeAreaLayoutGuide", layoutFrame = {{0, 0}, {162.5, 40}}, owningView = <UIView: 0x11be6b870; frame = (0 0; 162.5 40); gestureRecognizers = <NSArray: 0x28312e910>; layer = <CALayer: 0x283e8db00>>>
| | | | | | | | | | | | | | *UILabel:0x11be6b9e0'LIVE CHANNEL'
| | | | | | | | | | | | | | *UIImageView:0x11be6be40
| | | | | | | | | | | | •XLPagerTabStrip.ButtonBarViewCell:0x11be6d2a0
| | | | | | | | | | | | | *UIView:0x11be6d4a0
| | | | | | | | | | | | | | *<UILayoutGuide: 0x280701500 - "UIViewSafeAreaLayoutGuide", layoutFrame = {{0, 0}, {162.5, 40}}, owningView = <UIView: 0x11be6d4a0; frame = (0 0; 162.5 40); gestureRecognizers = <NSArray: 0x28312c5a0>; layer = <CALayer: 0x283e8d500>>>
| | | | | | | | | | | | | | *UILabel:0x11be6d610'LIVE EVENTS'
| | | | | | | | | | | | | | *UIImageView:0x11be6d880
| | | | | | | | | | | | UIView:0x108c303b0
| | | | | | | | | | | | _UIScrollViewScrollIndicator:0x108bf1d10
| | | | | | | | | | | | | UIView:0x11ae577e0
| | | | | | | | | | | *UIView:0x11a7c8f80
| | | | | | | | | | | *UIScrollView:0x109a15000- AMBIGUOUS LAYOUT for UIScrollView:0x109a15000.Height{id: 8164}
| | | | | | | | | | | | •UIView:0x11be60eb0
| | | | | | | | | | | | | *<UILayoutGuide: 0x280701260 - "UIViewSafeAreaLayoutGuide", layoutFrame = {{0, 0}, {375, 173}}, owningView = <UIView: 0x11be60eb0; frame = (0 0; 375 173); autoresize = W+H; layer = <CALayer: 0x283eb6f20>>>
| | | | | | | | | | | | | *UICollectionView:0x109a48400
| | | | | | | | | | | | | | •NTV.LiveChannelCollectionViewCell:0x11ae5b750
| | | | | | | | | | | | | | | *UIView:0x11ae5bb60
| | | | | | | | | | | | | | | | *UIView:0x11ae5bcd0
| | | | | | | | | | | | | | | | | *UIImageView:0x11ae5be40
| | | | | | | | | | | | | | | | *UILabel:0x11ae5c190'NTV'
| | | | | | | | | | | | | | •NTV.LiveChannelCollectionViewCell:0x11ae5d820
| | | | | | | | | | | | | | | *UIView:0x11ae5da30
| | | | | | | | | | | | | | | | *UIView:0x11ae5dba0
| | | | | | | | | | | | | | | | | *UIImageView:0x11ae5dd10
| | | | | | | | | | | | | | | | *UILabel:0x11ae5e060'NTV Plus'
| | | | | | | | | | | | | | •NTV.LiveChannelCollectionViewCell:0x11ae5f3d0
| | | | | | | | | | | | | | | *UIView:0x11ae5f5e0
| | | | | | | | | | | | | | | | *UIView:0x11ae5f750
| | | | | | | | | | | | | | | | | *UIImageView:0x11ae5f8c0
| | | | | | | | | | | | | | | | *UILabel:0x11ae5fc10'NTV News'
| | | | | | | | | | | | | | •NTV.LiveChannelCollectionViewCell:0x11be64720
| | | | | | | | | | | | | | | *UIView:0x11be64930
| | | | | | | | | | | | | | | | *UIView:0x11be64aa0
| | | | | | | | | | | | | | | | | *UIImageView:0x11be64c10
| | | | | | | | | | | | | | | | *UILabel:0x11be64f60'NTV Kohalpur'
| | | | | | | | | | | | | | •NTV.LiveChannelCollectionViewCell:0x11be66400
| | | | | | | | | | | | | | | *UIView:0x11be66610
| | | | | | | | | | | | | | | | *UIView:0x11be66780
| | | | | | | | | | | | | | | | | *UIImageView:0x11be668f0
| | | | | | | | | | | | | | | | *UILabel:0x11be66c40'NTV Itahari'
| | | | | | | | | | | | | *UIView:0x11be61020
| | | | | | | | | | | | | | *UIView:0x11be61190
| | | | | | | | | | | | | | | *UIImageView:0x11be603e0
| | | | | | | | | | | | | | | *UILabel:0x11be605b0'NTV'
| | | | | | | | | | | | | | | *UIButton:0x11be60a10' MORE SCHEDULE '
| | | | | | | | | | | | | | | | UIButtonLabel:0x11ae5a230' MORE SCHEDULE '
| | | | | | | | | | | | | | | *UIView:0x11be61300
| | | | | | | | | | | | | | *UIView:0x11be61770
| | | | | | | | | | | | | | | *UIImageView:0x11a7c9a40
| | | | | | | | | | | | | | | *UIImageView:0x11a73d9c0
| | | | | | | | | | | | | | | *UICollectionView:0x1098e3400
| | | | | | | | | | | | | | | | •NTV.EPGCollectionViewCell:0x11be2aad0
| | | | | | | | | | | | | | | | | *UIView:0x11be2ace0
| | | | | | | | | | | | | | | | | | *UIImageView:0x11be2ae50
| | | | | | | | | | | | | | | | | | *UILabel:0x11bebbbf0'08:00 - 08:25'
| | | | | | | | | | | | | | | | | | *UILabel:0x11bebbe60'The News'
| | | | | | | | | | | | | | | | | | *UIView:0x11bebc0d0
| | | | | | | | | | | | | | | | | | *UILabel:0x11bebc240' On Air '
| | | | | | | | | | | | | | | | •NTV.EPGCollectionViewCell:0x11beb0cf0
| | | | | | | | | | | | | | | | | *UIView:0x11beae950
| | | | | | | | | | | | | | | | | | *UIImageView:0x11beb0220
| | | | | | | | | | | | | | | | | | *UILabel:0x11beb0f00'09:00 - 09:30'
| | | | | | | | | | | | | | | | | | *UILabel:0x11beb1170'Sirjanaka Sarathi'
| | | | | | | | | | | | | | | | | | *UIView:0x11beb13e0
| | | | | | | | | | | | | | | | | | *UILabel:0x11beb1550' On Air '
| | | | | | | | | | | | | | | | •NTV.EPGCollectionViewCell:0x11beb3850
| | | | | | | | | | | | | | | | | *UIView:0x11bebe860
| | | | | | | | | | | | | | | | | | *UIImageView:0x11bebeec0
| | | | | | | | | | | | | | | | | | *UILabel:0x11bebf090'Swasthya Sarokar'
| | | | | | | | | | | | | | | | | | *UILabel:0x11bebf4c0
| | | | | | | | | | | | | | | | | | *UIView:0x11bebe9d0
| | | | | | | | | | | | | | | | | | *UILabel:0x11bebf730' On Air '
| | | | | | | | | | | | | | | | •NTV.EPGCollectionViewCell:0x11aeaf4d0
| | | | | | | | | | | | | | | | | *UIView:0x11aeaf6e0
| | | | | | | | | | | | | | | | | | *UIImageView:0x11aeaf850
| | | | | | | | | | | | | | | | | | *UILabel:0x11aeafa20'10:00 - 10:15'
| | | | | | | | | | | | | | | | | | *UILabel:0x11aeafc90'Hamro Kathmandu'
| | | | | | | | | | | | | | | | | | *UIView:0x11aeaff00
| | | | | | | | | | | | | | | | | | *UILabel:0x11aeb0070' On Air '
| | | | | | | | | | | | | | | | •NTV.EPGCollectionViewCell:0x11aebe350
| | | | | | | | | | | | | | | | | *UIView:0x11aebe560
| | | | | | | | | | | | | | | | | | *UIImageView:0x11aebd270
| | | | | | | | | | | | | | | | | | *UILabel:0x11aebd440'09:00 - 09:30'
| | | | | | | | | | | | | | | | | | *UILabel:0x11aebebc0'Sirjanaka Sarathi'
| | | | | | | | | | | | | | | | | | *UIView:0x11aebe840
| | | | | | | | | | | | | | | | | | *UILabel:0x11aebee30' On Air '
| | | | | | | | | | | | | | | | •NTV.EPGCollectionViewCell:0x11aeb6230
| | | | | | | | | | | | | | | | | *UIView:0x113c2beb0
| | | | | | | | | | | | | | | | | | *UIImageView:0x11aea7020
| | | | | | | | | | | | | | | | | | *UILabel:0x108c40a30'Swasthya Sarokar'
| | | | | | | | | | | | | | | | | | *UILabel:0x11beb9460
| | | | | | | | | | | | | | | | | | *UIView:0x11bea74d0
| | | | | | | | | | | | | | | | | | *UILabel:0x11beab180' On Air '
| | | | | | | | | | | | | | | | •NTV.EPGCollectionViewCell:0x11aeaba80
| | | | | | | | | | | | | | | | | *UIView:0x11aeabe90
| | | | | | | | | | | | | | | | | | *UIImageView:0x11aeac000
| | | | | | | | | | | | | | | | | | *UILabel:0x11aeac1d0'10:00 - 10:15'
| | | | | | | | | | | | | | | | | | *UILabel:0x11aeac630'Hamro Kathmandu'
| | | | | | | | | | | | | | | | | | *UIView:0x11aeaca90
| | | | | | | | | | | | | | | | | | *UILabel:0x11aeacc00' On Air '
| | | | | | | •UINavigationBar:0x108c24220
| | | | | | | | _UIBarBackground:0x108c37e40
| | | | | | | | | UIImageView:0x11ae59160
| | | | | | | | •_UINavigationBarContentView:0x108c4c340
| | | | | | | | | *<UILayoutGuide: 0x280714c40 - "BackButtonGuide(0x108c50bc0)", layoutFrame = {{0, 0}, {16, 32}}, owningView = <_UINavigationBarContentView: 0x108c4c340; frame = (0 0; 375 44); layer = <CALayer: 0x283e4b0a0>> layout=0x108c50bc0>
| | | | | | | | | *<UILayoutGuide: 0x280714d20 - "LeadingBarGuide(0x108c50bc0)", layoutFrame = {{16, 0}, {70, 32}}, owningView = <_UINavigationBarContentView: 0x108c4c340; frame = (0 0; 375 44); layer = <CALayer: 0x283e4b0a0>> layout=0x108c50bc0>
| | | | | | | | | *<UILayoutGuide: 0x280714e00 - "TitleView(0x108c50bc0)", layoutFrame = {{92, 0}, {231, 32}}, owningView = <_UINavigationBarContentView: 0x108c4c340; frame = (0 0; 375 44); layer = <CALayer: 0x283e4b0a0>> layout=0x108c50bc0>
| | | | | | | | | *<UILayoutGuide: 0x280716300 - "TrailingBarGuide(0x108c50bc0)", layoutFrame = {{323, 0}, {44, 32}}, owningView = <_UINavigationBarContentView: 0x108c4c340; frame = (0 0; 375 44); layer = <CALayer: 0x283e4b0a0>> layout=0x108c50bc0>
| | | | | | | | | *<UILayoutGuide: 0x280716220 - "UIViewLayoutMarginsGuide", layoutFrame = {{16, 0}, {343, 44}}, owningView = <_UINavigationBarContentView: 0x108c4c340; frame = (0 0; 375 44); layer = <CALayer: 0x283e4b0a0>> layout=0x108c50bc0>
| | | | | | | | | *_UIButtonBarStackView:0x114cdfb30
| | | | | | | | | | *<UILayoutGuide: 0x28071f1e0 - "UIViewLayoutMarginsGuide", layoutFrame = {{0, 0}, {70, 32}}, owningView = <_UIButtonBarStackView: 0x114cdfb30; frame = (16 0; 70 44); layer = <CALayer: 0x283e81140>> buttonBar=0x28071ef40>
| | | | | | | | | | *<_UILayoutSpacer: 0x280155680 - "UISV-alignment-spanner", layoutFrame = {{0, 0}, {0, 32}}, owningView = <_UIButtonBarStackView: 0x114cdfb30; frame = (16 0; 70 44); layer = <CALayer: 0x283e81140>> buttonBar=0x28071ef40>- AMBIGUOUS LAYOUT for _UILayoutSpacer:0x280155680'UISV-alignment-spanner'.minX{id: 9224}, _UILayoutSpacer:0x280155680'UISV-alignment-spanner'.Width{id: 9225}
| | | | | | | | | | *_UITAMICAdaptorView:0x114cdf6b0
| | | | | | | | | | | UIButton:0x108bcc8d0
| | | | | | | | | | | | UIImageView:0x11ae57f00
| | | | | | | | | | *UIView:0x11aea4d00
| | | | | | | | | | *_UIButtonBarButton:0x11aea5ae0
| | | | | | | | | | | *<UILayoutGuide: 0x2807031e0 - "UIViewLayoutMarginsGuide", layoutFrame = {{0, 11}, {37, 10}}, owningView = <_UIButtonBarButton: 0x11aea5ae0; frame = (33 0; 37 44); tintColor = UIExtendedGrayColorSpace 1 1; layer = <CALayer: 0x283f1b620>>>
| | | | | | | | | | | *_UIModernBarButton:0x11aea5ec0'NTV'
| | | | | | | | | | | | *UIButtonLabel:0x11bea7910'NTV'
| | | | | | | | | *_UIButtonBarStackView:0x108ba78e0
| | | | | | | | | | *<UILayoutGuide: 0x28071eca0 - "UIViewLayoutMarginsGuide", layoutFrame = {{0, 0}, {44, 32}}, owningView = <_UIButtonBarStackView: 0x108ba78e0; frame = (323 0; 44 44); layer = <CALayer: 0x283e841c0>> buttonBar=0x28071ebc0>
| | | | | | | | | | *_UIButtonBarButton:0x114c16590
| | | | | | | | | | | UILabel:0x108c4ff70'0'
| | | | | | | | | | | *_UIModernBarButton:0x114c16770
| | | | | | | | | | | | UIImageView:0x114c14c00
| | | | UITabBar:0x108bf0990
| | | | | _UIBarBackground:0x108bf34f0
| | | | | | _UIBarBackgroundShadowView:0x108bf5d80
| | | | | | | _UIBarBackgroundShadowContentImageView:0x108bfb190
| | | | | | UIImageView:0x113c0bc10
| | | | | UITabBarButton:0x113c10f70
| | | | | | UITabBarSwappableImageView:0x113c11530
| | | | | | UITabBarButtonLabel:0x113c11290'Home'
| | | | | UITabBarButton:0x113c11ed0
| | | | | | UITabBarSwappableImageView:0x113c12490
| | | | | | UITabBarButtonLabel:0x113c121f0'Live'
| | | | | UITabBarButton:0x113c12e30
| | | | | | UITabBarSwappableImageView:0x113c0dea0
| | | | | | UITabBarButtonLabel:0x113c13150'TV Shows'
| | | | | UITabBarButton:0x113c13ba0
| | | | | | UITabBarSwappableImageView:0x113c14160
| | | | | | UITabBarButtonLabel:0x113c13ec0'News'
| | | | | UITabBarButton:0x108c51190
| | | | | | UITabBarSwappableImageView:0x108c51de0
| | | | | | UITabBarButtonLabel:0x108c51b40'More'
| UIView:0x108bf0bb0
Проблема возникает на устройствах iOS 13.3.1 и работает на устройствах 12.4.5. Я попытался изменить ограничения AMBIGUOUS view, но не смог решить проблему. Любая помощь будет оценена. Спасибо.
1 ответ
Для меня это произошло из-за бесконечного цикла под layoutSubviews
. Как только я исправил это, проблема была решена. Хотя сбой возникает только в iOS 13, в предыдущей версии iOS с этим не было проблем.