Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8182884

[macos] CGLLayer.m copyCGLContextForPixelFormat appears to leak OpenGL contexts

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: External
    • Icon: P3 P3
    • 10
    • 8, 9
    • client-libs
    • x86
    • os_x

      I'm running a netbeans based app on a new iMac and I'm seeing a problem where the rendering of a tree view causes me to run out of OpenGL contexts. Basically if I wave my mouse over this tree view I can see the number of OpenGL Contexts being increasing in the OpenGL Driver Monitor. Once it gets to around 450 my whole machine hang and eventually recovers, though I've had to log in remotely and kill the process a few times. I can see the method

      - (CGLContextObj)copyCGLContextForPixelFormat:(CGLPixelFormatObj)pixelFormat {
          CGLContextObj contextObj = NULL;
          CGLCreateContext(pixelFormat, sharedContext.CGLContextObj, &contextObj);
          return contextObj;
      }

      that creates it but I don't see a matching releaseCGLPixelFormat as described in https://developer.apple.com/documentation/quartzcore/caopengllayer. I've confirmed in the debugger that copyCGLContextForPixelFormat is where it is created. How is this context supposed to be reclaimed?

            serb Sergey Bylokhov
            never Tom Rodriguez
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: