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

Crash when invoking TTS #117

Open
4 tasks done
anaskaejdar opened this issue Nov 19, 2024 · 12 comments
Open
4 tasks done

Crash when invoking TTS #117

anaskaejdar opened this issue Nov 19, 2024 · 12 comments

Comments

@anaskaejdar
Copy link

Checklist

  • I have used the search function for OPEN issues to see if someone else has already submitted the same bug report.
  • I have also used the search function for CLOSED issues to see if the problem is already solved and just waiting to be released.
  • I will describe the problem with as much detail as possible.
  • If the bug only to occurs with a certain podcast, I will include the URL of that podcast.

App version

6.14.1 (from Izzy repo)

Where did you get the app from

F-Droid

Android version

Android 14 (Stock Rom; no root)

Device model

Samsung Galaxy S22 Ultra

First occurred

today, because I just migrated from antennapod today

Steps to reproduce

  1. Subscribe to a feed that has articles and no podcast or video.
  2. Press the button on the side of one of the articles, which is supposed to have TTS read it out
  3. boom, crash

Expected behaviour

I hoped I'd hear the article being read

Current behaviour

Crash instead; see log

Logs

        ## Environment

Android version: 14
OS version: 5.10.198-android12-9-29544585-abS908USQS6EXJ2
Podcini version: 6.14.1
Model: SM-S908U
Device: b0q
Product: b0qsqw

        ## Crash info

Time: ۱۹-۱۱-۲۰۲۴ ۰۹:۰۷:۳۰
Podcini version: 6.14.1

StackTrace

java.lang.IllegalStateException: [RLM_ERR_WRONG_TRANSACTION_STATE]: Trying to modify database while in read transaction
	at io.realm.kotlin.internal.interop.CoreErrorConverter.asThrowable(CoreErrorConverter.kt:47)
	at io.realm.kotlin.internal.interop.realmcJNI.realm_set_value(Native Method)
	at io.realm.kotlin.internal.interop.realmc.realm_set_value(realmc.java:676)
	at io.realm.kotlin.internal.interop.RealmInterop.realm_set_value-wOxPcJY(RealmInterop.kt:498)
	at io.realm.kotlin.internal.RealmObjectHelper.setValueTransportByKey-WQPMd18$io_realm_kotlin_library(RealmObjectHelper.kt:675)
	at ac.mdiq.podcini.storage.model.Episode.setPlayState(Episode.kt:204)
	at ac.mdiq.podcini.ui.actions.TTSActionButton.onClick(EpisodeActionButton.kt:455)
	at ac.mdiq.podcini.ui.compose.EpisodesVMKt$EpisodeLazyColumn$MainRow$2$10$1.invokeSuspend$lambda$1(EpisodesVM.kt:740)
	at ac.mdiq.podcini.ui.compose.EpisodesVMKt$EpisodeLazyColumn$MainRow$2$10$1.$r8$lambda$PmxTMNqnaUXNVgq-uXgpZ1obGAU(EpisodesVM.kt:0)
	at ac.mdiq.podcini.ui.compose.EpisodesVMKt$EpisodeLazyColumn$MainRow$2$10$1$$ExternalSyntheticLambda1.invoke(R8$$SyntheticClass:0)
	at androidx.compose.foundation.gestures.TapGestureDetectorKt$detectTapGestures$2$1.invokeSuspend(TapGestureDetector.kt:138)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:175)
	at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:164)
	at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:466)
	at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:500)
	at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:489)
	at kotlinx.coroutines.CancellableContinuationImpl.resumeWith(CancellableContinuationImpl.kt:364)
	at androidx.compose.ui.input.pointer.SuspendingPointerInputModifierNodeImpl$PointerEventHandlerCoroutine.offerPointerEvent(SuspendingPointerInputFilter.kt:719)
	at androidx.compose.ui.input.pointer.SuspendingPointerInputModifierNodeImpl.dispatchPointerEvent(SuspendingPointerInputFilter.kt:598)
	at androidx.compose.ui.input.pointer.SuspendingPointerInputModifierNodeImpl.onPointerEvent-H0pRuoY(SuspendingPointerInputFilter.kt:620)
	at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:387)
	at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:373)
	at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:373)
	at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:373)
	at androidx.compose.ui.input.pointer.NodeParent.dispatchMainEventPass(HitPathTracker.kt:229)
	at androidx.compose.ui.input.pointer.HitPathTracker.dispatchChanges(HitPathTracker.kt:144)
	at androidx.compose.ui.input.pointer.PointerInputEventProcessor.process-BIzXfog(PointerInputEventProcessor.kt:120)
	at androidx.compose.ui.platform.AndroidComposeView.sendMotionEvent-8iAsVTc(AndroidComposeView.android.kt:1994)
	at androidx.compose.ui.platform.AndroidComposeView.handleMotionEvent-8iAsVTc(AndroidComposeView.android.kt:1945)
	at androidx.compose.ui.platform.AndroidComposeView.dispatchTouchEvent(AndroidComposeView.android.kt:1829)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3352)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3022)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3352)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3022)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3352)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3022)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3352)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3022)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3352)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3022)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3352)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3022)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3352)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3022)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3352)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3022)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3352)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3022)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3352)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3022)
	at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:794)
	at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1967)
	at android.app.Activity.dispatchTouchEvent(Activity.java:4571)
	at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:69)
	at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:752)
	at android.view.View.dispatchPointerEvent(View.java:16498)
	at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:8676)
	at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:8423)
	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7752)
	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7809)
	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7775)
	at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:7978)
	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7783)
	at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:8035)
	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7756)
	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7809)
	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7775)
	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7783)
	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7756)
	at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:11343)
	at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:11212)
	at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:11168)
	at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:11477)
	at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:337)
	at android.os.MessageQueue.nativePollOnce(Native Method)
	at android.os.MessageQueue.next(MessageQueue.java:335)
	at android.os.Looper.loopOnce(Looper.java:187)
	at android.os.Looper.loop(Looper.java:319)
	at android.app.ActivityThread.main(ActivityThread.java:9063)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:588)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.ui.platform.MotionDurationScaleImpl@ad68db1, androidx.compose.runtime.BroadcastFrameClock@46c7296, StandaloneCoroutine{Cancelling}@31aae17, AndroidUiDispatcher@315204]
@XilinJia
Copy link
Owner

Thanks for reporting. The TTS feature has been neglected for long. The crash issue should be fixed shortly in the coming release.

@XilinJia
Copy link
Owner

Meanwhile, if you open the article from an episode list, in the upper part of the screen there is the Home (building) icon, tap that to open the Home view, then press on the menu bar on the upper-right corner, a play button should appear on the action bar, press that to play the TTS (while you can also read the article in that view). A shortcoming of the TTS playing here is that the speed can not adjusted, whereas playing it on the list (now causing the crash) is more controllable.

@XilinJia
Copy link
Owner

should be fixed in 6.14.3. Let me know your experience.

added note in Readme:

there are two ways to access TTS: from the action bar of EpisodeHome view, and on the list of FeedEspiosdes view
the former plays the TTS instantly on the text available, and regardless of whether the episode as playable media or not, and the speed is not controlled in the app
the latter, only available when the episode has no media (plain RSS), constructs an audio file (like download) to be played as normal media file and the speed can be controlled in Podcini

@anaskaejdar
Copy link
Author

anaskaejdar commented Nov 20, 2024

@XilinJia Yeah, it's interesting. The crash is definitely fixed; thank you so much for being attentive to that and fixing it so fast! I'm sorry to report that it isn't yet fixed to the point where the article will actually play as audio. Instead it just stays like this. The progress bar doesn't advance at all, but eventually, it disappears as if the app gave up on generating the audio.

Screenshot_۲۰۲۴۱۱۱۹_۱۷۱۷۱۳_PodciniR

Btw I can confirm that if I use the other method in the “home screen,” it works fine just like you said it would.

@XilinJia
Copy link
Owner

When you press the button on the list, it takes some time to construct the audio file, and the circular progress moves once in a while. When the button disappears, a Play button should appear, indicating the audio file is ready, and you then can press the Play button to play the audio. Does it work like this for you?

@anaskaejdar
Copy link
Author

Na, the progress never advances at all, & the play button never appears.

@XilinJia
Copy link
Owner

I see. Could you send the link of the RSS?

@anaskaejdar
Copy link
Author

@XilinJia Sure thing. As far as I can tell (so far) it seems to affect all articles, but here's a feed with articles that are affected: https://sabbathempire.substack.com/feed

@XilinJia
Copy link
Owner

TTS works for me on the link.
Screenshot_20241122_082841

@XilinJia
Copy link
Owner

Did you configure the TTS engine on your phone correctly? I can't say what exactly need to be set, but at least you need to have the language (English in this case) file installed.

@anaskaejdar
Copy link
Author

@XilinJia Yeah, TTS is working properly, because if I go into that “home page” in the article, I can press that play button up top and it starts reading it without issue.

What can I do to help figure this out? Maybe if you have a debug version of the app that would make extra-detailed logs around that functionality, I can try it with that and get you some more information.

@XilinJia
Copy link
Owner

Hum, I'll check if there are some specifics I need to see in the log and will ask you to test on a debug version.

It works on my S21 Android 14 phone, and yours is S22 Ultra. So nothing is quite special here. I set my TTS engine to Google's, not the Samsung (not sure if that affects it). Maybe you can fool around a bit on that? Also, did you grant the permissions Podcini prompted (not sure if that affect it)?

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