jogl
  1. jogl
  2. JOGL-308

Assymetry in null GLCapabilities parameter for off-screen context creation

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: jogl
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      308

      Description

      Passing a null for the GLCapabilities when creating a pbuffer throws a
      NullPointerException. This is not the same for the onscreen drawables. After
      looking at the source code, it appears that this is only a problem for Mac and
      Windows, the X11 version checks for null.

      Here's the stack trace

      Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
      at com.sun.opengl.impl.windows.WindowsGLDrawable.<init>(WindowsGLDrawabl
      e.java:58)
      at com.sun.opengl.impl.windows.WindowsPbufferGLDrawable.<init>(WindowsPb
      ufferGLDrawable.java:62)
      at com.sun.opengl.impl.windows.WindowsGLDrawableFactory$2.run(WindowsGLD
      rawableFactory.java:147)
      at com.sun.opengl.impl.windows.WindowsGLDrawableFactory.maybeDoSingleThr
      eadedWorkaround(WindowsGLDrawableFactory.java:219)
      at com.sun.opengl.impl.windows.WindowsGLDrawableFactory.createGLPbuffer(
      WindowsGLDrawableFactory.java:164)
      at SharedPBuffer.init(SharedPBuffer.java:87)
      at com.sun.opengl.impl.GLDrawableHelper.init(GLDrawableHelper.java:72)
      at javax.media.opengl.GLCanvas$InitAction.run(GLCanvas.java:307)
      at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1
      89)
      at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.
      java:301)
      at javax.media.opengl.GLCanvas.display(GLCanvas.java:133)
      at javax.media.opengl.GLCanvas.paint(GLCanvas.java:166)
      at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)
      at sun.awt.RepaintArea.paint(RepaintArea.java:224)
      at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:293)
      at java.awt.Component.dispatchEventImpl(Component.java:4483)
      at java.awt.Component.dispatchEvent(Component.java:4237)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:600)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
      ad.java:273)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
      java:183)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
      ad.java:173)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)

      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)

      at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
      pBuffer = GLDrawableFactory.getFactory().createGLPbuffer(
      null, null, 400, 400, canvas.getContext());

      WindowsGLDrawable.java:58
      this.capabilities = (GLCapabilities) capabilities.clone();

      MacOSXGLDrawable.java:86
      this.capabilities = (GLCapabilities) capabilities.clone();

      • whereas -
        X11GLDrawable.java:57
        this.capabilities = (capabilities == null) ? null :
        ((GLCapabilities) capabilities.clone());

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            jogl-issues
            Reporter:
            moorej
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: