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

Stopping Voice Input causes an SDK exception under Android 9 sometimes #593

Closed
sspanak opened this issue Aug 2, 2024 · 0 comments · Fixed by #591
Closed

Stopping Voice Input causes an SDK exception under Android 9 sometimes #593

sspanak opened this issue Aug 2, 2024 · 0 comments · Fixed by #591
Labels
bug Something isn't working

Comments

@sspanak
Copy link
Owner

sspanak commented Aug 2, 2024

Stack trace:

Exception java.lang.IllegalArgumentException:
  at android.app.LoadedApk.forgetServiceDispatcher (LoadedApk.java:1755)
  at android.app.ContextImpl.unbindService (ContextImpl.java:1925)
  at android.content.ContextWrapper.unbindService (ContextWrapper.java:717)
  at android.speech.SpeechRecognizer.destroy (SpeechRecognizer.java:408)
  at io.github.sspanak.tt9.ime.voice.VoiceInputOps.destroy (VoiceInputOps.java:19)
  at io.github.sspanak.tt9.ime.voice.VoiceInputOps.onError (VoiceInputOps.java:19)
  at io.github.sspanak.tt9.ime.voice.VoiceListener.onError (VoiceListener.java:13)
  at android.speech.SpeechRecognizer$InternalListener$1.handleMessage (SpeechRecognizer.java:450)
  at android.os.Handler.dispatchMessage (Handler.java:112)
  at android.os.Looper.loop (Looper.java:216)
  at android.app.ActivityThread.main (ActivityThread.java:7625)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:524)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:987)

Probably, it is best to retry speechRecognizer.destroy(); a couple of times and if it still fails, just set it to NULL. It is probably dead anyway.

@sspanak sspanak added the bug Something isn't working label Aug 2, 2024
@sspanak sspanak changed the title Stopping Voice Input causes an SDK exception under Android 9 Stopping Voice Input causes an SDK exception under Android 9 sometimes Aug 2, 2024
@sspanak sspanak linked a pull request Aug 5, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant