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

Change Locale error #12

Closed
tamdragle opened this issue Jan 10, 2019 · 2 comments
Closed

Change Locale error #12

tamdragle opened this issue Jan 10, 2019 · 2 comments

Comments

@tamdragle
Copy link

When I change change locale like so:

var voiceOverlayController: VoiceOverlayController {
    let recordableHandler = {
        return SpeechController(locale: Locale(identifier: "en_US"))
    }
    return VoiceOverlayController(speechControllerHandler: recordableHandler)
 }

I get a crash when run:

inputViewController.dismissHandler = { [unowned self] (retry) in
          self.inputViewController = nil
          if retry {
            self.showRecordingScreen(view)
          }
        }

Fatal error: Attempted to read an unowned reference but the object was already deallocated2019-01->10 10:09:32.479917+0700 hoaanhdao[2018:372531] Fatal error: Attempted to read an unowned >reference but the object was already deallocated
(lldb)

@spinach
Copy link
Contributor

spinach commented Jan 10, 2019

Hi @tamdragle - I think this is probably related to this issue here #4 (comment). Basically you're losing reference to the voice controller. You need to keep a strong reference to it.

Feel free to re-open the issue if it doesn't solve your issue

@spinach spinach closed this as completed Jan 10, 2019
@tamdragle
Copy link
Author

Hi @spinach Thank you!

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

No branches or pull requests

2 participants