Hello Guest

Keyboard on Win2K?

  • 29 Replies
  • 31701 Views
Keyboard on Win2K?
« on: September 10, 2003, 23:56:55 »
Hi,

i'm in the process of porting jPCT's OpenGL-renderer to LWJGL0.7. It works fine so far, but i've a problem with Keyboard.create().
On my two WinXP machines, the demo-app runs fine but on the Win2K one, i can't create a Keyboard. It's always telling me that the Keyboard could not be created and that there is "no window", which is obviously not true (http://www.jpct.net/pics/keyboarderror.jpg). This happens in fullscreen as well as in windowed mode and it worked fine using LWJGL0.6.
Maybe i'm doing something wrong?

Edit: That's on an Athlon XP 2200+ running Win2K Pro SP4 and a Geforce4Ti

*

Offline elias

  • *****
  • 899
    • http://oddlabs.com
Keyboard on Win2K?
« Reply #1 on: September 11, 2003, 07:49:47 »
This is a very weird bug, because the hwnd is checked for NULL in Window.create. One clarifying question though: you are not by any chance doing the creation of LWJGL stuff from different threads, are you? If not, can you assemble a minimal application that exhibit the same behaviour?

EDIT: And what's the output from the debug build of LWJGL?

 - elias

Keyboard on Win2K?
« Reply #2 on: September 11, 2003, 15:29:46 »
Quote from: "elias"
This is a very weird bug, because the hwnd is checked for NULL in Window.create. One clarifying question though: you are not by any chance doing the creation of LWJGL stuff from different threads, are you? If not, can you assemble a minimal application that exhibit the same behaviour?

EDIT: And what's the output from the debug build of LWJGL?

 - elias
Here it is: http://www.jpct.net/stuff/KeyboardTest.java

When run under WinXP, everything is fine but under Win2K, the Window is created and the Keyboard create() keeps telling me "No window" and i get the exception.

Keyboard on Win2K?
« Reply #3 on: September 11, 2003, 15:39:31 »
I dont have a win2k box to try this on, but you might want to add a this line after you create your keyboard...

Code: [Select]
Keyboard.enableBuffer();

*

Offline elias

  • *****
  • 899
    • http://oddlabs.com
Keyboard on Win2K?
« Reply #4 on: September 11, 2003, 15:56:04 »
That won't work, because the bug occurs in the Keyboard creation. Now, before I try to stomp up a 2k, can any of you guys out there run the apparantly correct test?

 - elias

Keyboard on Win2K?
« Reply #5 on: September 11, 2003, 16:18:23 »
Quote from: "elias"
That won't work, because the bug occurs in the Keyboard creation. Now, before I try to stomp up a 2k, can any of you guys out there run the apparantly correct test?

 - elias


i just tried it on a win2k box, but the graphics card is a piece of crap and doesnt support opengl (it is a 4mb card on the board)... after it pucked it did give me the No window message.

Keyboard on Win2K?
« Reply #6 on: September 11, 2003, 16:29:02 »
btw - i can try it on a good win2k box in about an hour when i go home for lunch... if you can wait that long.  how do i turn on debugging in lwjgl in case i need more info?

Keyboard on Win2K?
« Reply #7 on: September 11, 2003, 16:43:59 »
Here the output when using the debug-dll:

Code: [Select]

Window registered
Created window
Pixel format is 5
No window
java.lang.Exception: The keyboard could not be created.
        at org.lwjgl.input.Keyboard.create(Unknown Source)
        at KeyboardTest.doStuff(KeyboardTest.java:18)
        at KeyboardTest.<init>(KeyboardTest.java:10)
        at KeyboardTest.main(KeyboardTest.java:6)
Delete GL context
Destroying directinput
Releasing DC
Destroy window
Destroyed window

Keyboard on Win2K?
« Reply #8 on: September 11, 2003, 17:09:54 »
i just tried running your program at home on my win2k box and it ran great... sorry.

its a dell 1.5 ghz, 256mb ram, and a 32mb ati rage 128 ultra card
win2k professional that is... dont know if there is a home version for that or not.

Keyboard on Win2K?
« Reply #9 on: September 11, 2003, 17:18:35 »
Quote from: "nala-naj"
i just tried running your program at home on my win2k box and it ran great... sorry.
No need to be sorry that it worked for you... :wink:  Anyway, i also tried it under Win98SE (same machine, dual boot) and it worked there too. But i don't think that something is fishy with my 2k (there is no "home" version of 2k btw. Professional is the smallest) because the Keyboard-stuff worked fine using LWJGL0.6...so something seems to have changed to the worse with 0.7.

*

Offline elias

  • *****
  • 899
    • http://oddlabs.com
Keyboard on Win2K?
« Reply #10 on: September 11, 2003, 18:15:19 »
I'd still like to see the debug output from the debug LWJGL build. Can you supply us with that?

 - elias

Keyboard on Win2K?
« Reply #11 on: September 11, 2003, 18:24:13 »
Quote from: "elias"
I'd still like to see the debug output from the debug LWJGL build. Can you supply us with that?
I posted the output from the debug-dll some posts above. I that what you mean, or can i do something to get more detailed output?

*

Offline elias

  • *****
  • 899
    • http://oddlabs.com
Keyboard on Win2K?
« Reply #12 on: September 11, 2003, 20:15:01 »
Sorry about that, I must have ovrelooked it.

 - elias

*

Offline elias

  • *****
  • 899
    • http://oddlabs.com
Keyboard on Win2K?
« Reply #13 on: September 12, 2003, 16:07:42 »
Yet another look at the code tells me that the only way the hwnd can be null after a succesful Window.create() is destroy() or a buffer overrun. Interestingly, Cas' fix for the matrox cards was in fact a buffer overrun fix(*), so your bug may already be fixed.

So Cas, can you upload a CVS build for Egon to test? As an added bonus,  he gets to test the NT4 fix at his workplace :-)

(*) Are you not feeling lucky to use java when issues like that arise? I certainly am.

 - elias

*

Offline princec

  • *****
  • 1933
    • Puppygames
Keyboard on Win2K?
« Reply #14 on: September 12, 2003, 17:55:09 »
LWJGL 0.71 alpha just uploaded.

Cas :)