LWJGL 0.9 has been released.
http://www.lwjgl.org/
stuff changed from 0.89 of the top of my head:
* bug fixes
* setGrabbed support for grabbing cursor, or showing OS cursor
* Software OpenGL support via flag (mental note, document these)
* win32 cursor animation (still only 1 bit cursor transparency on win32, will fix soon)
* input now accumulates over multiple Window.updates
* more extensions
* automatic read of input, now you only need to call Window.update
One gotcha, due to the accumelated delta's on devices, you can only call getD* once. A second call will return 0, untill the device has actually moved.
more comments to come, perhaps :)
ps. due to a small f*ckup, the Version string is still 0.9pre. This isn't a biggie, and would require a full recompile on all platforms, which I am not in the mood for, so I'll let it slip.
GL/AL changes include splitting each extension out into separate classes, like ARBVertexProgram instead of the usual GL. This works the same way as the core GL which is split into GL11/GL12/GL13/GL14/GL15. This was probably in 0.89 too, but it's still important to note in order to hinder confusion...
- elias
Have a look at opengl.org's headlines :D
w00t, I posted it last night :)
Request: More helpful messages in BufferOverflowExceptions. Example, from GL11.java:
public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ByteBuffer pixels) {
if (pixels.remaining() < BufferChecks.calculateImageStorage(format, type, width, height, 1)) {
throw new BufferOverflowException();
}
nglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels, pixels.position());
}
There are a huge number of blocks almost identical to this one. Maybe they should be refactored together and given a nicely formatted exception message?
Most annoyingly BufferOverflowException doesn't have a String constructor for an error message :( Sorry.
Cas :)
Wha...? *blink* What a bunch of muppets! :x
That's the second time this week I've cursed the ground the Sun engineers walk on. (The first time was for the entire java.awt.imaging API.)
Sigh...
Well, as you're already limited to >= 1.4 you could use a chained runtime exception to get a more user friendly error message:
throw new RuntimeException("BLABLABLA", new BufferOverflowException());
Which will first print the error message and then the cause (bufferoverflow in this case)
How about an IllegalArgumentException as it is done in BufferChecks.java already?
- elias
Yeah, seems a bit cleaner than a chained exception.
Cas :)
yep, even better :oops:
I think I've found a bug in gluBuild2DMipmaps. I get artifacts when I use non power of two textures.
I'll investigate further and post a fix if I find the bug.
Found it. The scaling algo was only designed to sale images down not up. Here is the fix. It's to class org.lwjgl.opengl.glu.MipMap, line 219:
for (int iy = 0; iy < heightOut; iy++) {
for (int ix = 0; ix < widthOut; ix++) {
int x0 = (int) (ix * sx);
int x1 = (int) ((ix + 1) * sx);
int y0 = (int) (iy * sy);
int y1 = (int) ((iy + 1) * sy);
int readPix = 0;
// reset weighted pixel
for (int ic = 0; ic < components; ic++) {
c[ic] = 0;
}
// create weighted pixel
for (int ix0 = x0; ix0 < x1; ix0++) {
for (int iy0 = y0; iy0 < y1; iy0++) {
src = (iy0 * widthIn + ix0) * components;
for (int ic = 0; ic < components; ic++) {
c[ic] += tempin[src + ic];
}
readPix++;
}
}
// store weighted pixel
dst = (iy * widthOut + ix) * components;
if (readPix == 0) {
// BUGFIX: Image is sized up, caused by non power of two texture as input
src = (y0 * widthIn + x0) * components;
for (int ic = 0; ic < components; ic++) {
tempout[dst++] = tempin[src + ic];
}
} else {
for (k = 0; k < components; k++) {
tempout[dst++] = c[k] / readPix;
}
}
}
}
Another possible bug in gluBuild2DMipmaps. The following code causes a
java.lang.IndexOutOfBoundsException in org.lwjgl.opengl.glu.MipMap.gluScaleImage.
public class GLUMipMap {
public static void main(String args[]) {
try {
org.lwjgl.opengl.Window.create("", 600, 0, 40, 40, 1, 0, 16, 0);
int width = 383;
int height = 226;
ByteBuffer buf = ByteBuffer.allocateDirect(width*height*3);
IntBuffer intBuf = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer();
GL11.glGenTextures(intBuf);
GL11.glBindTexture(GL11.GL_TEXTURE_2D, intBuf.get(0));
int error = GLU.gluBuild2DMipmaps(GL11.GL_TEXTURE_2D, GL11.GL_RGB, width, height, GL11.GL_RGB, GL11.GL_UNSIGNED_BYTE, buf);
} catch (Throwable t) {
t.printStackTrace();
} finally {
org.lwjgl.opengl.Window.destroy();
}
}
}
The problem has got something to do with PixelStoreState as the rowstride do not match imagewidth*3. It works in the old GLU so I think it's a bug.
regarding GLU, I am sure erikd will pop in - he did the basic GLU port from native to java.
We changed from requiring native GLU to a java GLU implementation - certain to be some bugs to iron out :)
The IndexOutOfBoundsException was my fault. Did not know I had to set GL_UNPACK_XXX properties before calling gluBuild2DMipmaps :oops:
I dug up the mesa source and ported the bilerp upscale filter. Here is the source:
if (sx < 1.0 && sy < 1.0) {
// magnify both width and height: use weighted sample of 4 pixels
for (i = 0; i < heightOut; i++) {
int i0 = (int) (i * sy);
int i1 = i0 + 1;
if (i1 >= heightIn) {
i1 = heightIn - 1;
}
// i1 = (i+1) * sy - EPSILON;
float alpha = i * sy - i0;
for (j = 0; j < widthOut; j++) {
int j0 = (int) (j * sx);
int j1 = j0 + 1;
if (j1 >= widthIn) {
j1 = widthIn - 1;
}
// j1 = (j+1) * sx - EPSILON;
float beta = j * sx - j0;
// compute weighted average of pixels in rect (i0,j0)-(i1,j1)
int src00 = (i0 * widthIn + j0) * components;
int src01 = (i0 * widthIn + j1) * components;
int src10 = (i1 * widthIn + j0) * components;
int src11 = (i1 * widthIn + j1) * components;
int dst = Math.max(0, (i * widthOut + j) * components - 3);
for (k = 0; k < components; k++) {
float s1 = tempin[src00++] * (1.0f - beta) + tempin[src01++] * beta;
float s2 = tempin[src10++] * (1.0f - beta) + tempin[src11++] * beta;
tempout[dst++] = s1 * (1.0f - alpha) + s2 * alpha;
}
}
}
} else {
// shrink width and/or height: use an unweighted box filter
for (i = 0; i < heightOut; i++) {
int i0 = (int) (i * sy);
int i1 = i0 + 1;
if (i1 >= heightIn) {
i1 = heightIn - 1;
}
// i1 = (i+1) * sy - EPSILON;
for (j = 0; j < widthOut; j++) {
int j0 = (int) (j * sx);
int j1 = j0 + 1;
if (j1 >= widthIn) {
j1 = widthIn - 1;
}
// j1 = (j+1) * sx - EPSILON;
int dst = (i * widthOut + j) * components;
// compute average of pixels in the rectangle (i0,j0)-(i1,j1)
for (k = 0; k < components; k++) {
float sum = 0.0f;
for (int ii = i0; ii <= i1; ii++) {
for (int jj = j0; jj <= j1; jj++) {
sum += tempin[(ii * widthIn + jj)* components + k];
}
}
sum /= (j1 - j0 + 1) * (i1 - i0 + 1);
tempout[dst++] = sum;
}
}
}
}
great, too bad we can't use it :(
We looked at mesa first, but decided not to use it. Instead we rely on the GLU sample implementation by Sillicon Graphics:
http://oss.sgi.com/projects/ogl-sample/
The reason for this is that mesa is lgpl, which would get us into serious trouble, wrt licensing.
You might want to check with erikd, since he might already be looking at it (had some dev issues with cvs though)...
Testing the new release on my comp. (gentoo linux, kernel 2.6).
I have a gravis gamepad pro (gameport with snd_ens1371 "driver") and ControllerCreationTest crashes, ControllerTest just doesn't work.
Other than that I like the new version :)
ControllerCreationTest (tested with 1.5 beta, blackdown 1.4.1, sun 1.4.2)
=========== WINDOWED MODE ==============
Test 1:
Please move the controller around....thank you
Test 2:
Please move the controller around....thank you
Destroying display...success
Entering fullscreen mode...
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x4C4BCB9D
Function=(null)+0x4C4BCB9D
Library=/usr/X11R6/lib/libGL.so.1
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.Window.nCreate(Native Method)
at org.lwjgl.opengl.Window.createWindow(Unknown Source)
at org.lwjgl.opengl.Window.create(Unknown Source)
at org.lwjgl.test.input.ControllerCreationTest.initialize(Unknown Source)
at org.lwjgl.test.input.ControllerCreationTest.executeTest(Unknown Source)
at org.lwjgl.test.input.ControllerCreationTest.main(Unknown Source)
What resolution is the ControllerCreationTest switching to and do you have it in your XConf? (had this problem before when switchign to full screen :()
Is the gamepad working in other apps?
I can't reproduce this (SUSE 9, nvidia proprietary drivers). Which glx drivers do you have? Are you able to track exactly where the crash occures at the native side (Window.nCreate)?
NOTE: Controller is not implemented in linux...
- elias
ControllerCreationTest:
for (int i = 0; i < modes.length; i++) {
if (modes[i].width == 640
&& modes[i].height == 480
&& modes[i].bpp >= 16) {
displayMode = modes[i];
break;
}
}
try {
if(fullscreen) {
Display.setDisplayMode(displayMode);
Window.create("ControllerCreationTest", 16, 0, 0, 0, 0);
} else {
Window.create("ControllerCreationTest", 50, 50, 640, 480, 16, 0, 0, 0, 0
);
}
XF86Config:
...
# Load opengl
Load "glx"
...
Section "Monitor"
Identifier "Monitor0"
VendorName "SAM"
ModelName "SAM38d7"
HorizSync 30 - 96 # DDC-probed
VertRefresh 50 - 160 # DDC-probed
... lots of mode lines
EndSection
...
Section "Device"
Identifier "Generic VGA"
Driver "nvidia"
...
Section "Screen"
Identifier "Screen 1"
Device "Generic VGA"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1024x768_100" "800x600" "640x480"
ViewPort 0 0
EndSubsection
SubSection "Display"
Depth 16
Modes "640x480"
EndSubSection
EndSection
lsmod:
Module Size Used by
nvidia 2069512 12
ohci_hcd 17156 0
uhci_hcd 29968 0
via_agp 6016 1
agpgart 28328 2 via_agp
8139cp 16384 0
8139too 20736 0
mii 4224 2 8139cp,8139too
snd_seq_midi 6688 0
snd_ens1371 21344 0
snd_rawmidi 20640 2 snd_seq_midi,snd_ens1371
snd_ac97_codec 61700 1 snd_ens1371
snd_seq_oss 32384 0
snd_seq_midi_event 6528 2 snd_seq_midi,snd_seq_oss
snd_seq 51856 5 snd_seq_midi,snd_seq_oss,snd_seq_midi_event
snd_seq_device 6792 4 snd_seq_midi,snd_rawmidi,snd_seq_oss,snd_seq
snd_pcm_oss 49444 0
snd_pcm 85796 2 snd_ens1371,snd_pcm_oss
snd_page_alloc 9220 1 snd_pcm
snd_timer 21892 2 snd_seq,snd_pcm
snd_mixer_oss 17664 1 snd_pcm_oss
snd 47716 12 snd_seq_midi,snd_ens1371,snd_rawmidi,snd_ac97_codec,snd_seq_oss,snd_seq_midi_event,snd_seq,snd_seq_device,snd_pcm_oss,snd_pcm,snd_timer,snd_mixer_oss
vfat 12672 5
fat 41280 1 vfat
grip 6272 0
gameport 3840 2 snd_ens1371,grip
joydev 8768 0
usb_storage 26880 0
hid 41792 0
ehci_hcd 24324 0
usbcore 92252 7 ohci_hcd,uhci_hcd,usb_storage,hid,ehci_hcd
The gamepad is working in epsxe and cat /dev/input/js0 works as expected
Error file:
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# SIGSEGV (0xb) at pc=0x4dc25b9d, pid=18104, tid=16384
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0-beta-b32c mixed mode)
# Problematic frame:
# C [libGL.so.1+0x24b9d]
#
--------------- T H R E A D ---------------
Current thread (0x0805b878): JavaThread "main" [_thread_in_native, id=18104]
siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x00000034
Registers:
EAX=0x4da238e0, EBX=0x00000000, ECX=0x4da2254c, EDX=0x00000000
ESP=0xbfffcd90, EBP=0xbfffce84, ESI=0x081ec2e8, EDI=0x00000000
EIP=0x4dc25b9d, CR2=0x00000034, EFLAGS=0x00210246
Top of Stack: (sp=0xbfffcd90)
0xbfffcd90: 4da2254c 081ec2e8 4dc1e59f 081ec2e8
0xbfffcda0: 4da2254c 081871e8 08118878 bfffce84
0xbfffcdb0: 02400003 bfffce34 4da0a4c2 081ec2e8
0xbfffcdc0: 00000001 00000000 bfffcddc 00000050
0xbfffcdd0: 00000190 02400003 01000018 4dc244b1
0xbfffcde0: ff000000 08118878 081188a0 00000001
0xbfffcdf0: 0000000a 00000001 00000001 0817d580
0xbfffce00: 0818bcb8 0023804f 0805b934 00000001
Instructions: (pc=0x4dc25b9d)
0x4dc25b8d: 00 c3 90 56 53 8b 74 24 0c 65 8b 1d 18 00 00 00
0x4dc25b9d: 83 7b 34 00 74 1d 8b 43 04 50 53 e8 77 01 00 00
Stack: [0xbfe01000,0xc0000000), sp=0xbfffcd90, free space=2031k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libGL.so.1+0x24b9d]
C [liblwjgl.so+0x20f40] Java_org_lwjgl_opengl_Window_nCreate+0xe0
j org.lwjgl.opengl.Window.nCreate(Ljava/lang/String;IIIIZIIIII)V+0
j org.lwjgl.opengl.Window.createWindow(IIIII)V+24
j org.lwjgl.opengl.Window.create(Ljava/lang/String;IIIII)V+51
j org.lwjgl.test.input.ControllerCreationTest.initialize(Z)V+82
j org.lwjgl.test.input.ControllerCreationTest.executeTest()V+110
j org.lwjgl.test.input.ControllerCreationTest.main([Ljava/lang/String;)V+9
v ~StubRoutines::call_stub
V [libjvm.so+0x163e3c]
V [libjvm.so+0x2a8dd8]
V [libjvm.so+0x163c6f]
V [libjvm.so+0x185552]
V [libjvm.so+0x17a6d8]
C [java+0x17d6]
C [libc.so.6+0x15c9b] __libc_start_main+0xcb
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j org.lwjgl.opengl.Window.nCreate(Ljava/lang/String;IIIIZIIIII)V+0
j org.lwjgl.opengl.Window.createWindow(IIIII)V+24
j org.lwjgl.opengl.Window.create(Ljava/lang/String;IIIII)V+51
j org.lwjgl.test.input.ControllerCreationTest.initialize(Z)V+82
j org.lwjgl.test.input.ControllerCreationTest.executeTest()V+110
j org.lwjgl.test.input.ControllerCreationTest.main([Ljava/lang/String;)V+9
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x080c90b8 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=18111]
0x080c7d40 JavaThread "CompilerThread0" daemon [_thread_blocked, id=18110]
0x080c6ed8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=18109]
0x080bc9a0 JavaThread "Finalizer" daemon [_thread_blocked, id=18108]
0x080bbc10 JavaThread "Reference Handler" daemon [_thread_blocked, id=18107]
=>0x0805b878 JavaThread "main" [_thread_in_native, id=18104]
Other Threads:
0x080b72b0 VMThread [id=18106]
0x080ca3a0 WatcherThread [id=18112]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 576K, used 479K [0x45820000, 0x458c0000, 0x45d00000)
eden space 512K, 81% used [0x45820000, 0x45887d28, 0x458a0000)
from space 64K, 100% used [0x458b0000, 0x458c0000, 0x458c0000)
to space 64K, 0% used [0x458a0000, 0x458a0000, 0x458b0000)
tenured generation total 1408K, used 62K [0x45d00000, 0x45e60000, 0x49820000)
the space 1408K, 4% used [0x45d00000, 0x45d0f8a0, 0x45d0fa00, 0x45e60000)
compacting perm gen total 8192K, used 2180K [0x49820000, 0x4a020000, 0x4d820000)
the space 8192K, 26% used [0x49820000, 0x49a41190, 0x49a41200, 0x4a020000)
No shared spaces configured.
Dynamic libraries:
08048000-08056000 r-xp 00000000 03:0a 265159 /opt/sun-jdk-1.5.0_beta1/bin/java
08056000-08058000 rw-p 0000d000 03:0a 265159 /opt/sun-jdk-1.5.0_beta1/bin/java
08058000-081f9000 rwxp 00000000 00:00 0
40000000-40013000 r-xp 00000000 03:0a 134569 /lib/ld-2.3.2.so
40013000-40014000 rw-p 00013000 03:0a 134569 /lib/ld-2.3.2.so
40025000-40026000 rw-p 00000000 00:00 0
40026000-40033000 r-xp 00000000 03:0a 134407 /lib/libpthread-0.10.so
40033000-40034000 rw-p 0000d000 03:0a 134407 /lib/libpthread-0.10.so
40034000-40076000 rw-p 00000000 00:00 0
40076000-40078000 r-xp 00000000 03:0a 134570 /lib/libdl-2.3.2.so
40078000-40079000 rw-p 00001000 03:0a 134570 /lib/libdl-2.3.2.so
40079000-401a2000 r-xp 00000000 03:0a 134426 /lib/libc-2.3.2.so
401a2000-401a5000 rw-p 00129000 03:0a 134426 /lib/libc-2.3.2.so
401a5000-401a8000 rw-p 00000000 00:00 0
401a8000-40519000 r-xp 00000000 03:0a 272400 /opt/sun-jdk-1.5.0_beta1/jre/lib/i386/client/libjvm.so
40519000-40537000 rw-p 00370000 03:0a 272400 /opt/sun-jdk-1.5.0_beta1/jre/lib/i386/client/libjvm.so
40537000-4094b000 rw-p 00000000 00:00 0
4095c000-4097d000 r-xp 00000000 03:0a 134568 /lib/libm-2.3.2.so
4097d000-4097e000 rw-p 00020000 03:0a 134568 /lib/libm-2.3.2.so
4097e000-4097f000 r--p 00000000 00:00 0
4097f000-40986000 r-xp 00000000 03:0a 272374 /opt/sun-jdk-1.5.0_beta1/jre/lib/i386/native_threads/libhpi.so
40986000-40987000 rw-p 00006000 03:0a 272374 /opt/sun-jdk-1.5.0_beta1/jre/lib/i386/native_threads/libhpi.so
40998000-409aa000 r-xp 00000000 03:0a 134425 /lib/libnsl-2.3.2.so
409aa000-409ab000 rw-p 00011000 03:0a 134425 /lib/libnsl-2.3.2.so
409ab000-409ad000 rw-p 00000000 00:00 0
409be000-409c5000 r-xp 00000000 03:0a 131941 /lib/libnss_compat-2.3.2.so
409c5000-409c6000 rw-p 00006000 03:0a 131941 /lib/libnss_compat-2.3.2.so
409c6000-409ce000 r-xp 00000000 03:0a 134440 /lib/libnss_nis-2.3.2.so
409ce000-409cf000 rw-p 00007000 03:0a 134440 /lib/libnss_nis-2.3.2.so
409cf000-409d7000 r-xp 00000000 03:0a 134261 /lib/libnss_files-2.3.2.so
409d7000-409d8000 rw-p 00008000 03:0a 134261 /lib/libnss_files-2.3.2.so
409d8000-409dc000 rw-s 00000000 03:0a 1309683 /tmp/hsperfdata_anders/18104
409dc000-409e7000 r-xp 00000000 03:0a 268537 /opt/sun-jdk-1.5.0_beta1/jre/lib/i386/libverify.so
409e7000-409e8000 rw-p 0000b000 03:0a 268537 /opt/sun-jdk-1.5.0_beta1/jre/lib/i386/libverify.so
409e8000-40a08000 r-xp 00000000 03:0a 272433 /opt/sun-jdk-1.5.0_beta1/jre/lib/i386/libjava.so
40a08000-40a0a000 rw-p 0001f000 03:0a 272433 /opt/sun-jdk-1.5.0_beta1/jre/lib/i386/libjava.so
40a0a000-40a1d000 r-xp 00000000 03:0a 272364 /opt/sun-jdk-1.5.0_beta1/jre/lib/i386/libzip.so
40a1d000-40a1f000 rw-p 00012000 03:0a 272364 /opt/sun-jdk-1.5.0_beta1/jre/lib/i386/libzip.so
40a1f000-42e31000 r--s 00000000 03:0a 271169 /opt/sun-jdk-1.5.0_beta1/jre/lib/rt.jar
42e31000-42ec6000 rw-p 00000000 00:00 0
42ec6000-42f46000 r--s 00000000 03:0a 270798 /opt/sun-jdk-1.5.0_beta1/jre/lib/jsse.jar
42f46000-42f5a000 r--s 00000000 03:0a 271272 /opt/sun-jdk-1.5.0_beta1/jre/lib/jce.jar
42f5a000-43793000 r--s 00000000 03:0a 271167 /opt/sun-jdk-1.5.0_beta1/jre/lib/charsets.jar
43793000-43823000 rwxp 00000000 00:00 0
43823000-45793000 rwxp 00090000 00:00 0
45793000-45796000 rwxp 00000000 00:00 0
45796000-45813000 rwxp 02003000 00:00 0
45820000-458c0000 rwxp 00000000 00:00 0
458c0000-45d00000 rwxp 0212d000 00:00 0
45d00000-45e60000 rwxp 00000000 00:00 0
45e60000-49820000 rwxp 026cd000 00:00 0
49820000-4a020000 rwxp 00000000 00:00 0
4a020000-4d820000 rwxp 0688d000 00:00 0
4d820000-4d821000 rwxp 00000000 00:00 0
4d821000-4d822000 rwxp 0a08e000 00:00 0
4d822000-4d824000 rwxp 00000000 00:00 0
4d824000-4d840000 rwxp 0a091000 00:00 0
4d840000-4d844000 rwxp 00000000 00:00 0
4d844000-4d860000 rwxp 0a0b1000 00:00 0
4d860000-4d862000 rwxp 00000000 00:00 0
4d862000-4d87f000 rwxp 00001000 00:00 0
4d87f000-4d884000 rwxp 00000000 00:00 0
4d884000-4d8a0000 rwxp 00023000 00:00 0
4d8a0000-4d8a3000 r--s 00000000 03:0a 268524 /opt/sun-jdk-1.5.0_beta1/jre/lib/ext/dnsns.jar
4d8a3000-4d8ce000 r--s 00000000 03:0a 268525 /opt/sun-jdk-1.5.0_beta1/jre/lib/ext/sunpkcs11.jar
4d8ce000-4d8f3000 r--s 00000000 03:0a 268526 /opt/sun-jdk-1.5.0_beta1/jre/lib/ext/sunjce_provider.jar
4d8f3000-4d9b2000 r--s 00000000 03:0a 268528 /opt/sun-jdk-1.5.0_beta1/jre/lib/ext/localedata.jar
4d9b2000-4d9d9000 r--s 00000000 03:0b 7 /home/anders/java_work/lwjgl/lwjgl-linux-0.9/lwjgl.jar
4d9d9000-4d9ea000 r--s 00000000 03:0b 8 /home/anders/java_work/lwjgl/lwjgl-linux-0.9/lwjgl_test.jar
4d9ea000-4da17000 r-xp 00000000 03:0b 5 /home/anders/java_work/lwjgl/lwjgl-linux-0.9/liblwjgl.so
4da17000-4da23000 rw-p 0002d000 03:0b 5 /home/anders/java_work/lwjgl/lwjgl-linux-0.9/liblwjgl.so
4da23000-4da24000 rw-p 00000000 00:00 0
4da35000-4da42000 r-xp 00000000 03:0a 209285 /usr/X11R6/lib/libXext.so.6.4
4da42000-4da43000 rw-p 0000c000 03:0a 209285 /usr/X11R6/lib/libXext.so.6.4
4da43000-4db1e000 r-xp 00000000 03:0a 209019 /usr/X11R6/lib/libX11.so.6.2
4db1e000-4db21000 rw-p 000da000 03:0a 209019 /usr/X11R6/lib/libX11.so.6.2
4db21000-4dbcd000 r-xp 00000000 03:0a 121381 /usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.2/libstdc++.so.5.0.5
4dbcd000-4dbd2000 rw-p 000ac000 03:0a 121381 /usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.2/libstdc++.so.5.0.5
4dbd2000-4dbd7000 rw-p 00000000 00:00 0
4dbd7000-4dbde000 r-xp 00000000 03:0a 121128 /usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.2/libgcc_s.so.1
4dbde000-4dbdf000 rw-p 00006000 03:0a 121128 /usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.2/libgcc_s.so.1
4dc01000-4dc4c000 r-xp 00000000 03:0a 1291687 /usr/lib/opengl/nvidia/lib/libGL.so.1.0.5336
4dc4c000-4dc5a000 rwxp 0004b000 03:0a 1291687 /usr/lib/opengl/nvidia/lib/libGL.so.1.0.5336
4dc5a000-4dc5d000 rwxp 00000000 00:00 0
4dc5d000-4dcfd000 rw-p 00000000 00:00 0
4dcfd000-4dd09000 rw-s 00000000 00:06 393216 /SYSV00000000 (deleted)
4dd09000-4dd0d000 rw-s 00000000 00:06 425985 /SYSV00000000 (deleted)
4dd0d000-4e00d000 rw-s d0000000 00:0a 1526 /dev/nvidia0
4e00d000-4e0ee000 rw-p 00000000 00:00 0
4e0f7000-4e197000 rw-p 00002000 00:00 0
4e197000-4e1a3000 rw-s 00000000 00:06 393216 /SYSV00000000 (deleted)
4e1a3000-4e1a7000 rw-s 00000000 00:06 425985 /SYSV00000000 (deleted)
4e1a7000-4e4a7000 rw-s d0000000 00:0a 1526 /dev/nvidia0
4e4a7000-4e93b000 r-xp 00000000 03:0a 1291688 /usr/lib/opengl/nvidia/lib/libGLcore.so.1.0.5336
4e93b000-4e950000 rw-p 00493000 03:0a 1291688 /usr/lib/opengl/nvidia/lib/libGLcore.so.1.0.5336
4e950000-4e993000 rw-p 00000000 00:00 0
4eddd000-4ede5000 r-xp 00000000 03:0a 209104 /usr/X11R6/lib/libXcursor.so.1.0
4ede5000-4ede6000 rw-p 00007000 03:0a 209104 /usr/X11R6/lib/libXcursor.so.1.0
4ede6000-4eded000 r-xp 00000000 03:0a 209275 /usr/X11R6/lib/libXrender.so.1.2
4eded000-4edee000 rw-p 00006000 03:0a 209275 /usr/X11R6/lib/libXrender.so.1.2
4edee000-4edf0000 r-xp 00000000 03:0a 209004 /usr/X11R6/lib/X11/locale/lib/common/xlcDef.so.2
4edf0000-4edf1000 rw-p 00001000 03:0a 209004 /usr/X11R6/lib/X11/locale/lib/common/xlcDef.so.2
bea00000-bea01000 ---p 00000000 00:00 0
bea01000-bec00000 rwxp 00001000 00:00 0
bec01000-bec04000 ---p 00000000 00:00 0
bec04000-bee00000 rwxp 00003000 00:00 0
bee00000-bee04000 ---p 00000000 00:00 0
bee04000-bf000000 rwxp 00001000 00:00 0
bf001000-bf004000 ---p 00000000 00:00 0
bf004000-bf200000 rwxp 00003000 00:00 0
bf201000-bf204000 ---p 00000000 00:00 0
bf204000-bf400000 rwxp 00003000 00:00 0
bf401000-bf404000 ---p 00000000 00:00 0
bf404000-bf600000 rwxp 00003000 00:00 0
bf600000-bf601000 ---p 00000000 00:00 0
bf601000-bf800000 rwxp 00001000 00:00 0
bfe01000-bfe04000 ---p 00000000 00:00 0
bfe04000-c0000000 rwxp ffe05000 00:00 0
ffffe000-fffff000 ---p 00000000 00:00 0
VM Arguments:
jvm_args: -Djava.library.path=.
java_command: org.lwjgl.test.input.ControllerCreationTest
Environment Variables:
JAVA_HOME=/opt/sun-jdk-1.5.0_beta1
CLASSPATH=.
PATH=/bin:/usr/bin:/usr/local/bin:/opt/bin:/usr/i386-pc-linux-gnu/gcc-bin/3.3:/opt/intel/compiler70/ia32/bin:/usr/X11R6/bin:/opt/sun-jdk-1.5.0_beta1/bin:/opt/sun-jdk-1.5.0_beta1/jre/bin:/opt/sun-jdk-1.5.0_beta1/jre/javaws:/usr/qt/3/bin:/usr/kde/3.2/bin:/usr/games/bin:/usr/share/karamba/bin
LD_LIBRARY_PATH=/opt/sun-jdk-1.5.0_beta1/jre/lib/i386/client:/opt/sun-jdk-1.5.0_beta1/jre/lib/i386:/opt/sun-jdk-1.5.0_beta1/jre/../lib/i386
SHELL=/bin/bash
DISPLAY=:0.0
--------------- S Y S T E M ---------------
OS:Gentoo Base System version 1.4.9
uname:Linux 2.6.5-gentoo #1 Sat Apr 17 00:04:46 UTC 2004 i686
libc:glibc 2.3.2 linuxthreads-0.10 (fixed stack)
rlimit: STACK 2044k, CORE 0k, NPROC 4095, NOFILE 1024, AS infinity
load average:0.26 0.29 0.24
CPU:total 1(active 1) family 6, cmov, cx8, fxsr, mmx
Memory: 4k page, physical 514280k(7596k free), swap 1052216k(990064k free)
vm_info: Java HotSpot(TM) Client VM (1.5.0-beta-b32c) for linux-x86, built on Jan 23 2004 02:41:35 by java_re with gcc 3.2.1-7 20020903 (release)
EDIT: I get (almost) the same error message when using 1.4.2 and 1.4.1
I had a similar problem once with an earlier version of stdlibc++ and multiple Window.create. The problem was that creating the window would succeed a few times, then crash. Could you please test that theory by running a simple test program that does:
for (a lot) {
Window.create(...)
Window.destroy();
}
- elias
But I only have this problem with ControllerCreationTest and not any other test? Well, I'll try your suggestions anyway - be right back :)
Following code crashes too:
import org.lwjgl.Display;
import org.lwjgl.DisplayMode;
import org.lwjgl.opengl.Window;
public class Test {
public static void main(String[] args) {
// Copied from Game.java
try {
//find first display mode that allows us 640*480*16
int mode = -1;
DisplayMode[] modes = Display.getAvailableDisplayModes();
for (int i = 0; i < modes.length; i++) {
if (modes[i].width == 640 && modes[i].height == 480 && modes[i].bpp >= 16) {
mode = i;
break;
}
}
if (mode != -1) {
//select above found displaymode
System.out.println("Setting display mode to " + modes[mode]);
Display.setDisplayMode(modes[mode]);
System.out.println("Created display.");
}
} catch (Exception e) {
System.err.println("Failed to create display due to " + e);
}
// Test creation/destruction of window
for (int i = 0; i < 10; i++) {
try {
Window.create("LWJGL Game Example");
System.out.println("Created OpenGL: " + i);
Window.destroy();
//Display.resetDisplayMode();
System.out.println("Destroyed OpenGL: " + i);
} catch (Exception e) {
System.err.println("Failed due to " + e);
System.exit(1);
}
}
}
}
output:
Setting display mode to 640 x 480 x 24 @0Hz
Created display.
Created OpenGL: 0
Destroyed OpenGL: 0
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# SIGSEGV (0xb) at pc=0x4000f650, pid=18405, tid=16384
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0-beta-b32c mixed mode)
# Problematic frame:
# C [ld-linux.so.2+0xf650]
#
# An error report file with more information is saved as hs_err_pid18405.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
Aborted
Error file:
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# SIGSEGV (0xb) at pc=0x4dc14b9d, pid=18454, tid=16384
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0-beta-b32c mixed mode)
# Problematic frame:
# C [libGL.so.1+0x24b9d]
#
--------------- T H R E A D ---------------
Current thread (0x0805b7f0): JavaThread "main" [_thread_in_native, id=18454]
siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x00000034
Registers:
EAX=0x4da128e0, EBX=0x00000000, ECX=0x4da1154c, EDX=0x00000000
ESP=0xbfffce00, EBP=0xbfffcef4, ESI=0x08179280, EDI=0x00000000
EIP=0x4dc14b9d, CR2=0x00000034, EFLAGS=0x00210246
Top of Stack: (sp=0xbfffce00)
0xbfffce00: 4da1154c 08179280 4dc0d59f 08179280
0xbfffce10: 4da1154c 081e0020 081a7720 bfffcef4
0xbfffce20: 02600003 bfffcea4 4d9f94c2 08179280
0xbfffce30: 00000001 00000000 bfffce4c 00000050
0xbfffce40: 00000190 02600003 01000018 4dc134b1
0xbfffce50: ff000000 081a7720 081a7748 00000001
0xbfffce60: 0000000a 00000001 00000001 081d0620
0xbfffce70: 081d0140 0023804f 0805b8ac 00000001
Instructions: (pc=0x4dc14b9d)
0x4dc14b8d: 00 c3 90 56 53 8b 74 24 0c 65 8b 1d 18 00 00 00
0x4dc14b9d: 83 7b 34 00 74 1d 8b 43 04 50 53 e8 77 01 00 00
Stack: [0xbfe01000,0xc0000000), sp=0xbfffce00, free space=2031k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libGL.so.1+0x24b9d]
C [liblwjgl.so+0x20f40] Java_org_lwjgl_opengl_Window_nCreate+0xe0
j org.lwjgl.opengl.Window.nCreate(Ljava/lang/String;IIIIZIIIII)V+0
j org.lwjgl.opengl.Window.createWindow(IIIII)V+24
j org.lwjgl.opengl.Window.create(Ljava/lang/String;IIIII)V+51
j org.lwjgl.opengl.Window.create(Ljava/lang/String;)V+10
j Test.main([Ljava/lang/String;)V+145
v ~StubRoutines::call_stub
V [libjvm.so+0x163e3c]
V [libjvm.so+0x2a8dd8]
V [libjvm.so+0x163c6f]
V [libjvm.so+0x185552]
V [libjvm.so+0x17a6d8]
C [java+0x17d6]
C [libc.so.6+0x15c9b] __libc_start_main+0xcb
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j org.lwjgl.opengl.Window.nCreate(Ljava/lang/String;IIIIZIIIII)V+0
j org.lwjgl.opengl.Window.createWindow(IIIII)V+24
j org.lwjgl.opengl.Window.create(Ljava/lang/String;IIIII)V+51
j org.lwjgl.opengl.Window.create(Ljava/lang/String;)V+10
j Test.main([Ljava/lang/String;)V+145
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x080c9050 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=18461]
0x080c7cd8 JavaThread "CompilerThread0" daemon [_thread_blocked, id=18460]
0x080c6e28 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=18459]
0x080bc928 JavaThread "Finalizer" daemon [_thread_blocked, id=18458]
0x080bbb98 JavaThread "Reference Handler" daemon [_thread_blocked, id=18457]
=>0x0805b7f0 JavaThread "main" [_thread_in_native, id=18454]
Other Threads:
0x080b7238 VMThread [id=18456]
0x080ca338 WatcherThread [id=18462]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 576K, used 430K [0x45820000, 0x458c0000, 0x45d00000)
eden space 512K, 71% used [0x45820000, 0x4587b858, 0x458a0000)
from space 64K, 100% used [0x458b0000, 0x458c0000, 0x458c0000)
to space 64K, 0% used [0x458a0000, 0x458a0000, 0x458b0000)
tenured generation total 1408K, used 59K [0x45d00000, 0x45e60000, 0x49820000)
the space 1408K, 4% used [0x45d00000, 0x45d0eff0, 0x45d0f000, 0x45e60000)
compacting perm gen total 8192K, used 2169K [0x49820000, 0x4a020000, 0x4d820000)
the space 8192K, 26% used [0x49820000, 0x49a3e550, 0x49a3e600, 0x4a020000)
No shared spaces configured.
Dynamic libraries:
08048000-08056000 r-xp 00000000 03:0a 265159 /opt/sun-jdk-1.5.0_beta1/bin/java
08056000-08058000 rw-p 0000d000 03:0a 265159 /opt/sun-jdk-1.5.0_beta1/bin/java
08058000-08209000 rwxp 00000000 00:00 0
40000000-40013000 r-xp 00000000 03:0a 134569 /lib/ld-2.3.2.so
40013000-40014000 rw-p 00013000 03:0a 134569 /lib/ld-2.3.2.so
40025000-40026000 rw-p 00000000 00:00 0
40026000-40033000 r-xp 00000000 03:0a 134407 /lib/libpthread-0.10.so
40033000-40034000 rw-p 0000d000 03:0a 134407 /lib/libpthread-0.10.so
40034000-40076000 rw-p 00000000 00:00 0
40076000-40078000 r-xp 00000000 03:0a 134570 /lib/libdl-2.3.2.so
40078000-40079000 rw-p 00001000 03:0a 134570 /lib/libdl-2.3.2.so
40079000-401a2000 r-xp 00000000 03:0a 134426 /lib/libc-2.3.2.so
401a2000-401a5000 rw-p 00129000 03:0a 134426 /lib/libc-2.3.2.so
401a5000-401a8000 rw-p 00000000 00:00 0
401a8000-40519000 r-xp 00000000 03:0a 272400 /opt/sun-jdk-1.5.0_beta1/jre/lib/i386/client/libjvm.so
40519000-40537000 rw-p 00370000 03:0a 272400 /opt/sun-jdk-1.5.0_beta1/jre/lib/i386/client/libjvm.so
40537000-4094b000 rw-p 00000000 00:00 0
4095c000-4097d000 r-xp 00000000 03:0a 134568 /lib/libm-2.3.2.so
4097d000-4097e000 rw-p 00020000 03:0a 134568 /lib/libm-2.3.2.so
4097e000-4097f000 r--p 00000000 00:00 0
4097f000-40986000 r-xp 00000000 03:0a 272374 /opt/sun-jdk-1.5.0_beta1/jre/lib/i386/native_threads/libhpi.so
40986000-40987000 rw-p 00006000 03:0a 272374 /opt/sun-jdk-1.5.0_beta1/jre/lib/i386/native_threads/libhpi.so
40998000-409aa000 r-xp 00000000 03:0a 134425 /lib/libnsl-2.3.2.so
409aa000-409ab000 rw-p 00011000 03:0a 134425 /lib/libnsl-2.3.2.so
409ab000-409ad000 rw-p 00000000 00:00 0
409be000-409c5000 r-xp 00000000 03:0a 131941 /lib/libnss_compat-2.3.2.so
409c5000-409c6000 rw-p 00006000 03:0a 131941 /lib/libnss_compat-2.3.2.so
409c6000-409ce000 r-xp 00000000 03:0a 134440 /lib/libnss_nis-2.3.2.so
409ce000-409cf000 rw-p 00007000 03:0a 134440 /lib/libnss_nis-2.3.2.so
409cf000-409d7000 r-xp 00000000 03:0a 134261 /lib/libnss_files-2.3.2.so
409d7000-409d8000 rw-p 00008000 03:0a 134261 /lib/libnss_files-2.3.2.so
409d8000-409dc000 rw-s 00000000 03:0a 1311451 /tmp/hsperfdata_anders/18454
409dc000-409e7000 r-xp 00000000 03:0a 268537 /opt/sun-jdk-1.5.0_beta1/jre/lib/i386/libverify.so
409e7000-409e8000 rw-p 0000b000 03:0a 268537 /opt/sun-jdk-1.5.0_beta1/jre/lib/i386/libverify.so
409e8000-40a08000 r-xp 00000000 03:0a 272433 /opt/sun-jdk-1.5.0_beta1/jre/lib/i386/libjava.so
40a08000-40a0a000 rw-p 0001f000 03:0a 272433 /opt/sun-jdk-1.5.0_beta1/jre/lib/i386/libjava.so
40a0a000-40a1d000 r-xp 00000000 03:0a 272364 /opt/sun-jdk-1.5.0_beta1/jre/lib/i386/libzip.so
40a1d000-40a1f000 rw-p 00012000 03:0a 272364 /opt/sun-jdk-1.5.0_beta1/jre/lib/i386/libzip.so
40a1f000-42e31000 r--s 00000000 03:0a 271169 /opt/sun-jdk-1.5.0_beta1/jre/lib/rt.jar
42e31000-42ec6000 rw-p 00000000 00:00 0
42ec6000-42f46000 r--s 00000000 03:0a 270798 /opt/sun-jdk-1.5.0_beta1/jre/lib/jsse.jar
42f46000-42f5a000 r--s 00000000 03:0a 271272 /opt/sun-jdk-1.5.0_beta1/jre/lib/jce.jar
42f5a000-43793000 r--s 00000000 03:0a 271167 /opt/sun-jdk-1.5.0_beta1/jre/lib/charsets.jar
43793000-4381b000 rwxp 00000000 00:00 0
4381b000-45793000 rwxp 00088000 00:00 0
45793000-45796000 rwxp 00000000 00:00 0
45796000-45813000 rwxp 02003000 00:00 0
45820000-458c0000 rwxp 00000000 00:00 0
458c0000-45d00000 rwxp 0212d000 00:00 0
45d00000-45e60000 rwxp 00000000 00:00 0
45e60000-49820000 rwxp 026cd000 00:00 0
49820000-4a020000 rwxp 00000000 00:00 0
4a020000-4d820000 rwxp 0688d000 00:00 0
4d820000-4d821000 rwxp 00000000 00:00 0
4d821000-4d822000 rwxp 0a08e000 00:00 0
4d822000-4d824000 rwxp 00000000 00:00 0
4d824000-4d840000 rwxp 0a091000 00:00 0
4d840000-4d844000 rwxp 00000000 00:00 0
4d844000-4d860000 rwxp 0a0b1000 00:00 0
4d860000-4d862000 rwxp 00000000 00:00 0
4d862000-4d87f000 rwxp 00001000 00:00 0
4d87f000-4d884000 rwxp 00000000 00:00 0
4d884000-4d8a0000 rwxp 00023000 00:00 0
4d8a0000-4d8a3000 r--s 00000000 03:0a 268524 /opt/sun-jdk-1.5.0_beta1/jre/lib/ext/dnsns.jar
4d8a3000-4d8ce000 r--s 00000000 03:0a 268525 /opt/sun-jdk-1.5.0_beta1/jre/lib/ext/sunpkcs11.jar
4d8ce000-4d8f3000 r--s 00000000 03:0a 268526 /opt/sun-jdk-1.5.0_beta1/jre/lib/ext/sunjce_provider.jar
4d8f3000-4d9b2000 r--s 00000000 03:0a 268528 /opt/sun-jdk-1.5.0_beta1/jre/lib/ext/localedata.jar
4d9b2000-4d9d9000 r--s 00000000 03:0b 7 /home/anders/java_work/lwjgl/lwjgl-linux-0.9/lwjgl.jar
4d9d9000-4da06000 r-xp 00000000 03:0b 5 /home/anders/java_work/lwjgl/lwjgl-linux-0.9/liblwjgl.so
4da06000-4da12000 rw-p 0002d000 03:0b 5 /home/anders/java_work/lwjgl/lwjgl-linux-0.9/liblwjgl.so
4da12000-4da13000 rw-p 00000000 00:00 0
4da24000-4da31000 r-xp 00000000 03:0a 209285 /usr/X11R6/lib/libXext.so.6.4
4da31000-4da32000 rw-p 0000c000 03:0a 209285 /usr/X11R6/lib/libXext.so.6.4
4da32000-4db0d000 r-xp 00000000 03:0a 209019 /usr/X11R6/lib/libX11.so.6.2
4db0d000-4db10000 rw-p 000da000 03:0a 209019 /usr/X11R6/lib/libX11.so.6.2
4db10000-4dbbc000 r-xp 00000000 03:0a 121381 /usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.2/libstdc++.so.5.0.5
4dbbc000-4dbc1000 rw-p 000ac000 03:0a 121381 /usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.2/libstdc++.so.5.0.5
4dbc1000-4dbc6000 rw-p 00000000 00:00 0
4dbc6000-4dbcd000 r-xp 00000000 03:0a 121128 /usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.2/libgcc_s.so.1
4dbcd000-4dbce000 rw-p 00006000 03:0a 121128 /usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.2/libgcc_s.so.1
4dbf0000-4dc3b000 r-xp 00000000 03:0a 1291687 /usr/lib/opengl/nvidia/lib/libGL.so.1.0.5336
4dc3b000-4dc49000 rwxp 0004b000 03:0a 1291687 /usr/lib/opengl/nvidia/lib/libGL.so.1.0.5336
4dc49000-4dc4c000 rwxp 00000000 00:00 0
4dc4c000-4dcec000 rw-p 00000000 00:00 0
4dcec000-4dcf8000 rw-s 00000000 00:06 393216 /SYSV00000000 (deleted)
4dcf8000-4dcfc000 rw-s 00000000 00:06 425985 /SYSV00000000 (deleted)
4dcfc000-4dffc000 rw-s d0000000 00:0a 1526 /dev/nvidia0
4dffc000-4e0dd000 rw-p 00000000 00:00 0
4e0e6000-4e186000 rw-p 00002000 00:00 0
4e186000-4e192000 rw-s 00000000 00:06 393216 /SYSV00000000 (deleted)
4e192000-4e196000 rw-s 00000000 00:06 425985 /SYSV00000000 (deleted)
4e196000-4e496000 rw-s d0000000 00:0a 1526 /dev/nvidia0
4e496000-4e4d7000 rw-p 00000000 00:00 0
4e8d9000-4ea59000 rw-s d0304000 00:0a 1526 /dev/nvidia0
4ea59000-4ebd9000 rw-s d1e48000 00:0a 1526 /dev/nvidia0
4ebd9000-4ed59000 rw-s d1e48000 00:0a 1526 /dev/nvidia0
4edcc000-4edd4000 r-xp 00000000 03:0a 209104 /usr/X11R6/lib/libXcursor.so.1.0
4edd4000-4edd5000 rw-p 00007000 03:0a 209104 /usr/X11R6/lib/libXcursor.so.1.0
4edd5000-4eddc000 r-xp 00000000 03:0a 209275 /usr/X11R6/lib/libXrender.so.1.2
4eddc000-4eddd000 rw-p 00006000 03:0a 209275 /usr/X11R6/lib/libXrender.so.1.2
4eddd000-4eddf000 r-xp 00000000 03:0a 209004 /usr/X11R6/lib/X11/locale/lib/common/xlcDef.so.2
4eddf000-4ede0000 rw-p 00001000 03:0a 209004 /usr/X11R6/lib/X11/locale/lib/common/xlcDef.so.2
4ede0000-4f274000 r-xp 00000000 03:0a 1291688 /usr/lib/opengl/nvidia/lib/libGLcore.so.1.0.5336
4f274000-4f289000 rw-p 00493000 03:0a 1291688 /usr/lib/opengl/nvidia/lib/libGLcore.so.1.0.5336
4f289000-4f28b000 rw-p 00000000 00:00 0
bea00000-bea01000 ---p 00000000 00:00 0
bea01000-bec00000 rwxp 00001000 00:00 0
bec01000-bec04000 ---p 00000000 00:00 0
bec04000-bee00000 rwxp 00003000 00:00 0
bee00000-bee04000 ---p 00000000 00:00 0
bee04000-bf000000 rwxp 00001000 00:00 0
bf001000-bf004000 ---p 00000000 00:00 0
bf004000-bf200000 rwxp 00003000 00:00 0
bf201000-bf204000 ---p 00000000 00:00 0
bf204000-bf400000 rwxp 00003000 00:00 0
bf401000-bf404000 ---p 00000000 00:00 0
bf404000-bf600000 rwxp 00003000 00:00 0
bf600000-bf601000 ---p 00000000 00:00 0
bf601000-bf800000 rwxp 00001000 00:00 0
bfe01000-bfe04000 ---p 00000000 00:00 0
bfe04000-c0000000 rwxp ffe05000 00:00 0
ffffe000-fffff000 ---p 00000000 00:00 0
VM Arguments:
jvm_args: -Djava.library.path=.
java_command: Test
Environment Variables:
JAVA_HOME=/opt/sun-jdk-1.5.0_beta1
CLASSPATH=.
PATH=/bin:/usr/bin:/usr/local/bin:/opt/bin:/usr/i386-pc-linux-gnu/gcc-bin/3.3:/opt/intel/compiler70/ia32/bin:/usr/X11R6/bin:/opt/sun-jdk-1.5.0_beta1/bin:/opt/sun-jdk-1.5.0_beta1/jre/bin:/opt/sun-jdk-1.5.0_beta1/jre/javaws:/usr/qt/3/bin:/usr/kde/3.2/bin:/usr/games/bin:/usr/share/karamba/bin
LD_LIBRARY_PATH=/opt/sun-jdk-1.5.0_beta1/jre/lib/i386/client:/opt/sun-jdk-1.5.0_beta1/jre/lib/i386:/opt/sun-jdk-1.5.0_beta1/jre/../lib/i386
SHELL=/bin/bash
DISPLAY=:0.0
--------------- S Y S T E M ---------------
OS:Gentoo Base System version 1.4.9
uname:Linux 2.6.5-gentoo #1 Sat Apr 17 00:04:46 UTC 2004 i686
libc:glibc 2.3.2 linuxthreads-0.10 (fixed stack)
rlimit: STACK 2044k, CORE 0k, NPROC 4095, NOFILE 1024, AS infinity
load average:0.67 0.23 0.15
CPU:total 1(active 1) family 6, cmov, cx8, fxsr, mmx
Memory: 4k page, physical 514280k(6056k free), swap 1052216k(990100k free)
vm_info: Java HotSpot(TM) Client VM (1.5.0-beta-b32c) for linux-x86, built on Jan 23 2004 02:41:35 by java_re with gcc 3.2.1-7 20020903 (release)
What happens if you take out the display switch code (only leaving the create/destroy loop)?
- elias
Created OpenGL: 0
Destroyed OpenGL: 0
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# SIGSEGV (0xb) at pc=0x4dc14b9d, pid=18696, tid=16384
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0-beta-b32c mixed mode)
# Problematic frame:
# C [libGL.so.1+0x24b9d]
#
# An error report file with more information is saved as hs_err_pid18696.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
Aborted
That sounds very much like the problem I had. Which libstdc++ version do you have? My version:
rpelias@ip173:~> rpm -qa|grep stdc++
libstdc++-3.3.1-24
- elias
Well, I'm not using a rpm based distro, but this are my libstdc++'s in /usr/lib
/usr/lib/libstdc++.so.2.7.2.8
/usr/lib/libstdc++-2-libc6.1-1-2.9.0.so
/usr/lib/libstdc++-3-libc6.2-2-2.10.0.so
/usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.2/libstdc++.la
/usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.2/libstdc++.so
/usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.2/libstdc++.a
/usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.2/libstdc++.so.5
/usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.2/libstdc++_pic.a
/usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.2/libstdc++.so.5.0.5
/usr/lib/libstdc++-libc6.2-2.so.3
/usr/lib/libstdc++.so.2.8
/usr/lib/libstdc++.so.2.9
/usr/lib/libstdc++.so.2.7.2
/usr/lib/libstdc++.so.2.8.0
/usr/lib/libstdc++.so.2.9.0
/usr/lib/libstdc++-libc6.1-1.so.2
I have:
/usr/lib/libstdc++.so.2.7.2
/usr/lib/libstdc++.so.2.7.2.8
/usr/lib/libstdc++.so.2.8
/usr/lib/libstdc++.so.2.8.0
/usr/lib/libstdc++.so.2.9
/usr/lib/libstdc++.so.2.9.0
/usr/lib/libstdc++.so.5
/usr/lib/libstdc++.so.5.0.5
Seems like you have the same... What nvidia driver version do you use? I've got 5336
- elikas
Yep, me too.
Thanks to tomb, I checked in a fix for scaling images up.
It's a temporary fix; it doesn't do any filtering yet. I'll see if I can add that too. I think I can still get inspired by the mesa code just as long as don't copy paste their code, but that code is of course not the only way to do filtered up-scaling.
Apologies for the delay. For some reason I can only access CVS for LWJGL at work. I get some authentication error messages at home when I try to connect with LWJGL's CVS. I can still connect to another project at home though. Dunno why... :roll:
BTW, parts of the mipmap code still has the mesa code as a starting point but it's mostly a rewrite now. Some variable names and such are still the same though. I don't think this should be a problem or is it?...
what are the error messages?
- elias
I'm seeing some mouse button oddities when using the latest build. I've got a windowed display alongside a couple of Swing windows and need to switch between the two of them. I'm using the native cursor and it was working ok (although the display window did cause some focus oddities when switching windows).
When the app starts all the mouse buttons appear 'jammed down', only when one is actually pressed does it unjam things and they all work correctly. I seem to get the same thing when I switch the focus away and back to the LWJGL window.
The mouse test app doesn't have this problem, but that actually captures the mouse and doesn't use the native cursor. This all did work when I was using a month old build, and nothing else has really changed.
Mouse is created and then I let window.update poll it for me. No buffering or anything fancy either. Anyone any ideas?
Did you try the Mouse test when commenting out the Mouse.setGrabbed(true) call?
- elias
Actually I got that wrong, the mouse test doesn't grab the mouse, it just leaves it alone on the regular native cursor.
Either way, I tried it again with some text output and it seems that clicking outside to make it loose focus triggers the weird behaviour: all the buttons are magically held down and stay that way until it regains focus.
Regaining focus seems to fix things on the test app, regardless of whether I click back or alt-tab back.
I posted a fix to the win32 tree (polled mouse fields were filled even when the mouse is lost). Are you able to compile from CVS?
- elias
I can compile from CVS, but Eclipse insists none of the files have changed (at least, no mouse related ones have). What files should I be looking for?
Yoy're out of luck - I changed the native side of win32...
- elias
Native is not a problem, I've got VS set up so I can recompile the Win32 dll if need be. I'm assuming you've changed src/native/win32/*mouse.cpp, but I don't see any later revisions that the one from Matzon on the 12th of april. Wonder if Sourceforge is just being slow...
Ah I seem to remember that anonymous CVS is a day or so behind developer CVS...
- elias
Cheers, that seems to have fixed things :)
Nvidia released some new extensions and I just commited them to cvs. These are:
EXT_blend_equation_separate
EXT_texture_mirror_clamp
GL_NV_fragment_program2
GL_NV_vertex_program2_option
GL_NV_vertex_program3
A little request:
Could somebody please remove anything that's not used from cvs? There are many useless folders and the extgl.cpp has a lot of crap in it. A cleanup would be nice. I could do it, but I want to be sure they are not needed first.
extgl.cpp/h has been in need for cleanup for a long time. Go ahead and clean it up if you want. I'm not so sure you can delete (empty) directories in CVS though...
- elias
cvs -H release
Usage: cvs release [-d [-f]] [-e] directories...
-d Delete the given directory.
-f Delete contents of directories including non-cvs files.
-e Delete CVS control files in the given directory (export).
(Specify the --help global option for a list of other help options)
Here's the command.
No, the release command only works on your working directory, not on the repository. Its pupose is to 'undo' a checkout command so that the central CVS server knows that you've abandoned it (although most people just delete their working directory.
- elias
The useless folders will probably stay, since cvs keeps a history on that - they don't show up, if you prune empty directories anyway. We could do a service request from SF to remove those directories - but they will come again, in one form or another.
Empty directories are still very much part of the history, so they cannot be removed. However, as Matzon says, check out with the "prune" option and you'll never see them.
The only "proper" way of getting rid of them is checking the whole codebase in to a new repository, i.e. dropping all the history and starting anew.
With the way CVS handles it's storage mechanisms, if you can get access to the server side, you can just delete the directory and to CVS it will be like it was never there. I have already done this successfully on my CVS at work. We are using CVSNT. I don't know if that makes a difference, but it shouldn't.
Quote from: "CaptainJester"With the way CVS handles it's storage mechanisms, if you can get access to the server side, you can just delete the directory and to CVS it will be like it was never there. I have already done this successfully on my CVS at work. We are using CVSNT. I don't know if that makes a difference, but it shouldn't.
Yep, that's what we do internally to the TT cvs tree (up until a few days ago, actually, since we switched to subversion that can handle directories just fine). However, sourceforge doesn't give direct access to the CVS repository, so we have to bug an admin every time we need to delete directories. So at some point in time, we'll probably batch up all the bad directories and submit it to them.
- elias
Quote from: "CaptainJester"With the way CVS handles it's storage mechanisms, if you can get access to the server side, you can just delete the directory and to CVS it will be like it was never there. I have already done this successfully on my CVS at work. We are using CVSNT. I don't know if that makes a difference, but it shouldn't.
And if you
do do that, you lose all history that that directory represented. Previous checkouts may no longer be complete, files that used to exist just cease to be. Not good, from a version-control perspective! ;)
As I say, with CVS the only
proper solution is a repository rebuild. It's just one of the very well-known limitations of CVS. However, with prune turned on you'll never see these directories anyway, so why bother?