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

[Platform][Android] Memory leak in default TtsHandler #117

Open
kashesoft opened this issue Apr 8, 2019 · 3 comments

Comments

Projects
None yet
4 participants
@kashesoft
Copy link

commented Apr 8, 2019

Version and Environment
Android 5.1.1, QuadCore-A64, Snips 1.1.0 (0.61.1)

What's the issue?
If we are using default TtsHandler then SnipsPlatformClient is leaked inside TtsHandler every time we disconnect SnipsPlatformClient and remove all references to this client. Reason is that UtteranceProgressListener inside default TtsHandler retains reference to our SnipsPlatformClient and TtsHandler does not call TextToSpeech.shutdown at all.

How to reproduce
We need to connect, resume, pause and disconnect our SnipsPlatformClient and profile memory with Android Studio memory profiler.

Expected behavior
TtsHandler should call TextToSpeech.shutdown in order to release resources and prevent memory leak.

Workaround
We need to use custom TtsHandler and call TextToSpeech.shutdown every time we disconnect and remove reference to SnipsPlatformClient in order to prevent memory leak.

@fredszaq

This comment has been minimized.

Copy link

commented Apr 11, 2019

Good catch ! We'll have a fix in next version

@medrag

This comment has been minimized.

Copy link

commented Apr 23, 2019

any news on this issue ?.
i'm also still having TTS problems on my android app, the "Not Bound to TTS engine" or "TTS was asked to disconnect from googleTTS" message still showing randomly, and i cannot reproduce the issue...

@cpoisson cpoisson added this to the Snips Flow - Next milestone May 14, 2019

@cpoisson

This comment has been minimized.

Copy link
Collaborator

commented May 14, 2019

A fix is planned on the coming releases.

@cpoisson cpoisson changed the title Memory leak in default TtsHandler [Platform][Android] Memory leak in default TtsHandler May 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.