Location settings crash
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 14.6k
- Forks
- 3.2k
- Avg merge
- 12d 11h
- Merged PRs (30d)
- 4
Description
First of all, thank you for your really great product.
I found an issue in settings.
Steps to reproduce
- Install lineageos4microg
- Go to Settings > Security & privacy > Location
- Settings crashed with "Settings has stopped" message
- Also crashed when long press on location icon in shortcut bar at top on the screen
Interesting stuffs
-
Screenshot

-
Logcats
11-13 10:41:43.984 1129 1907 I chatty : uid=1000(system) /system/vendor/bin/imsrcsd identical 2 lines
11-13 10:41:43.985 1129 1907 E Diag_Lib: [IMS_FATAL]| 1907 |ims_qmi_register_client : Failed
11-13 10:41:45.328 500 605 E ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
11-13 10:41:45.329 500 605 E ANDR-PERF-RESOURCEQS: Failed to apply optimization [4, 0]
11-13 10:41:45.331 500 605 E ANDR-PERF-RESOURCEQS: Failed to apply optimization [2, 0]
11-13 10:41:45.331 500 605 E ANDR-PERF-RESOURCEQS: Failed to apply optimization [4, 0]
11-13 10:41:45.331 500 605 E ANDR-PERF-RESOURCEQS: Failed to apply optimization [2, 0]
11-13 10:41:45.425 534 983 I AudioPolicyManagerCustom: FLAG None hence request for a primary output
11-13 10:41:45.426 1198 5281 I ActivityManager: START u0 {act=android.intent.action.MAIN cmp=com.android.settings/.SubSettings (has extras)} from uid 1000
11-13 10:41:45.426 534 983 I AudioPolicyManagerCustom: FLAG None hence request for a primary output
11-13 10:41:45.427 475 4406 D audio_hw_primary: start_output_stream: enter: stream(0xf35eb000)usecase(1: low-latency-playback) devices(0x2)
11-13 10:41:45.427 475 4406 D audio_hw_primary: select_devices for use case (low-latency-playback)
11-13 10:41:45.427 475 4406 D audio_hw_primary: select_devices: out_snd_device(2: speaker) in_snd_device(0: )
11-13 10:41:45.428 475 4406 I msm8916_platform: platform_check_and_set_codec_backend_cfg:becf: afe: bitwidth 16, samplerate 48000 channels 2, backend_idx 0 usecase = 1 device (speaker)
11-13 10:41:45.428 475 4406 D msm8916_platform: platform_split_snd_device: snd_device(2) num devices(1) new_snd_devices(0)
11-13 10:41:45.428 475 4406 I msm8916_platform: platform_check_and_set_codec_backend_cfg: becf: new_snd_devices[0] is speaker
11-13 10:41:45.428 475 4406 I msm8916_platform: platform_check_codec_backend_cfg:becf: afe: Codec selected backend: 0 current bit width: 16 sample rate: 48000 channels: 2 usecase 1 device (speaker)
11-13 10:41:45.428 475 4406 D msm8916_platform: platform_check_codec_backend_cfg:becf: afe: playback on codec device not supporting native playback set default Sample Rate(48k)
11-13 10:41:45.428 475 4406 D msm8916_platform: platform_check_codec_backend_cfg:becf: afe: only 48KHZ sample rate is supported Configure afe to default Sample Rate(48k)
11-13 10:41:45.428 475 4406 I msm8916_platform: platform_check_codec_backend_cfg:becf: afe: Codec selected backend: 0 updated bit width: 16 sample rate: 48000 channels: 2
11-13 10:41:45.428 475 4406 D audio_hw_primary: check_usecases_codec_backend:becf: force routing 0
11-13 10:41:45.428 475 4406 E msm8916_platform: platform_check_backends_match: Invalid snd_device =
11-13 10:41:45.428 475 4406 D audio_hw_primary: check_usecases_codec_backend:becf: (61) check_usecases curr device: speaker, usecase device: backends match 0
11-13 10:41:45.428 475 4406 D audio_hw_primary: check_usecases_codec_backend:becf: check_usecases num.of Usecases to switch 0
11-13 10:41:45.428 475 4406 D hardware_info: hw_info_append_hw_type : device_name = speaker
11-13 10:41:45.428 475 4406 D msm8916_platform: platform_split_snd_device: snd_device(2) num devices(0) new_snd_devices(0)
11-13 10:41:45.428 475 4406 D audio_hw_primary: enable_snd_device: snd_device(2: speaker)
11-13 10:41:45.428 475 4406 I soundtrigger: audio_extn_sound_trigger_update_device_status: device 0x2 of type 0 for Event 1, with Raise=0
11-13 10:41:45.428 475 4406 D audio_route: Apply path: speaker
11-13 10:41:45.430 475 4406 D soundtrigger: audio_extn_sound_trigger_update_stream_status: uc_id 1 of type 0 for Event 3, with Raise=0
11-13 10:41:45.430 475 4406 D audio_hw_utils: audio_extn_utils_send_app_type_cfg: usecase->out_snd_device speaker
11-13 10:41:45.431 475 4406 D msm8916_platform: platform_split_snd_device: snd_device(2) num devices(0) new_snd_devices(0)
11-13 10:41:45.431 475 4406 E msm8916_platform: platform_get_snd_device_backend_index: BE DAI Name Table is not present
11-13 10:41:45.431 475 4406 E audio_hw_utils: send_app_type_cfg_for_device: Couldn't get the backend index for snd device speaker ret=-14
11-13 10:41:45.431 475 4406 D audio_hw_utils: audio_extn_btsco_get_sample_rate:Not a BT SCO device, need not update sampling rate
11-13 10:41:45.431 475 4406 I audio_hw_utils: send_app_type_cfg_for_device PLAYBACK app_type 69937, acdb_dev_id 1058, sample_rate 48000, snd_device_be_idx -14
11-13 10:41:45.431 475 4406 D msm8916_platform: platform_split_snd_device: snd_device(2) num devices(1) new_snd_devices(0)
11-13 10:41:45.431 475 4406 D ACDB-LOADER: ACDB -> send_audio_cal, acdb_id = 1058, path = 0, app id = 0x11131, sample rate = 48000
11-13 10:41:45.432 475 4406 D ACDB-LOADER: ACDB -> send_asm_topology
11-13 10:41:45.432 475 4406 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_STREAM_TOPOLOGY_ID
11-13 10:41:45.432 475 4406 D ACDB-LOADER: ACDB -> send_adm_topology
11-13 10:41:45.432 475 4406 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TOPOLOGY_ID
11-13 10:41:45.432 475 4406 D ACDB-LOADER: ACDB -> send_audtable
11-13 10:41:45.432 475 4406 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE_SIZE
11-13 10:41:45.432 475 4406 D : ACDBFILE_MGR:Read the devices count as zero, please check the acdb file
11-13 10:41:45.432 475 4406 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE
11-13 10:41:45.432 475 4406 D : ACDBFILE_MGR:Read the devices count as zero, please check the acdb file
11-13 10:41:45.432 475 4406 D ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_CAL
11-13 10:41:45.432 475 4406 D ACDB-LOADER: ACDB -> send_audvoltable
11-13 10:41:45.432 475 4406 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_VOL_STEP_TABLE_SIZE
11-13 10:41:45.432 475 4406 D : ACDBFILE_MGR:Read the devices count as zero, please check the acdb file
11-13 10:41:45.432 475 4406 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_GAIN_DEP_STEP_TABLE, vol index 0
11-13 10:41:45.432 475 4406 D : ACDBFILE_MGR:Read the devices count as zero, please check the acdb file
11-13 10:41:45.432 475 4406 D ACDB-LOADER: ACDB -> AUDIO_SET_VOL_CAL cal type = 12
11-13 10:41:45.432 475 4406 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_STREAM_TABLE_SIZE
11-13 10:41:45.432 475 4406 D ACDB-LOADER: ACDB -> send_audstrmtable
11-13 10:41:45.432 475 4406 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_STREAM_TABLE_V2
11-13 10:41:45.432 475 4406 D ACDB-LOADER: ACDB -> audstrm_cal->cal_type.cal_data.cal_size = 16
11-13 10:41:45.432 475 4406 D ACDB-LOADER: ACDB -> send_afe_topology
11-13 10:41:45.432 475 4406 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AFE_TOPOLOGY_ID
11-13 10:41:45.432 475 4406 D ACDB-LOADER: ACDB -> GET_AFE_TOPOLOGY_ID for adcd_id 1058, Topology Id 10001060
11-13 10:41:45.432 475 4406 D ACDB-LOADER: ACDB -> send_afe_cal
11-13 10:41:45.432 475 4406 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AFE_COMMON_TABLE_SIZE
11-13 10:41:45.432 475 4406 D : ACDBFILE_MGR:Read the devices count as zero, please check the acdb file
11-13 10:41:45.432 475 4406 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AFE_COMMON_TABLE
11-13 10:41:45.433 475 4406 D : ACDBFILE_MGR:Read the devices count as zero, please check the acdb file
11-13 10:41:45.433 475 4406 D ACDB-LOADER: ACDB -> AUDIO_SET_AFE_CAL 1052 1052
11-13 10:41:45.433 475 4406 D ACDB-LOADER: ACDB -> load_dsm_calib_data fp is null error[Permission denied]
11-13 10:41:45.433 475 4406 D ACDB-LOADER: ACDB -> AUDIO_SET_AFE_CAL
11-13 10:41:45.433 475 4406 D ACDB-LOADER: ACDB -> send_hw_delay : acdb_id = 1058 path = 0
11-13 10:41:45.433 475 4406 D ACDB-LOADER: ACDB -> ACDB_AVSYNC_INFO: ACDB_CMD_GET_DEVICE_PROPERTY
11-13 10:41:45.433 475 4406 D audio_hw_primary: enable_audio_route: apply mixer and update path: low-latency-playback speaker
11-13 10:41:45.424 475 475 W writer : type=1400 audit(0.0:46): avc: denied { search } for name="/" dev="mmcblk0p27" ino=2 scontext=u:r:hal_audio_default:s0 tcontext=u:object_r:persist_file:s0 tclass=dir permissive=0
11-13 10:41:45.433 475 4406 D audio_route: Apply path: low-latency-playback speaker
11-13 10:41:45.435 475 4406 D audio_hw_primary: select_devices: done
11-13 10:41:45.460 475 4406 D msm8916_platform: platform_set_channel_map mixer_ctl_name:Playback Channel Map12
11-13 10:41:45.460 475 4406 D msm8916_platform: platform_set_channel_map: set mapping(1 2 0 0 0 0 0 0) for channel:2
11-13 10:41:45.461 475 4406 D audio_hw_primary: start_output_stream: exit
11-13 10:41:45.485 5282 5282 D SubSettings: Launching fragment com.android.settings.location.LocationSettings
11-13 10:41:45.507 1198 1873 E UserRestrictionsUtils: Unknown restriction: null
11-13 10:41:45.509 5282 5300 W TileUtils: Found com.android.settings.backup.BackupSettingsActivity for intent Intent { act=com.android.settings.action.SETTINGS pkg=com.android.settings } missing metadata com.android.settings.category
11-13 10:41:45.511 5282 5300 W TileUtils: Found org.lineageos.lineageparts.trust.TrustPreferences for intent Intent { act=org.lineageos.lineageparts.action.SETTINGS pkg=org.lineageos.lineageparts } missing metadata
11-13 10:41:45.521 5282 5300 D Settings: No enabled state changed, skipping updateCategory call
11-13 10:41:45.526 5282 5282 I LocationSettingsBase: Location mode has been changed
11-13 10:41:45.548 5282 5282 E RecyclerView: No adapter attached; skipping layout
11-13 10:41:45.554 1198 5281 W ActivityManager: Background start not allowed: service Intent { cmp=com.google.android.gms/org.microg.nlp.ui.SettingInjectorService (has extras) } to com.google.android.gms/org.microg.nlp.ui.SettingInjectorService from pid=5282 uid=1000 pkg=com.android.settings
11-13 10:41:45.555 5282 5282 D AndroidRuntime: Shutting down VM
11-13 10:41:45.555 5282 5282 E AndroidRuntime: FATAL EXCEPTION: main
11-13 10:41:45.555 5282 5282 E AndroidRuntime: Process: com.android.settings, PID: 5282
11-13 10:41:45.555 5282 5282 E AndroidRuntime: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.google.android.gms/org.microg.nlp.ui.SettingInjectorService (has extras) }: app is in background uid UidRecord{4de8a0a u0a10 TRNB idle change:uncached procs:1 seq(0,0,0)}
11-13 10:41:45.555 5282 5282 E AndroidRuntime: at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1521)
11-13 10:41:45.555 5282 5282 E AndroidRuntime: at android.app.ContextImpl.startServiceAsUser(ContextImpl.java:1494)
11-13 10:41:45.555 5282 5282 E AndroidRuntime: at android.content.ContextWrapper.startServiceAsUser(ContextWrapper.java:666)
11-13 10:41:45.555 5282 5282 E AndroidRuntime: at com.android.settings.location.SettingsInjector$Setting.startService(SettingsInjector.java:517)
11-13 10:41:45.555 5282 5282 E AndroidRuntime: at com.android.settings.location.SettingsInjector$StatusLoadingHandler.handleMessage(SettingsInjector.java:413)
11-13 10:41:45.555 5282 5282 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
11-13 10:41:45.555 5282 5282 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
11-13 10:41:45.555 5282 5282 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6494)
11-13 10:41:45.555 5282 5282 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
11-13 10:41:45.555 5282 5282 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:440)
11-13 10:41:45.555 5282 5282 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
11-13 10:41:45.558 1198 5281 W ActivityManager: Force finishing activity com.android.settings/.SubSettings
11-13 10:41:45.561 1198 5281 W ActivityManager: Force finishing activity com.android.settings/.Settings$SecuritySettingsActivity
11-13 10:41:45.565 1198 1324 I ActivityManager: Showing crash dialog for package com.android.settings u0
11-13 10:41:45.599 1198 4766 I OpenGLRenderer: Initialized EGL, version 1.4
11-13 10:41:45.599 1198 4766 D OpenGLRenderer: Swap behavior 2
11-13 10:41:45.988 1129 1907 E Diag_Lib: [IMS_FATAL]| 1907 |ims_qmi_register_client : Failed
Thank you in advance for your help
EDIT:
It is probably linked to battery optimization. When I disable battery optimizations for microG, Settings don't crash.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing org.microg.nlp.ui.SettingInjectorService and the com.android.settings.location.SettingsInjector stack trace, then reproduce the crash from the listed Location settings steps. Use the logcat's background-service exception to identify the affected interaction; done means Location settings and the shortcut action no longer crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100