Skip to content

[Settings] Crash when opening "Text-to-speech output" with Google TTS / SherpaTTS (Works fine with eSpeak) #266

Description

@luozaixuan

Device Codename

chiron

LineageOS Version

lineage-22.2

Build Date

20260630

Kernel Version

4.4.302-perf+

Baseband Version

No response

System Modifications

GApps,Apatch

Expected Behavior

When navigating to the "Text-to-speech output" settings page, the Settings app should successfully load and display the list of installed TTS engines, allowing the user to select and configure them without any crashes.

Current Behavior

When navigating to the "Text-to-speech output" settings page, the Settings app crashes and closes immediately.

Crucial Observation:
This crash occurs with almost all modern TTS engines, including the default Google TTS (from GApps) and third-party engines like SherpaTTS. However, if I uninstall them and only install eSpeak TTS, the settings page opens perfectly fine without any crashes.

This strongly indicates that the issue is not with the TTS engines themselves, but rather a bug in how the LineageOS Settings app handles the API responses/Binder communication from certain TTS engines. It seems the Settings app fails to gracefully handle exceptions or timeouts when querying engine features/languages from these specific services.

Logcat Analysis:
The logcat shows a DeadObjectException thrown by the WindowManager (system_server) when trying to dispatch visibility to the TextToSpeechSettingsActivity, followed by an Activity timeout. This confirms that the Settings app process is dying abruptly during the Binder transaction with the TTS engine.

Key Logcat Snippets:

07-13 12:08:24.805  1995  3047 W WindowManager: Exception thrown during dispatchAppVisibility Window{f7f4f33 u0 com.android.settings/com.android.settings.Settings$TextToSpeechSettingsActivity EXITING}
07-13 12:08:24.805  1995  3047 W WindowManager: android.os.DeadObjectException
07-13 12:08:24.805  1995  3047 W WindowManager: 	at android.os.BinderProxy.transactNative(Native Method)
07-13 12:08:24.805  1995  3047 W WindowManager: 	at android.os.BinderProxy.transact(BinderProxy.java:592)
07-13 12:08:24.805  1995  3047 W WindowManager: 	at android.view.IWindow$Stub$Proxy.dispatchAppVisibility(IWindow.java:557)
07-13 12:08:24.805  1995  3047 W WindowManager: 	at com.android.server.wm.WindowState.sendAppVisibilityToClients(WindowState.java:3336)
...
07-13 12:08:24.805  1995  3047 W WindowManager: 	at android.os.Binder.execTransact(Binder.java:1350)
07-13 12:08:25.244  1995  2170 W ActivityTaskManager: Activity top resumed state loss timeout for ActivityRecord{160523612 u0 com.android.settings/.Settings$TextToSpeechSettingsActivity t1146 f} isExiting}

### Possible Solution

_No response_

### Steps to Reproduce

1. Install LineageOS 22.2 (with GApps).
2. Install a third-party TTS engine (e.g., SherpaTTS) OR ensure the default Google TTS (from GApps) is enabled.
3. Open the "Settings" app.
4. Navigate to "Text-to-speech output" (or search for "Text-to-speech" in settings).
5. **Result:** The Settings app crashes/closes immediately.
6. **Control Test:** Uninstall the aforementioned TTS engines. Install only "eSpeak TTS" from the Play Store/F-Droid.
7. Open the "Text-to-speech output" settings again.
8. **Result:** The settings page loads successfully without crashing.

### Confirmation

- [x] I have read the directions at https://wiki.lineageos.org/how-to/bugreport

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions