Show Posts
|
|
Pages: [1]
|
|
2
|
Java Game APIs & Engines / JOGL Development / Why does this program crash jogl?
|
on: 2003-09-19 01:40:20
|
|
Try running this simple program. The code opens a window and draws a cube. Double clicking in the window is supposed to open up a 2nd frame showing an identical cube. Instead, it crashes the VM with an exception and EXCEPTION_ACCESS_VIOLATION from the graphic driver.
Could someone tell me why this doesn't work?
import java.awt.*; import java.awt.event.*;
import net.java.games.jogl.*; import net.java.games.jogl.util.GLUT;
public class Simple { public static void main(String[] args) {new Simple();} public Simple() { Frame frame = new Frame(); GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); canvas.addGLEventListener(new CubeRenderer()); frame.add(canvas); frame.setSize(300, 300); frame.show(); } static class CubeRenderer implements GLEventListener, MouseListener{ public void init(GLDrawable drawable) { GL gl = drawable.getGL(); gl.glClearColor(0,0,0,0); drawable.addMouseListener(this); } public void reshape(GLDrawable drawable, int x, int y, int width, int height) { GL gl = drawable.getGL(); gl.glViewport(x, y, width, height); gl.glMatrixMode(GL.GL_PROJECTION); gl.glLoadIdentity(); gl.glOrtho(-1,1,-1,1,-1,1); gl.glMatrixMode(GL.GL_MODELVIEW); }
public void display(GLDrawable drawable) { GL gl = drawable.getGL(); GLUT glut = new GLUT(); gl.glClear(GL.GL_COLOR_BUFFER_BIT); gl.glColor3d(1, .25, .75); gl.glLoadIdentity(); glut.glutSolidCube(gl, 1); } public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {} public void mouseEntered(MouseEvent e) {} public void mouseExited(MouseEvent e) {} public void mousePressed(MouseEvent e) { } public void mouseReleased(MouseEvent e) {} // Double Click to launch new window public void mouseClicked(MouseEvent e) {System.err.println("Double Clicking ..."); new Simple();} } }
***************** ouble Clicking ...
**************** Another exception has been detected while we were handling last error. Dumping information about last error: ERROR REPORT FILE = hs_err_pid2280.log PC = 0x69350594 SIGNAL = -1073741819 FUNCTION NAME = DrvSetContext OFFSET = 0xF0874 LIBRARY NAME = C:\WINDOWS\System32\atioglxx.dll Please check ERROR REPORT FILE for further information, if there is any. Good bye. An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x69350594 Function=DrvSetContext+0xF0874 Library=C:\WINDOWS\System32\atioglxx.dll
Current Java thread: at net.java.games.jogl.impl.windows.WGL.wglCreateContext(Native Method) at net.java.games.jogl.impl.windows.WindowsGLContext.choosePixelFormatAndCreateContext(WindowsGLContext.java:296) at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.create(WindowsOnscreenGLContext.java:204) at net.java.games.jogl.impl.windows.WindowsGLContext.makeCurrent(WindowsGLContext.java:117) - locked <0x100585f8> (a net.java.games.jogl.impl.windows.WindowsOnscreenGLContext) at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.makeCurrent(WindowsOnscreenGLContext.java:110) - locked <0x100585f8> (a net.java.games.jogl.impl.windows.WindowsOnscreenGLContext) at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:162) - locked <0x100585f8> (a net.java.games.jogl.impl.windows.WindowsOnscreenGLContext) at net.java.games.jogl.GLCanvas.reshape(GLCanvas.java:105) at java.awt.Component.setBounds(Unknown Source) at java.awt.BorderLayout.layoutContainer(Unknown Source) - locked <0x1050dee8> (a java.awt.Component$AWTTreeLock) at java.awt.Container.layout(Unknown Source) at java.awt.Container.doLayout(Unknown Source) at java.awt.Container.validateTree(Unknown Source) at java.awt.Container.validate(Unknown Source) - locked <0x1050dee8> (a java.awt.Component$AWTTreeLock) at java.awt.Window.show(Unknown Source) at JOGLstructuredArguments.Simple.<init>(Simple.java:18) at JOGLstructuredArguments.Simple$CubeRenderer.mouseClicked(Simple.java:53) at java.awt.Component.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)
Dynamic libraries: 0x00400000 - 0x00407000 C:\Program Files\Java\j2re1.4.2\bin\javaw.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 0x77D40000 - 0x77DC6000 C:\WINDOWS\system32\USER32.dll 0x77C70000 - 0x77CB0000 C:\WINDOWS\system32\GDI32.dll 0x77C10000 - 0x77C63000 C:\WINDOWS\system32\MSVCRT.dll 0x629C0000 - 0x629C8000 C:\WINDOWS\System32\LPK.DLL 0x72FA0000 - 0x72FFA000 C:\WINDOWS\System32\USP10.dll 0x08000000 - 0x08136000 C:\Program Files\Java\j2re1.4.2\bin\client\jvm.dll 0x76B40000 - 0x76B6C000 C:\WINDOWS\System32\WINMM.dll 0x10000000 - 0x10007000 C:\Program Files\Java\j2re1.4.2\bin\hpi.dll 0x00830000 - 0x0083E000 C:\Program Files\Java\j2re1.4.2\bin\verify.dll 0x00840000 - 0x00858000 C:\Program Files\Java\j2re1.4.2\bin\java.dll 0x00860000 - 0x0086D000 C:\Program Files\Java\j2re1.4.2\bin\zip.dll 0x02C50000 - 0x02D5A000 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 0x5AD70000 - 0x5ADA4000 C:\WINDOWS\System32\uxtheme.dll 0x02DD0000 - 0x02E20000 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 0x74720000 - 0x74764000 C:\WINDOWS\System32\MSCTF.dll 0x07100000 - 0x07105000 C:\Program Files\Java\j2re1.4.2\bin\jawt.dll 0x07110000 - 0x07186000 C:\Program Files\Java\j2re1.4.2\bin\jogl.dll 0x5ED00000 - 0x5EDC6000 C:\WINDOWS\System32\OPENGL32.dll 0x68B20000 - 0x68B3E000 C:\WINDOWS\System32\GLU32.dll 0x69000000 - 0x694AC000 C:\WINDOWS\System32\atioglxx.dll 0x67590000 - 0x67597000 C:\Program Files\Groove Networks\Groove\Bin\GrooveHooks.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 307K [0x10010000, 0x100b0000, 0x104f0000) eden space 512K, 57% used [0x10010000, 0x10059cb8, 0x10090000) from space 64K, 19% used [0x100a0000, 0x100a3310, 0x100b0000) to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000) tenured generation total 1408K, used 210K [0x104f0000, 0x10650000, 0x14010000) the space 1408K, 14% used [0x104f0000, 0x10524998, 0x10524a00, 0x10650000) compacting perm gen total 4096K, used 3991K [0x14010000, 0x14410000, 0x18010000) the space 4096K, 97% used [0x14010000, 0x143f5e40, 0x143f6000, 0x14410000)
Local Time = Thu Sep 18 20:36:32 2003 Elapsed Time = 2 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2-b28 mixed mode) # # An error report file has been saved as hs_err_pid2280.log. # Please refer to the file for further information. #
|
|
|
|
|
3
|
Java Game APIs & Engines / JOGL Development / An unexpected exception has been detected in nativ
|
on: 2003-09-18 17:49:56
|
|
The following pretty simple program blows up with an exception in the VM. All the code does is draw a cube and if you click in the window it opens another window with another cube.
Any idea how to get around this problem?
import java.awt.*; import java.awt.event.*;
import net.java.games.jogl.*; import net.java.games.jogl.util.GLUT;
public class Cube { public static void main(String[] args) { Cube c = new Cube(0, 0); } public Cube(int x, int y) { Frame frame = new Frame("Cube Demo"); GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); canvas.addGLEventListener(new CubeRenderer()); frame.add(canvas); frame.setSize(300, 300); frame.setLocation(new Point(x,y));
frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }); frame.show(); } static class CubeRenderer implements GLEventListener, MouseListener{ int x=0, y=0; public void init(GLDrawable drawable) { GL gl = drawable.getGL(); gl.glClearColor(0,0,0,0); drawable.addMouseListener(this); } public void reshape(GLDrawable drawable, int x, int y, int width, int height) { GLU glu = drawable.getGLU(); GL gl = drawable.getGL(); gl.glViewport(x, y, width, height); gl.glMatrixMode(GL.GL_PROJECTION); gl.glLoadIdentity(); if(width>height) gl.glOrtho(-(double)width/height, (double)width/height, -1, 1, -1, 1); else gl.glOrtho(-1, 1, -(double)height/width, (double)height/width, -1, 1);
gl.glMatrixMode(GL.GL_MODELVIEW); }
public void display(GLDrawable drawable) { GL gl = drawable.getGL(); GLUT glut = new GLUT(); gl.glClear(GL.GL_COLOR_BUFFER_BIT); gl.glColor3d(1, .25, .75);
gl.glPushMatrix(); glut.glutSolidCube(gl, 1); gl.glPopMatrix(); } public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {} public void mouseEntered(MouseEvent e) {} public void mouseExited(MouseEvent e) {} public void mousePressed(MouseEvent e) { } public void mouseReleased(MouseEvent e) {} public void mouseClicked(MouseEvent e) {new Cube(x+=100, y+=100);} } }
An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x69350594 Function=DrvSetContext+0xF0874 Library=C:\WINDOWS\System32\atioglxx.dll
Current Java thread: at net.java.games.jogl.impl.windows.WGL.wglCreateContext(Native Method) at net.java.games.jogl.impl.windows.WindowsGLContext.choosePixelFormatAndCreateContext(WindowsGLContext.java:296) at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.create(WindowsOnscreenGLContext.java:204) at net.java.games.jogl.impl.windows.WindowsGLContext.makeCurrent(WindowsGLContext.java:117) - locked <0x10058138> (a net.java.games.jogl.impl.windows.WindowsOnscreenGLContext) at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.makeCurrent(WindowsOnscreenGLContext.java:110) - locked <0x10058138> (a net.java.games.jogl.impl.windows.WindowsOnscreenGLContext) at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:162) - locked <0x10058138> (a net.java.games.jogl.impl.windows.WindowsOnscreenGLContext) at net.java.games.jogl.GLCanvas.reshape(GLCanvas.java:105) at java.awt.Component.setBounds(Unknown Source) at java.awt.BorderLayout.layoutContainer(Unknown Source) - locked <0x1050de98> (a java.awt.Component$AWTTreeLock) at java.awt.Container.layout(Unknown Source) at java.awt.Container.doLayout(Unknown Source) at java.awt.Container.validateTree(Unknown Source) at java.awt.Container.validate(Unknown Source) - locked <0x1050de98> (a java.awt.Component$AWTTreeLock) at java.awt.Window.show(Unknown Source) at JOGLstructuredArguments.Cube.<init>(Cube.java:28) at JOGLstructuredArguments.Cube$CubeRenderer.mouseClicked(Cube.java:73) at java.awt.Component.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)
Dynamic libraries: 0x00400000 - 0x00407000 C:\Program Files\Java\j2re1.4.2\bin\javaw.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 0x77D40000 - 0x77DC6000 C:\WINDOWS\system32\USER32.dll 0x77C70000 - 0x77CB0000 C:\WINDOWS\system32\GDI32.dll 0x77C10000 - 0x77C63000 C:\WINDOWS\system32\MSVCRT.dll 0x629C0000 - 0x629C8000 C:\WINDOWS\System32\LPK.DLL
|
|
|
|
|
5
|
Java Game APIs & Engines / JOGL Development / Surface already unlocked
|
on: 2003-09-10 20:11:39
|
|
In my mouse handling code I call drawable.display() to update my image. I'm getting a weird error about surface locking. Any ideas on what's going wrong?
net.java.games.jogl.GLException: Surface already unlocked at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.unlockSurface(WindowsOnscreenGLContext.java:192) at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.free(WindowsOnscreenGLContext.java:134) at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:203) at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:182) at net.java.games.jogl.GLCanvas.display(GLCanvas.java:82) at JOGLstructuredArguments.ArgTreeViewRenderer.mouseMoved(ArgTreeViewRenderer.java:524)
|
|
|
|
|
6
|
Java Game APIs & Engines / JOGL Development / repainting speed
|
on: 2003-09-09 20:25:53
|
|
The jogl user's guide suggests using GLDrawable.display() to cause a repaint. I find that calling the repaint method on my GLCanvas, e.g. glCanvas.repaint(), actually runs must faster.
Why is this?
|
|
|
|
|
11
|
Java Game APIs & Engines / JOGL Development / Re: jawt and jogl install
|
on: 2003-07-22 22:00:11
|
|
No, I'm still at the install step. Evidently jogl.dll uses jawt.dll as a dependent library. When I run the tiny program, it fails on loadLibrary("jogl") with error message that it cannot finddependent library "jawt".
I can't figure out why it doesn't find "jawt" It's a clean install of java.
|
|
|
|
|
12
|
Java Game APIs & Engines / JOGL Development / jawt and jogl install
|
on: 2003-07-22 21:29:51
|
|
I'm trying to install jogl on a xp machine. I put the two .dll files in windows/system32 and my tiny program comples correctly. When I run it I get an error: jawt.dll not found as it fails on the loadLibrary line.
Any suggestions? It's a clean install of the current java release.
import net.java.games.jogl.*; public class Simple { public static void main( String[] args ) { System.out.println( System.getProperty("java.library.path") ); System.loadLibrary("jogl"); System.err.println("***** jogl loaded ******"); } }
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|