Hi, this is my second thread on the forums, and I am still a little new to JOGL :).
I discovered some odd crashes in my JOGL program, it was freezing when adding a lot of windows.
I found it had nothing to do with my program: The same thing happens with the following standard program:
package joglscreens;
import java.awt.Frame;
import javax.media.opengl.GLCanvas;
public class MainWindow extends javax.swing.JFrame {
public MainWindow() {
initComponents();
}
@SuppressWarnings("unchecked")
private void initComponents() {
...*auto generated code for the window*...
}
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
Frame F = new Frame();
F.setSize(400, 400);
F.add(new GLCanvas());
F.setVisible(true);
}
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new MainWindow().setVisible(true);
}
});
}
private javax.swing.JButton jButton2;
}
This program is a small window with 1 button, every time it is pressed it creates a new AWT frame and adds a GLCanvas to it.
Once you reach much above 50-60 windows, the entire program freezes without reason. Doesnt matter if I add more memory
with Xms… or Xmx… VM arguments, it freezes without any error message.
If I remove the GLCanvas from the window I can add hundreds of AWT windows no freezes.
http://yoda.reservoirselite.com/joglBug.png
I have the same problem on WinXp32, Win7-32 and Win7-64 ( I dont have other OSs installed atm )
I have tested with GTX260, HD4870 and Radeon X1600 mobile with the same results.
I am using the latest official sun JVM, and I’ve tried both 32 and 64bit JREs with the same result