Android Question USB 0.96 Issues

osasigbinedion

Member
Licensed User
I get this error an average of 5 minutes after succesfully sending commands and receiving responses over usb.

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.nio.ByteBuffer.isDirect()' on a null object reference
at android.hardware.usb.UsbRequest.dequeue(UsbRequest.java:156)
at android.hardware.usb.UsbDeviceConnection.requestWait(UsbDeviceConnection.java:230)
at anywheresoftware.b4a.objects.usb.UsbDeviceConnectionWrapper$Reader.run(UsbDeviceConnectionWrapper.java:146)
at java.lang.Thread.run(Thread.java:818)



In the new data sub I call continue Listening after releasing requests...any clue on what could be happening. I also see that the latest USB library is v0.97 and I have no clue where to find it.
 

osasigbinedion

Member
Licensed User
This library catches the error and doesn't pass it up. So I am stuck waiting on the NewData event which won't happen because the usb stream is broken. I would like this exception to be passed up so I can handle it and gracefully attempt a disconnect/reconnect sequence.
 
Top