LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: tails on November 23, 2003, 22:48:17

Title: error during the execution
Post by: tails on November 23, 2003, 22:48:17
Hello with all, I tried to compile my first program with lwjgl but I obtained an error during the execution (none during compilation).
My source code:  

import org.lwjgl.*;
import org.lwjgl.opengl.*;

public class Essai {

public static void main(String[] args) {
final float a=0;
try {
Window.create("Ma fenetre",50,50,800,600,16,0,8,0);
}
catch (Exception e){};
GL.glClearColor(a,a,a,a);
GL.glClear(GL.GL_COLOR_BUFFER_BIT);
GL.glColor3f(1,1,1);
GL.glOrtho(-1,1,-1,1,-1,1);
GL.glBegin(GL.GL_POLYGON);
GL.glVertex2f((float)-0.5,(float)-0.5);
GL.glVertex2f((float)-0.5,(float)0.5);
GL.glVertex2f((float)0.5,(float)0.5);
GL.glVertex2f((float)0.5,(float)-0.5);
GL.glEnd();
GL.glFlush();
for (int i=0;i<20000;i++) {
if (34*i==58*(i+2));
}
}
}


And the error message obtained:  

Loading required GL library /usr/X11R6/lib/libGL.so.1.2

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x0
Function=[Unknown.]
Library=(N/A)

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 org.lwjgl.opengl.CoreGL11.glClearColor(Native Method)
       at Essai.main(Essai.java:24)



Can you help me?
Thank you.

Bonne Journée.
Title: error during the execution
Post by: princec on November 23, 2003, 23:18:23
Evil boy! You are throwing away the exception:

try {
} catch (Exception e) {}

How do you know you've successfully created a window?

Cas :)
Title: error during the execution
Post by: tails on November 24, 2003, 17:06:14
I tested on Windows XP to see what arrived. The fenetre was created but there is always an error, this time I obtain:
NOTICE: OpenGL12 disabled because of missing driver symbolsFor launching I make:
java - Djava.library.path=C:\lwjgl-0.8 - CP C:\lwjgl-0.8\lwjgl.jar;  Test
What doesn't go?