JOGL crash on close window
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openjdk-6 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Using any JOGL sample code such as:
import java.awt.
import java.awt.
import java.io.
import java.io.
import javax.media.
import javax.media.
import javax.media.
import javax.media.
import javax.media.
import javax.media.
import javax.media.
import javax.swing.JFrame;
import com.sun.
@SuppressWarnin
public class JOGLViewer extends JFrame implements GLEventListener, KeyListener {
private static float t=0;
private static float deltaZ=0;
public JOGLViewer() throws IOException {
setLocation(900, 750);
setSize(320, 240);
setTitle("Jogl Viewer");
GLCanvas canvas = new GLCanvas(new GLCapabilities());
canvas.
getContent
//Create an Animator linked to the Canvas
Animator animator = new Animator(canvas);
animator.
addKeyList
}
/**
* Sets up the screen.
*
* @see javax.media.
*/
public void init(GLAutoDrawable drawable) {
drawable.
final GL gl = drawable.getGL();
gl.glShadeMod
gl.glClearCol
}
/**
* The only method that you should implement by yourself.
*
* @see javax.media.
*/
public void display(
final GL gl = drawable.getGL();
final GLU glu = new GLU();
gl.glClear(
gl.glRotatef(
t++;
gl.glPushMatr
{
//gl.
gl.glScalef(10, 10, 10);
}
gl.glPopMatrix();
}
/**
* Resizes the screen.
*
* @see javax.media.
* int, int, int, int)
*/
public void reshape(
final GL gl = drawable.getGL();
final GLU glu = new GLU();
}
/**
* Changing devices is not supported.
*
* @see javax.media.
* boolean, boolean)
*/
public void displayChanged(
throw new UnsupportedOper
}
public void keyPressed(KeyEvent e) {
if(e.
deltaZ+=0.05;
}
if(e.
deltaZ-=0.05;
}
}
public void keyReleased(
}
public void keyTyped(KeyEvent e) {
}
/**
* Starts the JOGL viewer.
*
* @param args
* Command line args.
*/
public final static void main(String[] args) throws IOException {
JOGLViewer viewer = new JOGLViewer();
viewer.
viewer.
}
}
Crashed the JVM on exit.
My Ubuntu is:
Description: Ubuntu 10.10
Release: 10.10
It was supposed to exit without crash.