Crash in AVSecondScreenViewController

Hi,

We've had an app in distribution for serveral years now which uses UIPageViewController and each ViewController in the PageViewController owns an AVPlayer. This app allows paging from one video to the next. This app has worked well for many years.


We recently changed the UI so that we needed a custom scrollview for the UIViewControllers which own an AVPlayer and removed the UIPageViewController. After we released the changes we started seeing crashes, which we can't reproduce in house, in AVSecondScreenViewController.


Since the crashes are in AVSecondScreenViewController, can I assume the crash only happens when connected to another device using Airplay?


On the call stack there are many calls to

AVPlayerViewController viewDidAppear so I assume the user is scrolling through players.

The user can only have 3 ViewControllers instanciated at a time and when the scroll ends, all but one ViewController is derferenced and destroyed.


Any ideas?


The crashes look like this:


EXC_BAD_ACCESS AVSecondScreenViewController

_flushPendingRemovals > addVariableToBeOptimized:priority: > ositive: > tryToAddConstraintWithMarker:expression:mutuallyExclusiveConstraints: >

Stack overflow in (null)


EXC_BAD_ACCESS AVSecondScreenViewController

_flushPendingRemovals > _lowerIntoExpression:reportingConstantIsRounded: > acquireFromPoolForUseCase:engine: > constraintDidChangeSuchThatMarker:shouldBeReplacedByMarkerPlusDelta: > nsli_lowerAttribute:intoExpression:withCoefficient:forConstraint:onBehalfOfLayoutGuide: > ositive: > superview >

Stack overflow in (null)

Crash in AVSecondScreenViewController
 
 
Q