Mac OS X 10.11.4: CVDisplayLinkSetOutputHandler causes CVDisplayLinkStart to fail.
Originator: | iosdeveloperzone | ||
Number: | rdar://26640780 | Date Originated: | 05-Jun-2016 12:52 AM |
Status: | Open | Resolved: | |
Product: | OS X | Product Version: | Mac OS X 10.11.4 (15E65) |
Classification: | Crash/Hang/Data Loss | Reproducible: | Always |
Summary: The CVDisplayLinkSetOutputHandler function, introduced in 10.11 theoretically provides a block-based way of specifying the action to be taken with the display link fires, however it causes CVDisplayLinkStart to fail with the error code kCVReturnDisplayLinkCallbacksNotSet Steps to Reproduce: 1) Run the attached project, notice the color of the window varies. 2) Open the file OpenGLView.swift and change the first line from: let useBlock = false to let useBlock = true 3) Rerun the program. It will abort with a precondition failure. Expected Results: The program should run correctly irrespective of whether CVDisplayLinkSetOutputCallback or CVDisplayLinkSetOutputHandler is used. Actual Results: CVDisplayLinkSetOutputHandler always causes CVDisplayLinkStart to fail. Notes: The problem also occurs in Objective C
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Code mentioned in Radar available on GitHub
See https://github.com/iosdevzone/Radars/tree/master/26640780%20-%20CVCVDisplayLinkSetOutputHandlerRadar