UmeshChoudhari / jnativehook

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

crash #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have found 2 issues. One is that it doesn't gets keyboard input correct 
(CAPITAL AND SMALL LETTERS) its gets always capitals, no matter if user typed 
in lowercase. 

And second big issue is crash. After it worked few times without errors, i 
stopped run. And recompiled code after i made some minor code chage, that 
shouldn't affect the app. It crashed, and i couln't run that app again, it 
allways displays that java crashed, even if i restored that variable value to 
the original. This is the error i am getting. Note after restart of system it 
works again fine for sometime, but after 10 or more compiling it crashes again 
and it wont compile again. I don't know whats the problem. I use Netbeans 7.1 
and JDK 7.

This is the error log:
Problem signature:
  Problem Event Name:   APPCRASH
  Application Name: java.exe
  Application Version:  7.0.0.147
  Application Timestamp:    4e084cc8
  Fault Module Name:    JNativeHook_1525371178332493695.dll
  Fault Module Version: 0.0.0.0
  Fault Module Timestamp:   504e0744
  Exception Code:   c0000005
  Exception Offset: 00000000000021e8
  OS Version:   6.1.7601.2.1.0.256.1
  Locale ID:    1033
  Additional Information 1: a320
  Additional Information 2: a3205a9372af9fc6cf46f4437371c348
  Additional Information 3: 7133
  Additional Information 4: 71338d95eea821a4aabd200fd07ae39a

Original issue reported on code.google.com by rajk...@gmail.com on 16 Sep 2012 at 4:16

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
The first issue is invalid.  The key character is not the same as the key text 
or key code.  If you need the difference between 'A' and 'a' you need to listen 
for key typed events and you need to access the key character not the key code. 
 This is identical to the way java.awt.event.KeyEvent works.  Please see 
[http://docs.oracle.com/javase/7/docs/api/java/awt/event/KeyEvent.html 
KeyEvent] and 
[http://jnativehook.googlecode.com/svn/tags/javadoc-1.1/org/jnativehook/keyboard
/NativeKeyEvent.html NativeKeyEvent] for more information.

The second issue is probably related to your tool-chain, however I can't know 
for sure without quite a bit more information.

What compiler are you using?

What are you modifying in the code? 

What is in your build.properties file?

Is there an error log in the directory where you executed the jar?  

It should be called hs_err_pid####.log or something to that effect.  Please 
attach it to this bug report.  You should also be compiling with the ant 
property project.debug set to true.  You can add that to the generated 
build.properties file or on the command line.  (Ex: ant -Dproject.debug=true 
clean compile jar)  This will provide debugging symbols and a decent crash 
report.

Original comment by a...@1stleg.com on 16 Sep 2012 at 7:13

GoogleCodeExporter commented 9 years ago
Yes you are right, about key character. 
well i modified one variable of mine.
public static boolean shift = true; 
i have changed it to false.And then crash happened but, that is not to reason 
of crash since i have done it after restart of machine and it worked ok with 
false value as well. And there is not log file(most likely) because i used 
System.out.println for debuging end getMessage() method.
project properties are in attachment. Compiler is default Netbeans compiler. I 
couln't find any info about it (it uses Compile on Save feature) thats all i 
know. And Netbeans doesnt uses javac for compiling i think.. And i use Netbeans 
7.2 not 7.1 i wish to correct that info. And another thing that will help you 
in investigation is that when that error happened i pasted my source files into 
eclipse and tried to compiled the same project, and it still didn't wanted to 
compile it. But compilation worked on my other project that doesn't use your 
lib. IDE compiled project with your lib. when i restarted my pc. 

Original comment by rajk...@gmail.com on 16 Sep 2012 at 8:06

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Compiler is: HotSpot 64-Bit Tiered Compilers
Check out the attachment i found some logs + there is a picture of error im 
getting.

Original comment by rajk...@gmail.com on 16 Sep 2012 at 11:41

Attachments:

GoogleCodeExporter commented 9 years ago
That error doesn't tell me a whole lot.  If the jvm crashed, it should leave a 
log file somewhere.

Original comment by a...@1stleg.com on 17 Sep 2012 at 1:43

GoogleCodeExporter commented 9 years ago
Can you reproduce the problem step by stem with a sample program?

Original comment by a...@1stleg.com on 17 Sep 2012 at 1:46

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
OK i will post source, but this everything can be my mistake :( i think i have 
forgot to do unhooking on program exit so it couldn't hook when i tried to 
compile again (can that be the reason of crash???).. since i have implemented 
that in my program, it doesn't crash anymore (or at least it didn't crash so 
far) if crash occurs again i will post source of my program so you can take a 
look at it. I just want to say once more thing that is offtopic: Thank you for 
your time and dedication, i personally think that you made booombastic 
software, very helpful and easy to use.

Original comment by rajk...@gmail.com on 17 Sep 2012 at 11:46

GoogleCodeExporter commented 9 years ago
"can that be the reason of crash???"  Yes, that maybe possible.  It certainly 
shouldn't cause the JVM to crash.  If you forgot to unregister the hook, the 
JVM would continue to execute even if you closed the listener.

Original comment by a...@1stleg.com on 17 Sep 2012 at 3:18

GoogleCodeExporter commented 9 years ago
I believe I know what caused this issue and I have fixed it in the trunk.

Original comment by a...@1stleg.com on 3 Oct 2012 at 10:40