1

I have experienced a problem with Bluetooth Low-Energy.

I am developing Android application which collects data from multiple BLE sensors. The problem is that at one point the application becomes unresponsive and throws the following errors (And quite a lot of them...):

E/JavaBinder: !!! FAILED BINDER TRANSACTION !!!  (parcel size = 204)
E/BluetoothServiceJni: An exception was thrown by callback 'btgattc_notify_cb'.
E/BluetoothServiceJni: android.os.DeadObjectException: 
 Transaction failed on small parcel; remote process probably died
 at android.os.BinderProxy.transactNative(Native Method)
 at android.os.BinderProxy.transact(Binder.java:503)
 at android.bluetooth.IBluetoothGattCallback$Stub$Proxy.onNotify(IBluetoothGattCallback.java:848)
 at com.android.bluetooth.gatt.GattService.onNotify(GattService.java:860)

After receiving a bunch on these errors, the application crashes and re-starts itself.

OS: Android Marshmallow, 6.0.1 (MMB29V), March 2016 update. Devices tested on: Nexus 9 LTE (Model OP:82200), Nexus 7 WiFi (2013)

How to reproduce: Connect to BLE sensor(s) and enable notifications; at one point the above errors will occur.

I am not sure how to proceed with this. I have not been able to find anyone else having problems of similar nature.

Is is me or Android that introduced bug? Any help would be appreciated a lot! Thanks.

Added on 23.03.2016: Before the mentioned error, my Alarm also fails:

W/BroadcastQueue: Failure sending broadcast Intent { act=ALARM_UPLOAD flg=0x10000014 (has extras) }
android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died
 at android.os.BinderProxy.transactNative(Native Method)
 at android.os.BinderProxy.transact(Binder.java:503)
 at android.app.ApplicationThreadProxy.scheduleRegisteredReceiver(ApplicationThreadNative.java:1128)
 at com.android.server.am.BroadcastQueue.performReceiveLocked(BroadcastQueue.java:453)
 at com.android.server.am.BroadcastQueue.deliverToRegisteredReceiverLocked(BroadcastQueue.java:594)
 at com.android.server.am.BroadcastQueue.processNextBroadcast(BroadcastQueue.java:824)
 at com.android.server.am.ActivityManagerService.finishReceiver(ActivityManagerService.java:17118)
 at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:496)
 at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2483)
 at android.os.Binder.execTransact(Binder.java:453)

Also the following occurs before the crash (multiple times):

I/chatty: uid=1002(bluetooth) BT Service Call expire 339 lines

Furthermore, the garbage-collection is all over the place with Suspending all threads took: 58.471ms

Rain
  • 315
  • 4
  • 11
  • 1
    Have you checked the syslogs for traces of some bluetooth services restarting? This issue seems to be coming from the system, not your app. – allprog Mar 20 '16 at 22:06
  • Before the error mentioned, I get the following many times: `03-23 01:29:49.401 6147-6293/? I/chatty: uid=1002(bluetooth) BT Service Call expire 372 lines`. Also there is a lot of Garbage Collection going on, with `Suspending all thread took: XX ms`. Furthermore, I get `W/BroadcastQueue: Failure sending broadcast Intent { act=ALARM_UPLOAD flg=0x10000014 (has extras) } android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died` – Rain Mar 23 '16 at 09:19
  • Can it be that the notifications overload the system? [Check out this comment](http://stackoverflow.com/questions/18897304/corebluetooth-how-to-design-code-for-many-characteristics-30-40/18906146?noredirect=1#comment59891788_18906146) I know, this it is an iOS question but I can imagine that under similar loads both systems behave similarly. – allprog Mar 26 '16 at 13:39

0 Answers0