WindowServer daemon crashes

The scenario is quite simple

  • run an application which uses [SCShareableContent getShareableContentExcludingDesktopWindows] and invoke captureImageWithFilter in completionHandler.
  • delay invoking captureImageWithFilter for several seconds and switch user session before call it.

The WindowServer crashes if app runs in inactive session.

How to manage this issue correctly? Are there any way to avoid this crash?

look like this issue has been fixed in 14.6.1

WindowServer daemon crashes
 
 
Q