Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LiveEffect sample] Crashes when plug in/out a headset #441

Closed
taemincho opened this issue Apr 5, 2019 · 5 comments
Closed

[LiveEffect sample] Crashes when plug in/out a headset #441

taemincho opened this issue Apr 5, 2019 · 5 comments
Assignees

Comments

@taemincho
Copy link

Hi,

When a headset is pluged in/out, the error callbacks were not called (onErrorBeforeClose, onErrorAfterClose and crashed with assertion fails (04-05 16:52:42.721 14968-15013/com.google.sample.oboe.liveeffect A/AudioTrackShared: Assertion failed: !(stepCount <= mUnreleased && mUnreleased <= mFrameCount))

details are below:

Device: ZTE N9132
Oboe from the latest master branch
Android version 5.1.1

  • OpenSLES input stream without a data callback
    SampleRate 48000 Channel 2 FramesPerCallback 192 BufferSizeInFrames 3072 BufferCapacityInFrames 3072 FramesPerBurst 192, format: I16, sharingMode Shared, performance Mode: None
  • OpenSLES output stream
    SampleRate 48000 Channel 2 FramesPerCallback 192 BufferSizeInFrames 384 BufferCapacityInFrames 384 FramesPerBurst 192, format: I16, sharingMode Shared, performanceMode None

Logs

04-05 16:52:41.281 12955-12955/? E/AUD_MediaButtonIntentReceiver: receive action: android.media.AUDIO_BECOMING_NOISY
04-05 16:52:41.281 12955-12955/? E/AUD_MediaButtonIntentReceiver: Earphone has been removed.
04-05 16:52:41.781 829-1072/? E/WifiStateMachine: handleMessage: E msg.what=131155
04-05 16:52:41.781 829-1072/? E/WifiStateMachine: processMsg: ConnectedState
04-05 16:52:41.781 829-1072/? E/WifiStateMachine: processMsg: L2ConnectedState
04-05 16:52:41.781 829-1072/? E/WifiStateMachine: get link layer stats 0
04-05 16:52:41.801 829-1090/? D/WifiWatchdogStateMachine: RSSI current: 4 new: -56, 4
04-05 16:52:41.801 1127-1127/? D/StatusBar.NetworkController: hasService: mServiceState=1 1 home ZTE null 310000 Unknown Unknown CSS not supported 0 0 RoamInd=1 RoamStatus(sprint)= 0 DefRoamInd=1 EmergOnly=false retVal=false
04-05 16:52:41.801 1127-1127/? D/StatusBar.NetworkController: refreshViews: Data not connected!! Set no data type icon / Roaming
04-05 16:52:41.801 1127-1127/? D/StatusBar.NetworkController: hasService: mServiceState=1 1 home ZTE null 310000 Unknown Unknown CSS not supported 0 0 RoamInd=1 RoamStatus(sprint)= 0 DefRoamInd=1 EmergOnly=false retVal=false
04-05 16:52:41.801 1127-1127/? D/StatusBar.NetworkController: refreshViews connected={ wifi } level=0 combinedSignalIconId=0x7f020488/com.android.systemui:drawable/stat_sys_wifi_signal_4_fully_google combinedActivityIconId=0x0 wifiLabel="SLHQ"xxxxXXXXxxxxXXXX emergencyOnly=false mAirplaneMode=false mDataActivity=0 mPhoneSignalIconId=0x7f020457/com.android.systemui:drawable/stat_sys_signal_null mQSPhoneSignalIconId=0x7f0200f1/com.android.systemui:drawable/ic_qs_signal_no_signal mDataDirectionIconId=0x0/(null) mDataSignalIconId=0x7f020457/com.android.systemui:drawable/stat_sys_signal_null mDataTypeIconId=0x0/(null) mQSDataTypeIconId=0x0/(null) mNoSimIconId=0x0/(null) mWifiIconId=0x7f020488/com.android.systemui:drawable/stat_sys_wifi_signal_4_fully_google mQSWifiIconId=0x7f020101/com.android.systemui:drawable/ic_qs_wifi_full_4 mWifiActivityIconId=0x0/(null) mBluetoothTetherIconId=0x7f020466/com.android.systemui:drawable/stat_sys_tether_bluetooth
04-05 16:52:41.801 1127-1127/? D/StatusBar.NetworkController: refreshViews mobileLabel = ; combinedLabel="SLHQ"xxxxXXXXxxxxXXXX
04-05 16:52:41.801 1127-1127/? I/systemUI_SprintNetworkControlImpl: mAirplaneMode = false,state = READY, newMobileLabel =
04-05 16:52:41.801 1127-1127/? E/StatusBar.NetworkController: mAirplaneMode = false,mSimState = READY
04-05 16:52:41.801 1127-1127/? I/systemUI_SprintNetworkControlImpl: mAirplaneMode = false,state = READY, CarrierText = No service.
04-05 16:52:41.801 829-1072/? E/WifiStateMachine: handleMessage: X
04-05 16:52:42.281 316-866/? E/AudioPolicyManager: setForceUse() usage 1, config 0, mPhoneState 0
04-05 16:52:42.281 316-866/? E/AudioPolicyManager: setOutputDevice() output 2 device 0000 force 0 delayMs 0
04-05 16:52:42.281 316-866/? E/AudioPolicyManager: setOutputDevice() output 4 device 0004 force 1 delayMs 0
04-05 16:52:42.301 316-1053/? D/audio_hw_primary: out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=4
04-05 16:52:42.301 316-1053/? E/audio_hw_primary: select_devices: chenjun: usecase id(1):type(0), uc_id(1)
04-05 16:52:42.301 316-1053/? E/msm8916_platform: platform_get_output_snd_device: enter: output devices(0x4), mode(0)
04-05 16:52:42.301 316-1053/? D/audio_hw_extn: audio_extn_get_anc_enabled: anc_enabled:0
04-05 16:52:42.311 316-866/? E/AudioPolicyManager: getDeviceForInputSource()input source 6, device 80000010
04-05 16:52:42.311 316-316/? E/AudioPolicyManager: av-setDeviceConnectionState() device: 4, state 0, address
04-05 16:52:42.311 316-862/? V/SRS_Proc: ParamSet string: disconnect=4
04-05 16:52:42.311 316-862/? D/audio_hw_primary: adev_set_parameters: enter: disconnect=4
04-05 16:52:42.311 316-862/? D/audio_hw_extn: audio_extn_set_anc_parameters: anc_enabled:0
04-05 16:52:42.311 316-862/? E/audio_a2dp_hw: adev_set_parameters: ERROR: set param called even when stream out is null
04-05 16:52:42.311 316-316/? E/AudioPolicyManager: setOutputDevice() output 2 device 0000 force 1 delayMs 0
04-05 16:52:42.311 316-316/? E/AudioPolicyManager: setOutputDevice() output 4 device 0002 force 1 delayMs 0
04-05 16:52:42.441 316-1053/? D/audio_hw_primary: out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2
04-05 16:52:42.441 316-1053/? E/audio_hw_primary: select_devices: chenjun: usecase id(1):type(0), uc_id(1)
04-05 16:52:42.441 316-1053/? E/msm8916_platform: platform_get_output_snd_device: enter: output devices(0x2), mode(0)
04-05 16:52:42.441 316-1053/? D/audio_hw_primary: select_devices: out_snd_device(29: voip-speaker) in_snd_device(0: ):usecase(1: low-latency-playback)
04-05 16:52:42.451 316-1053/? D/soundtrigger: audio_extn_sound_trigger_update_stream_status: uc_id 1 of type 0 for Event 2, with Raise=0
04-05 16:52:42.451 316-1053/? D/hardware_info: hw_info_append_hw_type : device_name = voip-headphones
04-05 16:52:42.591 316-1053/? I/soundtrigger: audio_extn_sound_trigger_update_device_status: device 0x1e of type 0 for Event 0, with Raise=0
04-05 16:52:42.591 316-1053/? D/hardware_info: hw_info_append_hw_type : device_name = voip-speaker
04-05 16:52:42.591 316-1053/? I/soundtrigger: audio_extn_sound_trigger_update_device_status: device 0x1d of type 0 for Event 1, with Raise=0
04-05 16:52:42.601 316-1053/? W/audio_hw_utils: audio_extn_utils_update_stream_app_type_cfg: App type could not be selected. Falling back to default
04-05 16:52:42.601 316-1053/? I/audio_hw_primary: select_devices Selected apptype: 69936
04-05 16:52:42.601 316-1053/? D/soundtrigger: audio_extn_sound_trigger_update_stream_status: uc_id 1 of type 0 for Event 3, with Raise=0
04-05 16:52:42.601 316-1053/? D/ACDB-LOADER: ACDB -> send_audio_cal, acdb_id = 132, path = 0
04-05 16:52:42.601 316-1053/? D/ACDB-LOADER: ACDB -> send_asm_topology
04-05 16:52:42.601 316-1053/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_STREAM_TOPOLOGY_ID
04-05 16:52:42.601 316-1053/? D/ACDB-LOADER: ACDB -> send_adm_topology
04-05 16:52:42.601 316-1053/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TOPOLOGY_ID
04-05 16:52:42.601 316-1053/? D/ACDB-LOADER: ACDB -> send_audtable
04-05 16:52:42.601 316-1053/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE
04-05 16:52:42.601 316-1053/? D/ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_CAL
04-05 16:52:42.601 316-1053/? D/ACDB-LOADER: ACDB -> send_audvoltable
04-05 16:52:42.601 316-1053/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_GAIN_DEP_STEP_TABLE
04-05 16:52:42.601 316-1053/? D/ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_VOL_CAL
04-05 16:52:42.601 316-1053/? D/ACDB-LOADER: ACDB -> send_afe_cal
04-05 16:52:42.601 316-1053/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AFE_COMMON_TABLE
04-05 16:52:42.601 316-1053/? D/ACDB-LOADER: ACDB -> AUDIO_SET_AFE_CAL
04-05 16:52:42.601 316-1053/? D/ACDB-LOADER: ACDB -> send_hw_delay : acdb_id = 132 path = 0
04-05 16:52:42.601 316-1053/? D/ACDB-LOADER: ACDB -> ACDB_AVSYNC_INFO: ACDB_CMD_GET_DEVICE_PROPERTY
04-05 16:52:42.601 316-1053/? I/audio_hw_utils: audio_extn_utils_send_app_type_cfg app_type 69936, acdb_dev_id 132, sample_rate 48000
04-05 16:52:42.611 316-1053/? D/audio_hw_primary: select_devices: done
04-05 16:52:42.611 829-829/? D/Telecom: WiredHeadsetManager: ACTION_HEADSET_PLUG event, plugged in: false
04-05 16:52:42.621 829-829/? D/Telecom: WiredHeadsetManager: onHeadsetPluggedInChanged, mIsPluggedIn: true -> false
04-05 16:52:42.621 829-829/? D/Telecom: TtyManager: onWiredHeadsetPluggedInChanged
04-05 16:52:42.621 829-829/? D/Telecom: TtyManager: isTtySupported: true
04-05 16:52:42.621 829-829/? D/Telecom: TtyManager: updateCurrentTtyMode, 0 -> 0
04-05 16:52:42.621 829-829/? D/Telecom: TtyManager: cancelHeadSetPlugin()...
04-05 16:52:42.621 316-867/? E/AudioPolicyManager: av-setDeviceConnectionState() device: 80000010, state 0, address
04-05 16:52:42.621 829-829/? D/ledlog: shuangdan RGB=0xFF00FF00 com.google.android.gm
04-05 16:52:42.621 316-862/? V/SRS_Proc: ParamSet string: disconnect=-2147483632
04-05 16:52:42.621 316-862/? D/audio_hw_primary: adev_set_parameters: enter: disconnect=-2147483632
04-05 16:52:42.621 316-862/? D/audio_hw_extn: audio_extn_set_anc_parameters: anc_enabled:0
04-05 16:52:42.621 316-862/? E/audio_a2dp_hw: adev_set_parameters: ERROR: set param called even when stream out is null
04-05 16:52:42.621 1127-1803/? D/StatusBar: remove notification : com.android.server.telecom
04-05 16:52:42.621 1127-1127/? D/NotificationPanelView: onHeightChanged
04-05 16:52:42.621 1127-1127/? D/PanelView: requestPanelHeightUpdate - currentMaxPanelHeight: 806.0
04-05 16:52:42.621 1127-1127/? D/NotificationPanelView: onHeightChanged
04-05 16:52:42.621 1127-1127/? D/PanelView: requestPanelHeightUpdate - currentMaxPanelHeight: 806.0
04-05 16:52:42.631 1127-1127/? E/miva_haha: mState = 0
04-05 16:52:42.631 1127-1127/? E/miva_haha: mState = 0
04-05 16:52:42.631 1127-1127/? E/StackScrollAlgorithm: overlapping with the bottom stack
04-05 16:52:42.651 295-295/? I/SurfaceFlinger: FPS: 1
04-05 16:52:42.651 316-15017/? D/audio_hw_primary: in_standby: enter: stream (0xb77437f8) usecase(7: audio-record)
04-05 16:52:42.691 316-15017/? D/soundtrigger: audio_extn_sound_trigger_update_stream_status: uc_id 7 of type 1 for Event 2, with Raise=0
04-05 16:52:42.691 316-15017/? D/hardware_info: hw_info_append_hw_type : device_name = headset-mic
04-05 16:52:42.691 316-15017/? I/soundtrigger: audio_extn_sound_trigger_update_device_status: device 0x31 of type 1 for Event 0, with Raise=1
04-05 16:52:42.691 316-15017/? V/sound_trigger_hw: handle_audio_concurrency: Enter, event type = 0
04-05 16:52:42.691 316-15017/? D/sound_trigger_platform: platform_stdev_check_and_update_concurrency: concurrency active 0, tx 0, rx 0, concurrency session_allowed 1
04-05 16:52:42.691 14968-15016/com.google.sample.oboe.liveeffect W/AudioRecord: dead IAudioRecord, creating a new one from obtainBuffer()
04-05 16:52:42.701 316-867/? D/audio_hw_primary: adev_close_input_stream: enter:stream_handle(0xb77437f8)
04-05 16:52:42.701 316-867/? D/audio_hw_primary: in_standby: enter: stream (0xb77437f8) usecase(7: audio-record)
04-05 16:52:42.701 316-11681/? E/AudioPolicyManager: getInputForAttr() source 6, samplingRate 48000, format 1, channelMask c,session 176, flags 0
04-05 16:52:42.701 316-11681/? E/AudioPolicyManager: getDeviceForInputSource()input source 6, device 80000004
04-05 16:52:42.701 316-11681/? D/audio_hw_primary: adev_open_input_stream: enter: sample_rate(48000) channel_mask(0xc) devices(0x80000004) stream_handle(0xb77437f8) io_handle(182)
04-05 16:52:42.701 316-15031/? I/AudioFlinger: AudioFlinger's thread 0xb493f008 ready to run
04-05 16:52:42.701 316-867/? W/AudioPolicyManager: stopInput() unknown input 177
04-05 16:52:42.701 316-867/? W/AudioPolicyManager: releaseInput() releasing unknown input 177
04-05 16:52:42.701 316-9818/? E/AudioPolicyManager: startInput() input 182
04-05 16:52:42.701 316-9818/? D/AudioPolicyManager: startInput() setParameters rec_play_conc is setting to ON
04-05 16:52:42.701 316-862/? V/SRS_Proc: ParamSet string: rec_play_conc_on=true
04-05 16:52:42.701 316-862/? D/audio_hw_primary: adev_set_parameters: enter: rec_play_conc_on=true
04-05 16:52:42.701 316-862/? D/msm8916_platform: setting record playback concurrency to true
04-05 16:52:42.701 316-862/? D/audio_hw_extn: audio_extn_set_anc_parameters: anc_enabled:0
04-05 16:52:42.701 316-862/? E/audio_a2dp_hw: adev_set_parameters: ERROR: set param called even when stream out is null
04-05 16:52:42.701 316-9818/? D/AudioPolicyManager: Invalidate on releaseInput for stream :: 1
04-05 16:52:42.701 316-9818/? D/AudioPolicyManager: Invalidate on releaseInput for stream :: 2
04-05 16:52:42.701 316-9818/? D/AudioPolicyManager: Invalidate on releaseInput for stream :: 3
04-05 16:52:42.701 316-9818/? D/AudioPolicyManager: Invalidate on releaseInput for stream :: 4
04-05 16:52:42.701 316-9818/? D/AudioPolicyManager: Invalidate on releaseInput for stream :: 5
04-05 16:52:42.701 316-9818/? D/AudioPolicyManager: Invalidate on releaseInput for stream :: 6
04-05 16:52:42.701 316-9818/? D/AudioPolicyManager: Invalidate on releaseInput for stream :: 8
04-05 16:52:42.701 316-9818/? D/AudioPolicyManager: Invalidate on releaseInput for stream :: 9
04-05 16:52:42.701 316-9818/? D/AudioPolicyManager: Invalidate on releaseInput for stream :: 10
04-05 16:52:42.701 316-9818/? D/AudioPolicyManager: Invalidate on releaseInput for stream :: 11
04-05 16:52:42.701 316-9818/? D/AudioPolicyManager: Invalidate on releaseInput for stream :: 13
04-05 16:52:42.701 316-9818/? E/AudioPolicyManager: getDeviceForInputSource()input source 6, device 80000004
04-05 16:52:42.701 316-15031/? D/audio_hw_primary: in_standby: enter: stream (0xb77437f8) usecase(7: audio-record)
04-05 16:52:42.711 316-15031/? D/audio_hw_primary: in_set_parameters: enter: kvpairs=input_source=6;routing=-2147483644
04-05 16:52:42.711 14968-15013/com.google.sample.oboe.liveeffect W/AudioTrack: dead IAudioTrack, PCM, creating a new one from getPosition()
04-05 16:52:42.711 14968-15013/com.google.sample.oboe.liveeffect E/AudioTrack: detected illegal retrograde motion by the server: mServer advanced by -288240
04-05 16:52:42.721 316-867/? E/AudioPolicyManager: startOutput() output 4, stream 3, session 175
04-05 16:52:42.721 14968-15013/com.google.sample.oboe.liveeffect A/AudioTrackShared: Assertion failed: !(stepCount <= mUnreleased && mUnreleased <= mFrameCount)
04-05 16:52:42.721 14968-15013/com.google.sample.oboe.liveeffect A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 15013 (AudioTrack)
04-05 16:52:42.721 316-15031/? D/audio_hw_primary: start_input_stream: enter: stream(0xb77437f8)usecase(7: audio-record)
04-05 16:52:42.721 316-15031/? E/audio_hw_primary: select_devices: chenjun: usecase id(7):type(1), uc_id(7)
04-05 16:52:42.721 316-15031/? E/msm8916_platform: platform_get_input_snd_device: enter: out_device(0) in_device(0x4), mode(0)
04-05 16:52:42.721 316-15031/? D/audio_hw_primary: select_devices: out_snd_device(0: ) in_snd_device(67: voice-rec-dmic-ef):usecase(7: audio-record)
04-05 16:52:42.721 316-15031/? D/hardware_info: hw_info_append_hw_type : device_name = voice-rec-dmic-ef
04-05 16:52:42.721 316-15031/? I/soundtrigger: audio_extn_sound_trigger_update_device_status: device 0x43 of type 1 for Event 1, with Raise=1
04-05 16:52:42.721 316-15031/? V/sound_trigger_hw: handle_audio_concurrency: Enter, event type = 1
04-05 16:52:42.721 316-15031/? D/sound_trigger_platform: platform_stdev_check_and_update_concurrency: concurrency active 0, tx 1, rx 0, concurrency session_allowed 0
04-05 16:52:42.721 313-313/? I/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-05 16:52:42.721 313-313/? I/DEBUG: Build fingerprint: 'ZTE/ZTE_CINCO/cinco:5.1.1/LMY47V/20170829.162333:user/release-keys'
04-05 16:52:42.721 313-313/? I/DEBUG: Revision: '0'
04-05 16:52:42.721 313-313/? I/DEBUG: ABI: 'arm'
04-05 16:52:42.721 313-313/? I/DEBUG: pid: 14968, tid: 15013, name: AudioTrack >>> com.google.sample.oboe.liveeffect <<<
04-05 16:52:42.721 313-313/? I/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
04-05 16:52:42.721 316-15031/? D/soundtrigger: audio_extn_sound_trigger_update_stream_status: uc_id 7 of type 1 for Event 3, with Raise=0
04-05 16:52:42.721 316-15031/? D/ACDB-LOADER: ACDB -> send_audio_cal, acdb_id = 34, path = 1
04-05 16:52:42.721 316-15031/? D/ACDB-LOADER: ACDB -> send_asm_topology
04-05 16:52:42.721 316-15031/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_STREAM_TOPOLOGY_ID
04-05 16:52:42.721 316-15031/? D/ACDB-LOADER: ACDB -> send_adm_topology
04-05 16:52:42.721 316-15031/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TOPOLOGY_ID
04-05 16:52:42.721 316-15031/? D/ACDB-LOADER: ACDB -> send_audtable
04-05 16:52:42.721 316-15031/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE
04-05 16:52:42.721 316-15031/? D/ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_CAL
04-05 16:52:42.721 316-15031/? D/ACDB-LOADER: ACDB -> send_audvoltable
04-05 16:52:42.721 316-15031/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_GAIN_DEP_STEP_TABLE
04-05 16:52:42.721 316-15031/? E/ACDB-LOADER: Error: ACDB AudProc vol returned = -19
04-05 16:52:42.721 316-15031/? D/ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_VOL_CAL
04-05 16:52:42.721 316-15031/? D/ACDB-LOADER: ACDB -> send_afe_cal
04-05 16:52:42.721 316-15031/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AFE_COMMON_TABLE
04-05 16:52:42.721 316-15031/? E/ACDB-LOADER: Error: ACDB AFE returned = -19
04-05 16:52:42.721 316-15031/? D/ACDB-LOADER: ACDB -> AUDIO_SET_AFE_CAL
04-05 16:52:42.721 316-15031/? D/ACDB-LOADER: ACDB -> send_hw_delay : acdb_id = 34 path = 1
04-05 16:52:42.721 316-15031/? D/ACDB-LOADER: ACDB -> ACDB_AVSYNC_INFO: ACDB_CMD_GET_DEVICE_PROPERTY
04-05 16:52:42.721 316-15031/? D/audio_hw_primary: select_devices: done
04-05 16:52:42.771 313-313/? I/DEBUG: Abort message: 'Assertion failed: !(stepCount <= mUnreleased && mUnreleased <= mFrameCount)'
04-05 16:52:42.771 313-313/? I/DEBUG: r0 00000000 r1 00003aa5 r2 00000006 r3 00000000
04-05 16:52:42.771 313-313/? I/DEBUG: r4 a4a8bdd8 r5 00000006 r6 00000000 r7 0000010c
04-05 16:52:42.771 313-313/? I/DEBUG: r8 00000300 r9 000000c0 sl 00000000 fp a4a8bd00
04-05 16:52:42.771 313-313/? I/DEBUG: ip 00003aa5 sp a4a8b830 lr b6e2e9e5 pc b6e541b8 cpsr 600f0010
04-05 16:52:42.771 313-313/? I/DEBUG: backtrace:
04-05 16:52:42.771 313-313/? I/DEBUG: #00 pc 000391b8 /system/lib/libc.so (tgkill+12)
04-05 16:52:42.771 313-313/? I/DEBUG: #1 pc 000139e1 /system/lib/libc.so (pthread_kill+52)
04-05 16:52:42.771 313-313/? I/DEBUG: #2 pc 000145f7 /system/lib/libc.so (raise+10)
04-05 16:52:42.771 313-313/? I/DEBUG: #3 pc 00010e85 /system/lib/libc.so (__libc_android_abort+36)
04-05 16:52:42.771 313-313/? I/DEBUG: #4 pc 0000f53c /system/lib/libc.so (abort+4)
04-05 16:52:42.771 313-313/? I/DEBUG: #5 pc 00007665 /system/lib/libcutils.so (__android_log_assert+88)
04-05 16:52:42.771 313-313/? I/DEBUG: #6 pc 0004a2a3 /system/lib/libmedia.so (_ZN7android11ClientProxy13releaseBufferEPNS_5Proxy6BufferE+86)
04-05 16:52:42.771 313-313/? I/DEBUG: #7 pc 00046e4d /system/lib/libmedia.so (_ZN7android10AudioTrack13releaseBufferEPNS0_6BufferE+64)
04-05 16:52:42.771 313-313/? I/DEBUG: #8 pc 00048965 /system/lib/libmedia.so (_ZN7android10AudioTrack18processAudioBufferEv+1212)
04-05 16:52:42.771 313-313/? I/DEBUG: #9 pc 00048b09 /system/lib/libmedia.so (_ZN7android10AudioTrack16AudioTrackThread10threadLoopEv+168)
04-05 16:52:42.771 313-313/? I/DEBUG: #10 pc 0000ef0d /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+112)
04-05 16:52:42.771 313-313/? I/DEBUG: #11 pc 0000ea7d /system/lib/libutils.so
04-05 16:52:42.771 313-313/? I/DEBUG: #12 pc 000131cf /system/lib/libc.so (_ZL15__pthread_startPv+30)
04-05 16:52:42.771 313-313/? I/DEBUG: #13 pc 000111e7 /system/lib/libc.so (__start_thread+6)
04-05 16:52:42.781 316-863/? E/AudioPolicyManager: stopOutput() output 4, stream 3, session 175

@philburk
Copy link
Collaborator

philburk commented Apr 5, 2019

We will investigate. By the way, please attach long files instead of pasting them in.

Is the Assert consistent or intermittent?

The assertion is from "frameworks/av/media/libaudioclient/AudioTrackShared.cpp".

04-05 16:52:42.711 14968-15013/com.google.sample.oboe.liveeffect W/AudioTrack: dead IAudioTrack, PCM, creating a new one from getPosition()
04-05 16:52:42.711 14968-15013/com.google.sample.oboe.liveeffect E/AudioTrack: detected illegal retrograde motion by the server: mServer advanced by -288240
04-05 16:52:42.721 14968-15013/com.google.sample.oboe.liveeffect A/AudioTrackShared: Assertion failed: !(stepCount <= mUnreleased && mUnreleased <= mFrameCount)

@philburk
Copy link
Collaborator

philburk commented Apr 5, 2019

@ggfan Can you please try to repro on new and old systems?

@taemincho
Copy link
Author

The Assert is consistent on ZTE N9132 (Android 5.1.1) only when a headset is plugged out (plugged in was okay).

I've also tested on Pixel 2XL(Android 9), ZTE Z981 (Android 6.0.1) and HTC One (Android 4.4.2) with the audio API was fixed to OpenSLES.
All phones worked okay without asserts and the sounds were toggled correctly between the built-in mic/speaker and the headset.
However, both onErrorBeforeClose and onErrorAfterClose were not called on every phone. Is this intended for OpenSLES?

So, only ZTE N9132 has crashed by the assert during the tests.

@dturner dturner changed the title Crashes when plug in/out a headset [LiveEffect sample] Crashes when plug in/out a headset Apr 9, 2019
@philburk philburk added the apps related to a test or example app label Apr 25, 2019
@philburk philburk added bug and removed apps related to a test or example app labels Jul 2, 2019
@philburk philburk assigned philburk and unassigned ggfan Jul 2, 2019
@philburk
Copy link
Collaborator

philburk commented Jul 2, 2019

This looks like a DUP of #535

@philburk
Copy link
Collaborator

Closing as DUP of #535

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants