Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (534)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Fullscreen DisplayList Crash  (Read 1431 times)
0 Members and 1 Guest are viewing this topic.
Offline lamster

Senior Newbie





« Posted 2003-09-20 09:08:15 »

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?

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
103  
104  
105  
106  
107  
108  
109  
110  
111  
112  
113  
114  
115  
116  
117  
118  
119  
120  
121  
122  
123  
124  
125  
126  
127  
128  
129  
130  
131  
132  
133  
134  
135  
136  
137  
138  
139  
140  
141  
142  
143  
144  
145  
146  
147  
148  
149  
150  
151  
152  
153  
154  
155  
156  
157  
158  
159  
160  
161  
162  
163  
164  
165  
166  
167  
168  
169  
170  
171  
172  
173  
174  
175  
176  
177  
178  
179  
180  
181  
182  
183  
184  
/*
 *  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:
[size=1]
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(TM) Client VM (1.4.2-b28 mixed mode)
#
[/size]
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

pw (35 views)
2014-07-24 01:59:36

Riven (33 views)
2014-07-23 21:16:32

Riven (21 views)
2014-07-23 21:07:15

Riven (24 views)
2014-07-23 20:56:16

ctomni231 (55 views)
2014-07-18 06:55:21

Zero Volt (47 views)
2014-07-17 23:47:54

danieldean (38 views)
2014-07-17 23:41:23

MustardPeter (43 views)
2014-07-16 23:30:00

Cero (59 views)
2014-07-16 00:42:17

Riven (56 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!