vparot / javahidapi

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

NullPointerException after opening device #21

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compiled on 64bit Ubuntu 12.4, copied the libhidapi-jni.so to /usr/lib
2. Running HIDAPITest lists mouse/keyboard and DataLogic barcodescanner 
successfully (DataLogic under /dev/hidraw3)
3. Uncomment the command readDevice for appropriate vendorID/productID or use 
the openByPath method.

What is the expected output? What do you see instead?
I expect an actual object returned by openByPath/ById,
buth it returns null on any listed USB-device, generating 
anNullPointerException on the next line:
System.err.print("Manufacturer: " + dev.getManufacturerString() + "\n");

What version of the product are you using? On what operating system?
v2011-12-21 on Ubuntu 12.4 x64

Please provide any additional information below.
Is there something trivial I am doing wrong? Listing devices works fine, 
however opening a device not.

Original issue reported on code.google.com by martijnv...@gmail.com on 1 Jun 2012 at 9:58

GoogleCodeExporter commented 9 years ago
Same here on Windows 7 64-Bit. openByPath/ById always returns null in the 
latest revision #354. Maybe it has something to do with the added 
64-Bit-Support. 

If used Revision #347 and everything works fine.

Original comment by nada...@gmx.net on 10 Jun 2012 at 4:37

GoogleCodeExporter commented 9 years ago
Also getting this issue now. Anyone have any idea why? I could go back but I 
need a 64bit dll. API is basically useless with this problem :(

Original comment by Reece.Sean on 11 Jun 2012 at 5:40

GoogleCodeExporter commented 9 years ago

Original comment by kroko...@gmail.com on 1 Aug 2012 at 1:38

GoogleCodeExporter commented 9 years ago
I try to call openById/Path in while loop and after second execution device is 
opened and returned, but I can not write or read anything.:( - Reading returns 
0, writing returns IOException - I have used last Repository sources.

Original comment by hanousek...@gmail.com on 2 Aug 2012 at 10:20

GoogleCodeExporter commented 9 years ago
I had to run the jvm as root in order to get actual non-null devices back. docs 
should be updated to explain the case where null is returned from openByID/Path

Original comment by jayhurle...@gmail.com on 26 Apr 2013 at 9:13

GoogleCodeExporter commented 9 years ago
Is here any progress, I have the same issue as described. How can I change the 
permissions for the java executables on a 64Bit Windows 7. I changed the 
permission for java.exe but it still returns null. while(hiddevice == null) 
{...open(); } no success as well, so any ideas?

Original comment by saunamei...@googlemail.com on 8 May 2013 at 9:48

GoogleCodeExporter commented 9 years ago
I am experiencing this issue on Win 7 64 bit. Is there a solution on the 
horizon?

Original comment by spam3a...@gmail.com on 17 Jul 2013 at 9:19