B4J Question jBluetooth error: java.lang.NegativeArraySizeException

peacemaker

Expert
Licensed User
Longtime User
HI, All

Trying Bluetooth SPP (COM-port) connection from B4J PC to Android app "Bluetooth SPP Manager".
The canonical jBluetooth example, lib v.1.01.
Discovering was OK, and connection was OK.
Sending a message from PC to Android was OK, but reply back gives this error, and it's disconnected:

Waiting for debugger to connect...
Program started.
BlueCove version 2.1.1-SNAPSHOT on winsock
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
Service search completed. Exit code: 4
BT connected=false
BT connected=true
java.lang.NegativeArraySizeException: -792735360
at anywheresoftware.b4a.randomaccessfile.AsyncStreams$AIN.run(AsyncStreams.java:309)
at java.base/java.lang.Thread.run(Thread.java:834)
jRandomAcceessFile lib is v.2.34.
How to be ?
 

peacemaker

Expert
Licensed User
Longtime User
Found more:
1) Trouble only with non-ASCII message from Android to B4J, if the stream is initialized with the prefix.
2) Without prefix - any message including non-ASCII are going OK any direction.
 
Upvote 0
Top