日志:Queue 的 awaitRelease() 未释放 byte release() 方法时突然中断
Log: Queue's awaitRelease() has been interrupted abruptly while it wasn't released byte release() method
下面是 logcat 的一部分,其中包含我偶尔会看到的消息:Queue's awaitRelease() has been interrupted abruptly while it wasn't released byte release() method.
“byte
” 似乎是一个拼写错误。在项目中搜索字符串“byte release
”未找到任何内容。
这条消息来自哪里,它是什么意思?该程序似乎工作正常。
日志摘录:
12-15 12:54:07.933 26145-26797/com.calderadev.truecareccm.truecareservice D/RxBle#ConnectionOperationQueue: STARTED DescriptorWriteOperation(167521506)
12-15 12:54:07.938 26145-26820/com.calderadev.truecareccm.truecareservice D/BluetoothGatt: setCharacteristicNotification() - uuid: 00002a18-0000-1000-8000-00805f9b34fb enable: false
12-15 12:54:07.949 26145-26820/com.calderadev.truecareccm.truecareservice D/RxBle#ConnectionOperationQueue: QUEUED DescriptorWriteOperation(1053980218)
12-15 12:54:07.949 26145-26820/com.calderadev.truecareccm.truecareservice D/Glucometer: Unsubscribing from flushSubscription and GlucometerInteraction.
12-15 12:54:07.949 26145-26820/com.calderadev.truecareccm.truecareservice D/Glucometer: Sleeping for 1000MS and disconnecting from the glucometer.
12-15 12:54:07.949 26145-26820/com.calderadev.truecareccm.truecareservice D/AbstractBleDevice: Unsubscribed from connObservable; closing connection(?)
12-15 12:54:07.950 26145-26820/com.calderadev.truecareccm.truecareservice D/AbstractBleDevice: disconnect(): unsubscribing from connectionSubscription
12-15 12:54:07.952 26145-26795/com.calderadev.truecareccm.truecareservice D/RxBle#ClientOperationQueue: QUEUED DisconnectOperation(939620424)
12-15 12:54:07.954 26145-26205/com.calderadev.truecareccm.truecareservice D/RxBle#ClientOperationQueue: STARTED DisconnectOperation(939620424)
12-15 12:54:07.956 26145-26795/com.calderadev.truecareccm.truecareservice I/RxBle#ConnectionOperationQueue: Connection operations queue to be terminated (9C:35:83:0A:6D:F9)
12-15 12:54:07.956 26145-26256/com.calderadev.truecareccm.truecareservice D/BluetoothManager: getConnectionState()
12-15 12:54:07.956 26145-26256/com.calderadev.truecareccm.truecareservice D/BluetoothManager: getConnectedDevices
12-15 12:54:07.957 26145-26797/com.calderadev.truecareccm.truecareservice W/RxBle#ConnectionOperationQueue: Queue's awaitRelease() has been interrupted abruptly while it wasn't released byte release() method.
java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at com.polidea.rxandroidble.internal.serialization.QueueSemaphore.awaitRelease(QueueSemaphore.java:15)
at com.polidea.rxandroidble.internal.serialization.ConnectionOperationQueueImpl.run(ConnectionOperationQueueImpl.java:64)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
12-15 12:54:07.967 26145-26256/com.calderadev.truecareccm.truecareservice D/BluetoothGatt: cancelOpen() - device: 9C:35:83:0A:6D:F9
12-15 12:54:07.974 26145-26162/com.calderadev.truecareccm.truecareservice D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=6 device=9C:35:83:0A:6D:F9
12-15 12:54:07.975 26145-26162/com.calderadev.truecareccm.truecareservice D/RxBle#BluetoothGatt: onConnectionStateChange newState=0 status=0
12-15 12:54:07.976 26145-26797/com.calderadev.truecareccm.truecareservice D/RxBle#ConnectionOperationQueue: FINISHED DescriptorWriteOperation(167521506)
12-15 12:54:07.979 26145-26256/com.calderadev.truecareccm.truecareservice D/BluetoothGatt: close()
12-15 12:54:07.980 26145-26256/com.calderadev.truecareccm.truecareservice D/BluetoothGatt: unregisterApp() - mClientIf=6
12-15 12:54:07.982 26145-26205/com.calderadev.truecareccm.truecareservice D/RxBle#ClientOperationQueue: FINISHED DisconnectOperation(939620424)
12-15 12:54:07.984 26145-26797/com.calderadev.truecareccm.truecareservice D/RxBle#Executors$RunnableAdapter: Terminated.
12-15 12:54:08.950 26145-26820/com.calderadev.truecareccm.truecareservice D/MainActivity: Restarting scan for Glucometer in 130 seconds.
12-15 12:56:18.960 26145-26145/com.calderadev.truecareccm.truecareservice D/ReactiveBluetoothHelpers: Subscribed to glucoseScanner
它来自 QueueSemaphore.java。此拼写错误已在 master 中修复。
您不必担心,库的状态已正确清理。发生这种情况是因为您的 DescriptorWriteOperation
在断开连接操作 "abruptly interrupted" 时阻塞了信号量。
我也遇到了这个问题。后来查明原因是负责这一段的同事设置了BLE设备定时自动断开。更改此设置,问题解决。
下面是 logcat 的一部分,其中包含我偶尔会看到的消息:Queue's awaitRelease() has been interrupted abruptly while it wasn't released byte release() method.
“byte
” 似乎是一个拼写错误。在项目中搜索字符串“byte release
”未找到任何内容。
这条消息来自哪里,它是什么意思?该程序似乎工作正常。
日志摘录:
12-15 12:54:07.933 26145-26797/com.calderadev.truecareccm.truecareservice D/RxBle#ConnectionOperationQueue: STARTED DescriptorWriteOperation(167521506)
12-15 12:54:07.938 26145-26820/com.calderadev.truecareccm.truecareservice D/BluetoothGatt: setCharacteristicNotification() - uuid: 00002a18-0000-1000-8000-00805f9b34fb enable: false
12-15 12:54:07.949 26145-26820/com.calderadev.truecareccm.truecareservice D/RxBle#ConnectionOperationQueue: QUEUED DescriptorWriteOperation(1053980218)
12-15 12:54:07.949 26145-26820/com.calderadev.truecareccm.truecareservice D/Glucometer: Unsubscribing from flushSubscription and GlucometerInteraction.
12-15 12:54:07.949 26145-26820/com.calderadev.truecareccm.truecareservice D/Glucometer: Sleeping for 1000MS and disconnecting from the glucometer.
12-15 12:54:07.949 26145-26820/com.calderadev.truecareccm.truecareservice D/AbstractBleDevice: Unsubscribed from connObservable; closing connection(?)
12-15 12:54:07.950 26145-26820/com.calderadev.truecareccm.truecareservice D/AbstractBleDevice: disconnect(): unsubscribing from connectionSubscription
12-15 12:54:07.952 26145-26795/com.calderadev.truecareccm.truecareservice D/RxBle#ClientOperationQueue: QUEUED DisconnectOperation(939620424)
12-15 12:54:07.954 26145-26205/com.calderadev.truecareccm.truecareservice D/RxBle#ClientOperationQueue: STARTED DisconnectOperation(939620424)
12-15 12:54:07.956 26145-26795/com.calderadev.truecareccm.truecareservice I/RxBle#ConnectionOperationQueue: Connection operations queue to be terminated (9C:35:83:0A:6D:F9)
12-15 12:54:07.956 26145-26256/com.calderadev.truecareccm.truecareservice D/BluetoothManager: getConnectionState()
12-15 12:54:07.956 26145-26256/com.calderadev.truecareccm.truecareservice D/BluetoothManager: getConnectedDevices
12-15 12:54:07.957 26145-26797/com.calderadev.truecareccm.truecareservice W/RxBle#ConnectionOperationQueue: Queue's awaitRelease() has been interrupted abruptly while it wasn't released byte release() method.
java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at com.polidea.rxandroidble.internal.serialization.QueueSemaphore.awaitRelease(QueueSemaphore.java:15)
at com.polidea.rxandroidble.internal.serialization.ConnectionOperationQueueImpl.run(ConnectionOperationQueueImpl.java:64)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
12-15 12:54:07.967 26145-26256/com.calderadev.truecareccm.truecareservice D/BluetoothGatt: cancelOpen() - device: 9C:35:83:0A:6D:F9
12-15 12:54:07.974 26145-26162/com.calderadev.truecareccm.truecareservice D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=6 device=9C:35:83:0A:6D:F9
12-15 12:54:07.975 26145-26162/com.calderadev.truecareccm.truecareservice D/RxBle#BluetoothGatt: onConnectionStateChange newState=0 status=0
12-15 12:54:07.976 26145-26797/com.calderadev.truecareccm.truecareservice D/RxBle#ConnectionOperationQueue: FINISHED DescriptorWriteOperation(167521506)
12-15 12:54:07.979 26145-26256/com.calderadev.truecareccm.truecareservice D/BluetoothGatt: close()
12-15 12:54:07.980 26145-26256/com.calderadev.truecareccm.truecareservice D/BluetoothGatt: unregisterApp() - mClientIf=6
12-15 12:54:07.982 26145-26205/com.calderadev.truecareccm.truecareservice D/RxBle#ClientOperationQueue: FINISHED DisconnectOperation(939620424)
12-15 12:54:07.984 26145-26797/com.calderadev.truecareccm.truecareservice D/RxBle#Executors$RunnableAdapter: Terminated.
12-15 12:54:08.950 26145-26820/com.calderadev.truecareccm.truecareservice D/MainActivity: Restarting scan for Glucometer in 130 seconds.
12-15 12:56:18.960 26145-26145/com.calderadev.truecareccm.truecareservice D/ReactiveBluetoothHelpers: Subscribed to glucoseScanner
它来自 QueueSemaphore.java。此拼写错误已在 master 中修复。
您不必担心,库的状态已正确清理。发生这种情况是因为您的 DescriptorWriteOperation
在断开连接操作 "abruptly interrupted" 时阻塞了信号量。
我也遇到了这个问题。后来查明原因是负责这一段的同事设置了BLE设备定时自动断开。更改此设置,问题解决。