You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i keep getting the Failed assertion: line 309 pos 12: 'track != null': is not true. error whenever i try to play my recorded track using Quickplay.fromTrack().
Here's a snippet of my code
Hi @bsutton ,
It's still not working, and the issue is related to named constructors.
So, QuickPlay.fromTrack constructor is calling QuickPlay._internal constructor, and this is instantiated for second time in the QuickPlay class without "Track" attribute.
Quick fix would be to only pass Track object into QuickPlay._internal constructor.
Activity
[-][HELP][/-][+]Can't play recorded track[/+]bsutton commentedon Sep 2, 2020
At the very least the finally block is a problem as it will execute even if the exception is thrown
mtkgeek commentedon Sep 2, 2020
Removing the finally block doesn't solve the issue. The problem ultimately is why is track null?
bsutton commentedon Sep 2, 2020
bsutton commentedon Sep 16, 2020
I have a theory the problem is in QuickPlay._play
try changing it to the following (note the extra awaits)
It feels like its a race condition at the android level.
The awaits should hopefully fix this.
We are a week or so from being able to push a new release as we are in the middle of converting the objective-c code to swift.
bsutton commentedon Sep 17, 2020
I've pushed the above code to git.
If you could give it a test that would be helpful.
bsutton commentedon Sep 17, 2020
pushed possible solution for #35
carlos-labrador commentedon Dec 21, 2020
Hi @bsutton ,
It's still not working, and the issue is related to named constructors.
So,
QuickPlay.fromTrackconstructor is callingQuickPlay._internalconstructor, and this is instantiated for second time in theQuickPlay classwithout "Track" attribute.Quick fix would be to only pass Track object into
QuickPlay._internalconstructor.You can try the code below to verify my solution.
Cheers mate.
Greetings to Melbourne.