NSOpenGLView hang on CGLFlushDrawable

Originator:ePirat07
Number:rdar://37064579 Date Originated:January 31 2018, 12:26 PM
Status:Open Resolved:
Product:macOS + SDK Graphics & Imaging Product Version:10.13.4 Beta (17E139j)
Classification:Bug Reproducible:Always
 
Summary:
When using multiple NSOpenGLViews and rendering content for them in a background thread, it hangs on the CGLFlushDrawable call on the context, when the windows contentView is layer backed.

Steps to Reproduce:
1. Create a subclass of NSOpenGLView with rendering on a different thread, like by using a CVDisplayLink.
2. Make the contentView of a NSWindow layer backed and add multiple (three or four) subviews with the subclassed NSOpenGLView class.
3. Start the application

(The sample project attached is already setup correctly for this scenario, it is only necessary to switch to the OS X variant and build it, then run it and it will hang.)

Expected Results:
The content in the OpenGL views should render fine, no hangs should happen.

Actual Results:
The program hangs on a call to CGLFlushDrawable.

Note:
The same happens when using the Objective C flushBuffer method on the NSOpenGLContexts.

Version/Build:
macOS High Sierra 10.13.4 Beta (17E139j)

Configuration:
MacBook Pro (Retina, 13", Ende 2013)
2,4 GHz Intel Core i5
Intel Iris 1536 MB

Comments

Attachments


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!