LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: whatever23 on November 21, 2003, 12:27:52

Title: Unable to call Keyboard.poll()
Post by: whatever23 on November 21, 2003, 12:27:52
I am just learning openGL so I am going throuth the NeHe tuts. I just started the first tut tonight and am having some trouble with the keyboard class. Whenever I try and poll Keyboard I get an error:

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x2C5A405
Function=Java_org_lwjgl_input_Keyboard_nPoll+0x5
Library=C:\lwjgl8a\lwjgl.dll

I am using WinXP Pro if that helps at all. Should I rely on the enableBuffer and read methods?
Title: Unable to call Keyboard.poll()
Post by: elias on November 21, 2003, 13:22:08
Did you try the supplied keyboard examples?

- elias
Title: Unable to call Keyboard.poll()
Post by: cfmdobbie on November 21, 2003, 16:31:43
My guess - you haven't created the keyboard device with a Keyboard.create()?
Title: Unable to call Keyboard.poll()
Post by: elias on November 21, 2003, 16:36:27
Probably - I forgot that the assertions to test those error conditions are just that - only enabled on debug. We have plans to turn all those (cheap) assertions into RuntimeExceptions like they should be.

- elias
Title: Unable to call Keyboard.poll()
Post by: whatever23 on November 21, 2003, 20:14:13
hmm.....

it helps if i create the keyboard before i start polling it!!

thanks for you help