java.io.IOException: [JSR82]

Scantech

Well-Known Member
Licensed User
Longtime User
Erel, Check out the logcat. Do a search for java.io.IOException: [JSR82]. I get this Error once in while. Maybe for every 6-10 attempts. I use 3 attempts to make sure I close the Astream or else Unpair/Pair is required. If first attempt does not close the Astream then 2nd will and with 100% of the time will close it successfully.


B4X:
Dim x As Int
   For x = 1 To 3
      If Astreams.IsInitialized Then
         Try
            Log("Attempt " & x)
            Log("Astream.Close")
            Astreams.Close
            Log("Serial1.Disconnect")
            Serial1.Disconnect
            Exit
         Catch
            Log(LastException.Message)
         End Try
      End If
   Next
 

Attachments

  • Log2.txt
    15 KB · Views: 298

Scantech

Well-Known Member
Licensed User
Longtime User
I duplicated the exception fault with try catch removed. I had to compress the txt file. It is too large.

java.io.IOException: [JSR82] close: destroy() failed.
 

Attachments

  • Log3.zip
    16.6 KB · Views: 200
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
This is the relevant part:
B4X:
Astreams.Close
java.io.IOException: [JSR82] close: destroy() failed.
   at android.bluetooth.BluetoothSocket.close(BluetoothSocket.java:403)
   at android.bluetooth.BluetoothInputStream.close(BluetoothInputStream.java:75)
   at anywheresoftware.b4a.randomaccessfile.AsyncStreams$AIN.close(AsyncStreams.java:209)
   at anywheresoftware.b4a.randomaccessfile.AsyncStreams.Close(AsyncStreams.java:106)
   at Scantech.CarGaugeLite.main._mnudisconnect_click(main.java:4191)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:552)
   at anywheresoftware.b4a.BA.raiseEvent2(BA.java:105)
   at anywheresoftware.b4a.BA.raiseEvent(BA.java:89)
   at Scantech.CarGaugeLite.main$B4AMenuItemsClickListener.onMenuItemClick(main.java:117)
   at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:168)
   at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:886)
   at com.android.internal.view.menu.IconMenuView.invokeItem(IconMenuView.java:583)
   at com.android.internal.view.menu.IconMenuItemView.performClick(IconMenuItemView.java:153)
   at android.view.View$PerformClick.run(View.java:8866)
   at android.os.Handler.handleCallback(Handler.java:618)
   at android.os.Handler.dispatchMessage(Handler.java:123)
   at android.os.Looper.loop(Looper.java:154)
   at android.app.ActivityThread.main(ActivityThread.java:4668)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:552)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:917)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:674)
   at dalvik.system.NativeStart.main(Native Method)
java.io.IOException: [JSR82] close: destroy() failed.

It seems like an issue with this specific device. Which model are you using?
 
Upvote 0
Top