jnativehook icon indicating copy to clipboard operation
jnativehook copied to clipboard

GlobalScreen.unregisterNativeHook() causing 'System.exit(1)' on linux.

Open ghost opened this issue 8 years ago • 6 comments

I have simple code to unregister jnativehook:

try { GlobalScreen.unregisterNativeHook(); } catch (NativeHookException e) { logger.error("Failed to stop JNativeHook.", e); }

No exception is not caught. Even if I change code to catch Exception, no exception. On windows, whole app works great, unregister works, hook unregisters itself, app closes itself correctly with exit code 0. On linux (xfce fedora 26) though, call to GlobalScreen.unregisterNativeHook(); causes immediate JVM exit with exit code 1. There's still termination code which has to be executed, but it's never reached. Ie. it really behaves like if there's System.exit(1). I assume this is not how it should behave.

I did not see any error message. If you need any extra information / testing, please request it.

ghost avatar Oct 21 '17 20:10 ghost

Same for me on Linux mint. Any news?

xeruf avatar Mar 03 '18 12:03 xeruf

I'm running a virtualized Mint OS inside VMware and can not reproduce the issue within the same application as @Xerus2000 . However, this appears to be a critical issue to me.

sghpjuikit avatar Mar 04 '18 18:03 sghpjuikit

Version 2.1 of the library? I will see if I can reproduce today.

kwhat avatar Mar 20 '18 18:03 kwhat

Ok, I am not seeing this issue with the demo program and the latest 2.1 commit. I am going to do a 2.1.1 soon, so please test that when it becomes available.

kwhat avatar Mar 23 '18 22:03 kwhat

I will test 2.1.1.

sghpjuikit avatar Mar 24 '18 23:03 sghpjuikit

Any progress?

xeruf avatar Jan 07 '19 12:01 xeruf