jogl
  1. jogl
  2. JOGL-90

Two JInternalFrames with Animators crash with EXCEPTION_ACCESS_VIOLATION

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Cannot Reproduce
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: jogl
    • Labels:
      None
    • Environment:

      Operating System: Windows XP
      Platform: PC

    • Issuezilla Id:
      90

      Description

      Two JInternalFrames are added to a JDesktopPane. Both of them have GLCanvases
      controlled by Animators. Moving one of the windows on the desktop causes a non-
      recoverable error, a crash with the following trace:

      net.java.games.jogl.GLException: Error swapping buffers
      at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.swapBuffers
      (WindowsOnscreenGLContext.java:140)
      at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:270)
      at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:186)
      at net.java.games.jogl.GLCanvas.display(GLCanvas.java:74)
      at net.java.games.jogl.Animator$1.run(Animator.java:104)
      at java.lang.Thread.run(Thread.java:534)

      An unexpected exception has been detected in native code outside the VM.
      Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at
      PC=0x693F21F6
      Function=[Unknown.]
      Library=G:\windows\System32\atioglxx.dll

      NOTE: We are unable to locate the function name symbol for the error
      just occurred. Please refer to release documentation for possible
      reason and solutions.

      Current Java thread:
      at
      net.java.games.jogl.impl.windows.WindowsGLImpl.dispatch_wglChoosePixelFormatARB
      (Native Method)
      at
      net.java.games.jogl.impl.windows.WindowsGLImpl.wglChoosePixelFormatARB
      (WindowsGLImpl.java:33092)
      at
      net.java.games.jogl.impl.windows.WindowsGLContext.choosePixelFormatAndCreateCont
      ext(WindowsGLContext.java:342

      The environment is:

      • JOGL nightly build dated 20040517
      • WinXP
      • ATI Radeon 9700 Pro, with 4.5 Catalyst drivers
      • J2SE 1.4.2_04

      Note: this issue probably somewhat overlaps with the existing issue #30.
      Here is the complete source code for the test case:

      — snip —
      import net.java.games.jogl.*;

      import javax.swing.*;

      public class GLCanvasTest
      implements GLEventListener
      {
      public static void main(String[] args)

      { new GLCanvasTest().test(); }

      public GLCanvasTest()
      {
      }

      public void test()

      { JFrame jFrame = new JFrame("Main Window"); jFrame.setSize(640, 480); jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JDesktopPane jDesktopPane = new JDesktopPane(); createChildWindow(jDesktopPane, "Child Window #1"); createChildWindow(jDesktopPane, "Child Window #2"); jFrame.setContentPane(jDesktopPane); jFrame.show(); }

      private JInternalFrame createChildWindow(JDesktopPane jDesktopPane, final
      String title)
      {
      final JInternalFrame jInternalFrame = new JInternalFrame(title, true,
      true, true, true);
      jInternalFrame.setSize(320, 200);
      jInternalFrame.setLocation(jDesktopPane.getAllFrames().length * 200,
      jDesktopPane.getAllFrames().length * 200);

      GLCapabilities glCaps = new GLCapabilities();
      glCaps.setDoubleBuffered(true);
      glCaps.setHardwareAccelerated(true);
      GLCapabilitiesChooser glCapsChooser = new DefaultGLCapabilitiesChooser
      ();

      GLCanvas glCanvas = GLDrawableFactory.getFactory().createGLCanvas
      (glCaps, glCapsChooser);
      glCanvas.addGLEventListener(this);

      jInternalFrame.getContentPane().add(glCanvas);
      jInternalFrame.show();
      jDesktopPane.add(jInternalFrame);

      final Animator animator = new Animator(glCanvas);
      new Thread()
      {
      public void run()
      {
      try

      { sleep(1000); }

      catch (InterruptedException ignored)
      {
      }
      animator.start();
      jInternalFrame.setTitle(title + ", started");
      }
      }.start();

      return jInternalFrame;
      }

      public void init(GLDrawable glDrawable)
      {
      }

      public void display(GLDrawable glDrawable)

      { GL gl = glDrawable.getGL(); gl.glClearColor((System.currentTimeMillis() % 1000) / 1000.0f, 0.0f, 0.0f, 0.0f); gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); }

      public void reshape(GLDrawable glDrawable, int i, int i1, int i2, int i3)
      {
      }

      public void displayChanged(GLDrawable glDrawable, boolean b, boolean b1)
      {
      }
      }
      — snip —

        Activity

        Hide
        kbr added a comment -

        This problem is caused by bugs in ATI's OpenGL drivers. The test case works on
        NVidia hardware. Bug fixes and additional workarounds have recently been checked
        in to the single-threaded workaround designed for ATI hardware. The attached
        test case works properly with the code in the CVS repository, which will be
        introduced in JOGL 1.1 b08.

        Show
        kbr added a comment - This problem is caused by bugs in ATI's OpenGL drivers. The test case works on NVidia hardware. Bug fixes and additional workarounds have recently been checked in to the single-threaded workaround designed for ATI hardware. The attached test case works properly with the code in the CVS repository, which will be introduced in JOGL 1.1 b08.

          People

          • Assignee:
            kbr
            Reporter:
            nikojn
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: