Input related crash

A player of mine has reported an odd crash that I can’t make much of. It looks something like as if the mouse itself was null or something along those lines but that doesn’t really make sense.

Any ideas?

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
at java.lang.reflect.Constructor.newInstance(
at java.lang.Class.newInstance(
at com.jme3.input.lwjgl.JInputJoyInput.loadJoysticks(
at com.jme3.input.InputManager.<init>(
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(

This is on jme 3.1-beta2, Windows 10, joysticks disabled, and the user claims to not have anything other than a mouse, keyboard and a headset plugged in. He also says he has no mouse/keyboard related issues otherwise.

Well, the fun fact is:

But even when the user has no joysticks there should be no exception.

So your joysticks aren’t really disabled (It’s unrelated to that crash I guess, but just a hint).

And: This issue seems to happen from time to time:
see here

I think Gamepad :: The Count Lucanor General Discussions is helpful.

Can you maybe ask the user to launch the game with the mouse unplugged? :smiley: Here it seems that a “Corsair Gaming Scimitar RGB Mouse” lead to the problem, because it was attempted to be read as Controller or something.

"Something to add… I can plug the mouse back in while in the game and the mouse and controller both continue to work, but when I exit and relaunch with the mouse plugged in, the controller no longer works. "

Edit: ha, in the other links the crash is also due to a corsair mouse :smiley:

And for what it’s worth, that joystick code wouldn’t run if joysticks were disabled because of the null check… the constructor of InputManager is called with a null joystick object if they are disabled.

See here:

Which is typically set to true by default:

Which is only set false here if called by the application or the settings dialog:

So, I call “shenanigans” on the “joysticks are disabled” thing.

@pspeed @Darkchaos Hmm I guess you guys are right. We set up launch parameters via steamworks to toggle it and it must’ve gotten disabled on his build somehow.

Mystery solved :smiley:

Though it’s still a bit funny how fragile the input system is if it can’t handle no joysticks when they’re enabled.

It can handle them just fine. I have joysticks enabled by default in all of my apps and I only sometimes plug a joystick in.

The issue seems specific to this “mouse that acts like a joystick”, I guess. Maybe a bug in JInput.

1 Like