Hi,最近剛接觸安卓6.0藍牙開發,遇到com.android.bluetooth 行程終止,請問我應該怎么從log分析,定位到問題原因或者例外代碼位置。
log:
11-05 14:34:45.262 2380 3741 D BluetoothHeadset: Proxy object disconnected
11-05 14:34:45.262 5608 5608 D BluetoothInputDevice: Proxy object disconnected
11-05 14:34:45.262 5608 5608 D HidProfile: Bluetooth service disconnected
11-05 14:34:45.262 5608 5608 D BluetoothA2dp: Proxy object disconnected
11-05 14:34:45.263 5608 5608 D BluetoothPan: BluetoothPAN Proxy object disconnected
11-05 14:34:45.263 5608 5608 D BluetoothPan: BluetoothPAN Proxy object disconnected
11-05 14:34:45.263 5608 5608 D PanProfile: Bluetooth service disconnected
11-05 14:34:45.263 5608 5608 D BluetoothPbap: Proxy object disconnected
11-05 14:34:45.263 5608 5608 D PbapServerProfile: Bluetooth service disconnected
11-05 14:34:45.263 5608 5608 D BluetoothMap: Proxy object disconnected
11-05 14:34:45.263 5608 5608 D MapProfile: Bluetooth service disconnected
11-05 14:34:45.263 2380 3737 D GraphicsStats: Buffer count: 17
11-05 14:34:45.263 5608 5626 D BluetoothHeadset: Proxy object disconnected
11-05 14:34:45.263 5608 5608 D HeadsetProfile: Bluetooth service disconnected
11-05 14:34:45.263 386 6470 V AudioFlinger: 13743 died, releasing its sessions
11-05 14:34:45.264 386 6470 V AudioFlinger: pid 2380 @ 0
11-05 14:34:45.264 386 6470 V AudioFlinger: pid 2380 @ 1
11-05 14:34:45.264 386 6470 V AudioFlinger: pid 2380 @ 2
11-05 14:34:45.264 386 6470 V AudioFlinger: pid 2380 @ 3
11-05 14:34:45.264 386 6470 V AudioFlinger: pid 3379 @ 4
11-05 14:34:45.265 12055 12067 D BluetoothHeadset: Proxy object disconnected
11-05 14:34:45.265 3379 3609 D BluetoothHeadset: Proxy object disconnected
11-05 14:34:45.265 2380 3741 D BluetoothHeadset: Proxy object disconnected
11-05 14:34:45.265 2380 3741 D BluetoothHeadset: Proxy object disconnected
11-05 14:34:45.267 3379 3379 D BluetoothInputDevice: Proxy object disconnected
11-05 14:34:45.267 3379 3379 D HidProfile: Bluetooth service disconnected
11-05 14:34:45.267 3379 3379 D BluetoothA2dp: Proxy object disconnected
11-05 14:34:45.267 3379 3379 D BluetoothPan: BluetoothPAN Proxy object disconnected
11-05 14:34:45.267 3379 3379 D PanProfile: Bluetooth service disconnected
11-05 14:34:45.267 3379 3379 D BluetoothPbap: Proxy object disconnected
11-05 14:34:45.267 3379 3379 D PbapServerProfile: Bluetooth service disconnected
11-05 14:34:45.267 3379 3379 D BluetoothMap: Proxy object disconnected
11-05 14:34:45.267 3379 3379 D MapProfile: Bluetooth service disconnected
11-05 14:34:45.267 3379 3379 D HeadsetProfile: Bluetooth service disconnected
11-05 14:34:45.268 2380 2380 E BluetoothDevice:
11-05 14:34:45.268 2380 2380 E BluetoothDevice: android.os.DeadObjectException
11-05 14:34:45.268 2380 2380 E BluetoothDevice: at android.os.BinderProxy.transactNative(Native Method)
11-05 14:34:45.268 2380 2380 E BluetoothDevice: at android.os.BinderProxy.transact(Binder.java:503)
11-05 14:34:45.268 2380 2380 E BluetoothDevice: at android.bluetooth.IBluetooth$Stub$Proxy.getRemoteClass(IBluetooth.java:1440)
11-05 14:34:45.268 2380 2380 E BluetoothDevice: at android.bluetooth.BluetoothDevice.getBluetoothClass(BluetoothDevice.java:1035)
11-05 14:34:45.268 2380 2380 E BluetoothDevice: at com.android.server.audio.AudioService.setBtScoDeviceConnectionState(AudioService.java:3039)
11-05 14:34:45.268 2380 2380 E BluetoothDevice: at com.android.server.audio.AudioService$2.onServiceDisconnected(AudioService.java:3235)
11-05 14:34:45.268 2380 2380 E BluetoothDevice: at android.bluetooth.BluetoothHeadset$3.handleMessage(BluetoothHeadset.java:1003)
11-05 14:34:45.268 2380 2380 E BluetoothDevice: at android.os.Handler.dispatchMessage(Handler.java:102)
11-05 14:34:45.268 2380 2380 E BluetoothDevice: at android.os.Looper.loop(Looper.java:148)
11-05 14:34:45.268 2380 2380 E BluetoothDevice: at com.android.server.SystemServer.run(SystemServer.java:283)
11-05 14:34:45.268 2380 2380 E BluetoothDevice: at com.android.server.SystemServer.main(SystemServer.java:168)
11-05 14:34:45.268 2380 2380 E BluetoothDevice: at java.lang.reflect.Method.invoke(Native Method)
11-05 14:34:45.268 2380 2380 E BluetoothDevice: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
11-05 14:34:45.268 2380 2380 E BluetoothDevice: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
11-05 14:34:45.269 2380 2380 E BluetoothDevice:
11-05 14:34:45.269 2380 2380 E BluetoothDevice: android.os.DeadObjectException
11-05 14:34:45.269 2380 2380 E BluetoothDevice: at android.os.BinderProxy.transactNative(Native Method)
11-05 14:34:45.269 2380 2380 E BluetoothDevice: at android.os.BinderProxy.transact(Binder.java:503)
11-05 14:34:45.269 2380 2380 E BluetoothDevice: at android.bluetooth.IBluetooth$Stub$Proxy.getRemoteName(IBluetooth.java:1343)
11-05 14:34:45.269 2380 2380 E BluetoothDevice: at android.bluetooth.BluetoothDevice.getName(BluetoothDevice.java:726)
11-05 14:34:45.269 2380 2380 E BluetoothDevice: at com.android.server.audio.AudioService.setBtScoDeviceConnectionState(AudioService.java:3060)
11-05 14:34:45.269 2380 2380 E BluetoothDevice: at com.android.server.audio.AudioService$2.onServiceDisconnected(AudioService.java:3235)
11-05 14:34:45.269 2380 2380 E BluetoothDevice: at android.bluetooth.BluetoothHeadset$3.handleMessage(BluetoothHeadset.java:1003)
11-05 14:34:45.269 2380 2380 E BluetoothDevice: at android.os.Handler.dispatchMessage(Handler.java:102)
11-05 14:34:45.269 2380 2380 E BluetoothDevice: at android.os.Looper.loop(Looper.java:148)
11-05 14:34:45.269 2380 2380 E BluetoothDevice: at com.android.server.SystemServer.run(SystemServer.java:283)
11-05 14:34:45.269 2380 2380 E BluetoothDevice: at com.android.server.SystemServer.main(SystemServer.java:168)
11-05 14:34:45.269 2380 2380 E BluetoothDevice: at java.lang.reflect.Method.invoke(Native Method)
11-05 14:34:45.269 2380 2380 E BluetoothDevice: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
11-05 14:34:45.269 2380 2380 E BluetoothDevice: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
11-05 14:34:45.269 2380 2380 D BluetoothA2dp: Proxy object disconnected
11-05 14:34:45.269 2380 2380 D AudioService: mConnectedBTDevicesList size 1
11-05 14:34:45.269 2380 2380 D AudioService: checkSendBecomingNoisyIntent update the noise
11-05 14:34:45.269 2380 2558 E BluetoothManagerService: MESSAGE_BLUETOOTH_SERVICE_DISCONNECTED: 1
11-05 14:34:45.269 2380 2558 D BluetoothManagerService: Broadcasting onBluetoothServiceDown() to 5 receivers.
11-05 14:34:45.270 386 3895 V AudioFlinger: setParameters(): io 0, keyvalue A2dpSuspended=true, calling pid 2380
11-05 14:34:45.270 386 3895 D audio_hw_primary: adev_set_parameters: enter: A2dpSuspended=true
11-05 14:34:45.270 386 3895 E voice : voice_extn_compress_voip_set_parameters: COMPRESS_VOIP_ENABLED is not defined
11-05 14:34:45.270 386 3895 V msm8916_platform: platform_set_parameters: enter: - A2dpSuspended=true
11-05 14:34:45.270 386 3895 V msm8916_platform: platform_set_parameters: exit with code(0)
11-05 14:34:45.270 386 3895 D audio_hw_extn: audio_extn_set_anc_parameters: anc_enabled:0
11-05 14:34:45.270 386 3895 V audio_hw_primary: adev_set_parameters: exit with code(0)
11-05 14:34:45.270 386 3895 I bt_a2dp_hw: adev_set_parameters: state 0
11-05 14:34:45.270 386 3895 I bt_a2dp_hw: out_set_parameters: state 0
11-05 14:34:45.270 386 3895 I str_params: key: 'A2dpSuspended' value: 'true'
11-05 14:34:45.364 2380 2559 W AppOps : Finishing op nesting under-run: uid 1000 pkg android code 24 time=0 duration=0 nesting=0
11-05 14:34:45.475 2380 2418 E libprocessgroup: failed to kill 1 processes for processgroup 13743
11-05 14:34:45.476 2380 2418 I ActivityManager: Process com.android.bluetooth (pid 13743) has died
uj5u.com熱心網友回復:
這種情況出現,意味著你的藍牙主行程crash了。Android系統會生成詳細的crash資訊。第一個是在logcat中搜索AndroidRuntime,看是否有com.android.bluetooth的報錯。AndroidRuntime是Java層的代碼例外所列印的錯誤資訊,例如空指標參考等。
第二個是在你的開發板的/data/tombstones目錄下,查看tombstone檔案。一般C/C++層代碼出錯,都會生成tombstone檔案。每一個出錯生成一個tombstone檔案。所以可能會在該目錄下看到多個。挨個打開查看,可以看到crash的地方,運氣好還能看到函式堆疊,清晰地看到那個檔案哪個函式出錯了。如果看不到函式堆疊,在tombstone檔案最下面還有crash時的logcat資訊,可以從這里找找線索,看看哪里導致了crash。
uj5u.com熱心網友回復:
這種情況出現,意味著你的藍牙主行程crash了。Android系統會生成詳細的crash資訊。第一個是在logcat中搜索AndroidRuntime,看是否有com.android.bluetooth的報錯。AndroidRuntime是Java層的代碼例外所列印的錯誤資訊,例如空指標參考等。
第二個是在你的開發板的/data/tombstones目錄下,查看tombstone檔案。一般C/C++層代碼出錯,都會生成tombstone檔案。每一個出錯生成一個tombstone檔案。所以可能會在該目錄下看到多個。挨個打開查看,可以看到crash的地方,運氣好還能看到函式堆疊,清晰地看到那個檔案哪個函式出錯了。如果看不到函式堆疊,在tombstone檔案最下面還有crash時的logcat資訊,可以從這里找找線索,看看哪里導致了crash。
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/105472.html
標籤:Android
