Fullscreen DisplayList Crash

I’m using the sept. 5 JOGL binaries on a Pentium 4 with a ‘MOBILITY RADEON 9000’ graphics card running Dell’s default laptop drivers and have run into native exceptions when trying to invoke a display list while in fullscreen mode.

If running in windowed mode, calling a display list works without a hitch.
And there are no problems when equivalent gl-calls are substituted for a glCallList while running in fullscreen mode.

However, attempting to glCallList while in fullscreen mode causes an immediate native exception.

Anyone run into similar problems, or is this crash specific to my card+driver? Anyone know a workaround?


/*
 *  Testing JOGL Fullscreen Display-List Crash Bug
 *   Using my Pentium 4/Mobility Radeon 9000 Laptop:
 *    When in fullscreen mode, any attempt to call a 
 *    display list causes an immediate native exception.
 *    If not in fullscreen mode, or equivalent gl calls
 *    not from a display list are used, no error occurs.
 **********************************************************/

import java.awt.*;
import java.awt.event.*;

import net.java.games.jogl.*;

public final class BugTest extends Frame implements GLEventListener, KeyListener
{
      private boolean fullscreenEnabled;
      private boolean fullscreen;

      private GraphicsDevice gd;
      private GraphicsConfiguration gc;
      private DisplayMode old_mode;
      private DisplayMode dm;

      // JOGL:
      private GL gl;
      private GLU glu;
      private GLCanvas canvas;
      private Animator animator;

      // TESTING: if both true, my p4/Mobility Radeon 9000 crashes, otherwise, no problems
      private static boolean openFullScreen;
      private static boolean useDisplayList;
      
      public static void main( String[] args )
      {
            openFullScreen = args.length < 1 || args[0].equals("y");
            useDisplayList = args.length < 2 || args[1].equals("y");
            
            System.out.println( "open fullscreen  = "+openFullScreen );
            System.out.println( "use display list = "+useDisplayList );
      
            BugTest test = new BugTest( openFullScreen );
            test.show();
      }

      public BugTest( boolean fs )
      {
            super( "Fullscreen DisplayList Crash Bug" );

            GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas( new GLCapabilities() );
            canvas.setSize( 640, 480 );
            canvas.setIgnoreRepaint( true );
            canvas.addGLEventListener( this );
            add( canvas );
            animator = new Animator( canvas );

            addKeyListener( this );
            addWindowListener( new WindowAdapter(){
                        public void windowClosing( WindowEvent e )
                        {
                              close();
                              System.exit( 0 );
                        }
                  });

            gc = getGraphicsConfiguration();
            gd = gc.getDevice();

            old_mode = gd.getDisplayMode();
            dm = new DisplayMode( 640, 480, old_mode.getBitDepth(), old_mode.getRefreshRate() );

            fullscreenEnabled = ( dm != null && gd.isFullScreenSupported() );

            setIgnoreRepaint( true );
            setResizable( false );

            if( fullscreenEnabled && fs )
                  openFullScreen();
            else
                  openWindowed();

            animator.start();
      }

      public final void openFullScreen()
      {
            System.out.println( "Entering full screen mode" );
            fullscreen = true;

            setUndecorated( true );
            gd.setFullScreenWindow( this );
            gd.setDisplayMode( dm );
      }

      public final void openWindowed()
      {
            System.out.println( "Entering windowed mode" );
            fullscreen = false;

            setUndecorated( false );

            pack();
            Insets insets = getInsets();
            int w = 640+insets.left+insets.right;
            int h = 480+insets.top+insets.bottom;
            setSize( w, h );

            Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
            setLocation( (screenSize.width-w)/2, (screenSize.height-h)/2 );
            show();
      }

      public final void close()
      {
            animator.stop();
      }

      // GLEventListener:
      public void init( GLDrawable drawable )
      {
            gl = drawable.getGL();
            glu = drawable.getGLU();
            
            drawable.addKeyListener( this );
            
            compileDisplayList();
      }
      public void reshape( GLDrawable drawable, int x, int y, int width, int height )
      {
            gl.glViewport( 0, 0, width, height );

            gl.glMatrixMode( GL.GL_PROJECTION );

            gl.glLoadIdentity();

            // java-style display coordinates, (0,0) is top left
            glu.gluOrtho2D( 0, 640, 480, 0 );

            gl.glMatrixMode( GL.GL_MODELVIEW );
      }
      // Not implemented yet?
      public void displayChanged( GLDrawable arg0, boolean arg1, boolean arg2 ) { }

      public void display( GLDrawable drawable )
      {
            gl.glClear( GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT );
            
            if( useDisplayList )
                  gl.glCallList( 1 );
            else
                  drawQuad();
      }

      public void compileDisplayList()
      {
            gl.glNewList( 1, GL.GL_COMPILE );
                  drawQuad();
            gl.glEndList();
      }

      public void drawQuad()
      {
            gl.glColor3f( 0.0f, 1.0f, 0.0f );
            gl.glBegin( GL.GL_QUADS );
                  gl.glVertex2i( 100, 100 );
                  gl.glVertex2i( 200, 100 );
                  gl.glVertex2i( 200, 200 );
                  gl.glVertex2i( 100, 200 );
            gl.glEnd();
      }
      
      // KeyListener:
      public final void keyTyped( KeyEvent e ){}
      public final void keyPressed( KeyEvent e )
      {
            if( e.getKeyCode() == KeyEvent.VK_ESCAPE )
            {
                  close();
                  System.exit( 0 );
            }
      }
      public final void keyReleased( KeyEvent e ){}
}

And an example error report:

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x69075DDD
Function=[Unknown.]
Library=c:\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.glCallList(Native Method)
at BugTest.display(BugTest.java:150)
at net.java.games.jogl.impl.GLDrawableHelper.display(GLDrawableHelper.java:74)
at net.java.games.jogl.GLCanvas$DisplayAction.run(GLCanvas.java:194)
at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:192)
- locked <0x100a0cd0> (a net.java.games.jogl.impl.windows.WindowsOnscreenGLContext)
at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:182)
at net.java.games.jogl.GLCanvas.display(GLCanvas.java:82)
at net.java.games.jogl.Animator$1.run(Animator.java:104)
at java.lang.Thread.run(Unknown Source)

Dynamic libraries:
0x00400000 - 0x00406000 c:\WINDOWS\system32\java.exe
0x77F50000 - 0x77FF7000 C:\WINDOWS\System32\ntdll.dll
0x77E60000 - 0x77F46000 C:\WINDOWS\system32\kernel32.dll
0x77DD0000 - 0x77E5D000 C:\WINDOWS\system32\ADVAPI32.dll
0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll
0x77C10000 - 0x77C63000 C:\WINDOWS\system32\MSVCRT.dll
0x08000000 - 0x08136000 C:\Program Files\Java\j2re1.4.2\bin\client\jvm.dll
0x77D40000 - 0x77DC6000 C:\WINDOWS\system32\USER32.dll
0x77C70000 - 0x77CB0000 C:\WINDOWS\system32\GDI32.dll
0x76B40000 - 0x76B6C000 c:\WINDOWS\system32\WINMM.dll
0x10000000 - 0x10007000 C:\Program Files\Java\j2re1.4.2\bin\hpi.dll
0x00390000 - 0x0039E000 C:\Program Files\Java\j2re1.4.2\bin\verify.dll
0x003A0000 - 0x003B8000 C:\Program Files\Java\j2re1.4.2\bin\java.dll
0x003C0000 - 0x003CD000 C:\Program Files\Java\j2re1.4.2\bin\zip.dll
0x02C60000 - 0x02D6A000 C:\Program Files\Java\j2re1.4.2\bin\awt.dll
0x73000000 - 0x73023000 c:\WINDOWS\system32\WINSPOOL.DRV
0x76390000 - 0x763AC000 c:\WINDOWS\system32\IMM32.dll
0x771B0000 - 0x772D1000 C:\WINDOWS\system32\ole32.dll
0x02F70000 - 0x02FC0000 C:\Program Files\Java\j2re1.4.2\bin\fontmanager.dll
0x51000000 - 0x51047000 c:\WINDOWS\system32\ddraw.dll
0x73BC0000 - 0x73BC6000 c:\WINDOWS\system32\DCIMAN32.dll
0x5C000000 - 0x5C0C8000 c:\WINDOWS\system32\D3DIM700.DLL
0x07050000 - 0x07057000 C:\Program Files\Logitech\MouseWare\System\LgWndHk.dll
0x07060000 - 0x07065000 C:\Program Files\Java\j2re1.4.2\bin\jawt.dll
0x07070000 - 0x070F5000 C:\erik\dev\ogl\simple\jogl.dll
0x5ED00000 - 0x5EDC6000 c:\WINDOWS\system32\OPENGL32.DLL
0x68B20000 - 0x68B3E000 c:\WINDOWS\system32\GLU32.dll
0x071A0000 - 0x071A6000 C:\Program Files\Strokeit\mhook.dll
0x071B0000 - 0x071BB000 C:\Program Files\Common Files\Logitech\Scrolling\LgMsgHk.dll
0x55900000 - 0x55961000 C:\WINDOWS\System32\MSVCP60.dll
0x69000000 - 0x6949A000 c:\WINDOWS\system32\atioglxx.dll
0x76C90000 - 0x76CB2000 C:\WINDOWS\system32\imagehlp.dll
0x6D510000 - 0x6D58D000 C:\WINDOWS\system32\DBGHELP.dll
0x77C00000 - 0x77C07000 C:\WINDOWS\system32\VERSION.dll
0x76BF0000 - 0x76BFB000 c:\WINDOWS\system32\PSAPI.DLL

Heap at VM Abort:
Heap
def new generation total 576K, used 381K [0x10010000, 0x100b0000, 0x104f0000)
eden space 512K, 73% used [0x10010000, 0x1006e550, 0x10090000)
from space 64K, 6% used [0x100a0000, 0x100a1140, 0x100b0000)
to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000)
tenured generation total 1408K, used 366K [0x104f0000, 0x10650000, 0x14010000)
the space 1408K, 26% used [0x104f0000, 0x1054bbe0, 0x1054bc00, 0x10650000)
compacting perm gen total 4352K, used 4112K [0x14010000, 0x14450000, 0x18010000)
the space 4352K, 94% used [0x14010000, 0x144143d0, 0x14414400, 0x14450000)

Local Time = Sat Sep 20 03:03:04 2003
Elapsed Time = 3

The exception above was detected in native code outside the VM

Java VM: Java HotSpot™ Client VM (1.4.2-b28 mixed mode)