danishjuzdan / jnativehook

Automatically exported from code.google.com/p/jnativehook
0 stars 0 forks source link

Freezes when debugging #94

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Input freezes for ~10-20 seconds when debugging

What version of the product are you using? On what operating system?
JNativeHooks 1.2.0-RC4, Windows 8.1, IntelliJ IDEA

I understand that the thread is being blocked, but I'm not sure if it is caused 
by my IDE/environment or if it is expected behavior. I have read the other 
related issues regarding this, but couldn't find a clear answer.

Original issue reported on code.google.com by lars.d...@gmail.com on 10 Dec 2014 at 5:31

GoogleCodeExporter commented 9 years ago
This behavior is expected, although I hadn't confirmed it from Java until now.  
The issue is the thread that installed the low level hook gets paused and event 
delivery gets backed up waiting for events to be delivered.  Every platform 
handles this situation differently.  I suspect Windows will auto-magically 
disable the hook and not tell anyone, although I haven't confirmed that yet.  
Does the hook continue to run if you resume the application after breaking to 
the debugger?  I believe apple is able to recover from these failures although 
their maybe event loss.  This problem doesn't effect X11 because the events 
from XRecord are async.

I am not sure there is a simple way around this issue and I have no plans on 
looking into the problem at this time.  There maybe a timeout value you can 
adjust in the registry so you dont need to wait as long.  See issue #43 & #45 
for more information.  If you have a suggestion for a working around, please 
reopen this bug on the github project page and we can try to get something in 
place.

Original comment by a...@1stleg.com on 11 Dec 2014 at 6:52