Controllers.create() crash on Debian

Started by histeria, December 22, 2006, 20:45:20

Previous topic - Next topic

histeria

Hi, this is my first post here :)

Im trying to control several joysticks, and I have no problems under Mac OS X and Windows XP, but in Debian Sid, when I try to run this little program I get this:

Failed to open device (/dev/input/event0): Failed to open device /dev/input/event0 (13)

Failed to open device (/dev/input/event4): Failed to open device /dev/input/event4 (13)

Failed to open device (/dev/input/event2): Failed to open device /dev/input/event2 (13)

Failed to open device (/dev/input/event1): Failed to open device /dev/input/event1 (13)

Failed to open device (/dev/input/event3): Failed to open device /dev/input/event3 (13)

Linux plugin claims to have found 1 controllers


If I do the same as root:

java.lang.ArrayIndexOutOfBoundsException: 511
        at net.java.games.input.LinuxNativeTypesMap.getButtonID(LinuxNativeTypesMap.java:786)
        at net.java.games.input.LinuxEventDevice.addKeys(LinuxEventDevice.java:272)
        at net.java.games.input.LinuxEventDevice.getDeviceComponents(LinuxEventDevice.java:306)
        at net.java.games.input.LinuxEventDevice.<init>(LinuxEventDevice.java:69)
        at net.java.games.input.LinuxEnvironmentPlugin.enumerateEventControllers(LinuxEnvironmentPlugin.java:351)
        at net.java.games.input.LinuxEnvironmentPlugin.enumerateControllers(LinuxEnvironmentPlugin.java:182)
        at net.java.games.input.LinuxEnvironmentPlugin.<init>(LinuxEnvironmentPlugin.java:68)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at java.lang.Class.newInstance0(Class.java:350)
        at java.lang.Class.newInstance(Class.java:303)
        at net.java.games.input.DefaultControllerEnvironment.getControllers(DefaultControllerEnvironment.java:157)
        at org.lwjgl.input.Controllers.create(Controllers.java:40)
        at joystick_lwjgl.Main.main(Main.java:36)


This error happens too when I do this:

java -cp .:res:jar/lwjgl.jar:jar/lwjgl_test.jar:jar/lwjgl_util.jar:jar/lwjgl_fmod3.jar:jar/lwjgl_devil.jar:jar/jinput.jar: -Djava.library.path=native/linux org.lwjgl.test.input.TestControllers


I have all needed jar's and libraries, and I don't know what I have to do  ???

Any suggestion?

Thanks

elias

You don't have to be root to run the examples. It's better to adjust permissions for the /dev/input/event* devices instead. Anyway, I think I fixed the bug; you can try the fix by either downloading and compiling jinput for yourself or you can PM me an email address I can send you an updated jinput.jar to.

- elias

histeria

I sent you a pm with my email address. I can't compile the jinput project, problems with linux.jar:

/home/histeria/jinput/plugins/linux/build.xml:56: Could not create task or type of type: javah.