AVFoundation error when making a window full screen

I am working on a macOS app that uses AVFoundation to record the screen. During a recording if I make a window full screen, AVFoundation stops capturing screen frames (or does it at a very slow rate). In my logs I get the following error:

Error Domain=AVFoundationErrorDomain Code=-11844

note that I have had instances where I could not reproduce the error but they were rare.

The screen recording sometimes resumes normally if I switch desktops or minimize the full screen window.

Did anyone ever run across a similar issue or knows how to fix it ?

Hello @moe_Reda, error code -11844 corresponds to AVError.Code.screenCaptureFailed. I'd greatly appreciate it if you could open a bug report, include a sysdiagnose, and post the FB number here once you do. Bug Reporting: How and Why? has tips on creating your bug report.

AVFoundation error when making a window full screen
 
 
Q