lionheart / openradar-mirror

A mirror of radars pulled from http://openradar.me/.
246 stars 17 forks source link

45889262: VTCompressionSession fails if VTSessionCopyProperty() called often. #20742

Open openradar-mirror opened 5 years ago

openradar-mirror commented 5 years ago

Description

Steps to Reproduce: 1) Create VTCompressionSession. 2) Start encoding process. 3) Call VTSessionCopyProperty() or VTSessionSetProperty() after every new frame sent to encoder. (ex: get kVTCompressionPropertyKey_AverageBitRate)

Eventually, compression session will fail with 'kVTVideoEncoderMalfunctionErr' status, and 'mediaserverd' will crash. Issue observed with different frequency, depending on working queue. Any queue (system or manually created), except QOS_CLASS_UTILITY will cause encoder to fail. System utility queue (QOS_CLASS_UTILITY) will cause failure eventually, but with much lower rate.

Issue is not observed if working thread suspended for some time (artificial delay of 0.1sec introduced between calls as example).

Source code to reproduce issue: https://www.dropbox.com/s/c4zx3mhxuyvgzkb/videotoolbox_issue.zip?dl=0

Expected Results: Calls to VTSessionCopyProperty should not lead to encoder failure.

Actual Results: VTCompressionSession switched to invalid state with 'kVTVideoEncoderMalfunctionErr' status. Any subsequent calls involving compressionSession will fail.

Version/Build:

openradar-mirror commented 5 years ago

Modified: 2018-11-23T10:48:04.352239

openradar-mirror commented 5 years ago

Modified: 2018-11-23T10:48:04.352239

openradar-mirror commented 5 years ago

Modified: 2018-11-23T10:48:04.352239

openradar-mirror commented 5 years ago

Modified: 2018-11-23T10:48:04.352239

openradar-mirror commented 5 years ago

Modified: 2018-11-23T10:48:04.352239

openradar-mirror commented 5 years ago

Modified: 2018-11-23T10:48:04.352239

openradar-mirror commented 5 years ago

Modified: 2018-11-23T10:48:04.352239

openradar-mirror commented 5 years ago

Modified: 2018-11-23T10:48:04.352239

openradar-mirror commented 5 years ago

Modified: 2018-12-04T00:15:29.779521