Problem with nGetAxisMap on Linux

I was using jinput happily on Linux (Ubuntu) for keyboard and mouse input, until I plugged a joystick (Microsoft Sidewinder).
With this device plugged, the JVM throws a ‘UnsatisfiedLinkError’ for the ‘nGetAxisMap’ function (when enumerating js devices).

This is strange since I’m sure that the native library is loaded. I performed tests with the jinput-test.jar :

  • event devices are correctly detected and working (I had unplugged the USB joystick for this test),
  • looking at the source (CVS) code, before calling nGetAxisMap, the js devices handling class call other native methods defined in the joystick c file (nGetName for example) without throwing any link exception.
    I have performed these test with the latest (2007-12-07) and previous (2007-07-26) combined binaries.

It looks like if the signature of the C function nGetAxisMap does not match the java expected one.

Is someone experimenting the same problems ?

Any idea would be welcomed. Thanks

       Vincent

Hi

I’m not at home right now, so I can’t check this. It’s possible an old linux .so made it’s way in to the release. Incase that is what has happened, I have built the linux .so, but I have can’t test it right now. If you wish, you can try it. Please let us know. I’ll check this out in the new year when I am home again.

Cheers

Endolf

Thanks a lot ! It solved the problem. I will post an updated zip here when I will get the time to.

It ends up that the build you provide was not completely working ; the link problem was gone but I had a new one ; getAxisMap failed with errno 22, that is to say invalid argument.

Therefore I built jinput from scratch using the ant script (I was surprised how easy it is to build, this is great work). And now it works perfectly.

The compiled linux dist is http://vbousquet.free.fr/jinput-linux.zip if you want to compare.

I will try to investigate this a bit further.

Vincent

When I get home, I’ll do a full build, for win32 and linux and update the distribution.

Thanks for spotting this and letting us know.

Cheers

Endolf

I can confirm this. I had the exact same problem on my Ubuntu machine.
I also got the same error using the rebuilt linux.so and the problems went away with Niwak’s build.

Hi

Sorry for the delay on this, I caught a virus of some sort (soft squidgy human virus, not computer one), and I’ve been in bed for several days, still not back to 100% now. I’ve not made it home as I’m not safe to drive yet, please bear with me. I’m hoping to make it home on sunday, so hopefully next week some time I can resolve this.

Cheers

Endolf

Hi

I’ve uploaded a new binary distribution, it’s the same as the december one with a new linux so. I’ve also updated the webstart demo.

Please give it a try and let me know.

Endolf