Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

[Bug] [iOS] TextToSpeech crash in Release #1207

Closed
ilyalehchylin opened this issue Apr 3, 2020 · 18 comments
Closed

[Bug] [iOS] TextToSpeech crash in Release #1207

ilyalehchylin opened this issue Apr 3, 2020 · 18 comments
Labels
bug Something isn't working in-progress Actively being worked on.
Milestone

Comments

@ilyalehchylin
Copy link

Description

App crashes in release (TestFlight) when using TextToSpeech (there is everything alright in debug though). I logged the exception and it throws the following message:

The lazily-initialized type does not have a public, parameterless constructor.

Steps to Reproduce

Call TextToSpeech.SpeakAsync (release mode)

Expected Behavior

Voice is starting to pronounce text.

Actual Behavior

App crashes.

Basic Information

  • Version with issue: 1.5.1, 1.5.2
  • Last known good version: N/A
  • IDE: Visual Studio for Mac Community 8.5.1 (build 42)
  • Platform Target Frameworks:
    • iOS:
      • Deployment target: 8.0
      • Tested device version: 13.3.1
  • Affected Devices: iPhone 8 Plus

Reproduction Link

Here you can find how the code used.

@ilyalehchylin ilyalehchylin added the bug Something isn't working label Apr 3, 2020
@jamesmontemagno
Copy link
Collaborator

Looks like the linker is being a bit aggressive. That code was re-architected with a lazy so let me update and get you a nuget to try asap.

@jamesmontemagno
Copy link
Collaborator

I am curious as a workaround if you do something like this in your AppDelegate:

var test = new AVSpeechSynthesizer();

that may keep it linked in.

@ilyalehchylin
Copy link
Author

Looks like the linker is being a bit aggressive. That code was re-architected with a lazy so let me update and get you a nuget to try asap.

Thanks for the fast reply. Will be waiting for it 🙂

I am curious as a workaround if you do something like this in your AppDelegate:

var test = new AVSpeechSynthesizer();

that may keep it linked in.

I've started the build, it may take some time to deploy.

@ilyalehchylin
Copy link
Author

I am curious as a workaround if you do something like this in your AppDelegate:

var test = new AVSpeechSynthesizer();

that may keep it linked in.

Yeah, with this line it is working now (tested in TestFlight version).

@jamesmontemagno
Copy link
Collaborator

Fantastic! yeah, just the linker was removing. We will hot fix it.

Can you remove that line and try out this NuGet -> https://dev.azure.com/xamarin/public/_build/results?buildId=16377&view=artifacts&type=publishedArtifacts

@ilyalehchylin
Copy link
Author

This NuGet is working too 🙂

@jamesmontemagno
Copy link
Collaborator

Can I bother you to try this one: https://dev.azure.com/xamarin/public/_build/results?buildId=16434&view=artifacts&type=publishedArtifacts

I did a different work around that I think is better. Sorry to keep asking :)

@ilyalehchylin
Copy link
Author

No problem, you may contact me as much as you need 🙂

Unfortunately, with this NuGet app crashes. I will check the error.

@ilyalehchylin
Copy link
Author

The same error: TextToSpeech error: The lazily-initialized type does not have a public, parameterless constructor.

@jamesmontemagno
Copy link
Collaborator

Got it! Let me try one more thing :)

@jamesmontemagno
Copy link
Collaborator

@ilyalehchylin
Copy link
Author

Yup, it's working

@jamesmontemagno
Copy link
Collaborator

YAY! <3 thanks!

@ilyalehchylin
Copy link
Author

No problem, I'm glad I was able to help with this issue 🙂

@jamesmontemagno jamesmontemagno added the in-progress Actively being worked on. label Apr 7, 2020
jamesmontemagno added a commit that referenced this issue Apr 7, 2020
* try to do a type of to see if this fixes it

* Update TextToSpeech.ios.tvos.watchos.cs

* Update TextToSpeech.ios.tvos.watchos.cs

* Fix formatting
@jamesmontemagno
Copy link
Collaborator

Will be in 1.5.3

@nikhildpardasani
Copy link

Hi @jamesmontemagno Can you tell us by when can we expect release 1.5.3 ?

@rs-mobitech
Copy link

Any estimate when 1.5.3 will be out?

@jamesmontemagno
Copy link
Collaborator

We are working on getting it out soon.

For a workaround just add this to your AppDelegate:

var test = new AVSpeechSynthesizer();

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working in-progress Actively being worked on.
Projects
None yet
Development

No branches or pull requests

4 participants