Login  Register

Crashing with GLCanvas, need help

Posted by bardackx on Feb 26, 2011; 1:29am
URL: https://forum.jogamp.org/Crashing-with-GLCanvas-need-help-tp2579645.html

I am using jogl-2.0-b327-20110225-windows-i586

package gldemo;

import java.awt.BorderLayout;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLProfile;
import javax.media.opengl.awt.GLCanvas;
import javax.swing.JFrame;

public class Main {

    public static void main(String[] args) {
        GLProfile.initSingleton(true);
        GLProfile profile = GLProfile.getDefault();
        GLCapabilities capabilities = new GLCapabilities(profile);
        GLCanvas canvas = new GLCanvas(capabilities);

        JFrame frame = new JFrame();
        frame.setSize(320, 240);
        frame.setVisible(true);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        // Crash here
        frame.getContentPane().add(canvas, BorderLayout.CENTER);
    }
}

That´s my code, it generates a log file :

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x69b5c430, pid=188, tid=3256
#
# JRE version: 6.0_22-b04
# Java VM: Java HotSpot(TM) Client VM (17.1-b03 mixed mode, sharing windows-x86 )
# Problematic frame:
# C  [nvoglv32.DLL+0x65c430]
#
# An error report file with more information is saved as:
# C:\Users\Gus7\Documents\NetBeansProjects\GLDemo\hs_err_pid188.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

Can you help me, this code used to work