Thanks to visit codestin.com
Credit goes to github.com

Skip to content

crash upon pressing back button on a post #978

Description

@mileskerr

Jerboa Version
0.0.37

Android version + phone
Android 10 QKQ1.190825.002
Mi 9T Pro

Describe the bug
pressing the back button while viewing a post causes an immediate crash

To Reproduce

  1. Click on any post.
  2. Click the "back" arrow in the top left or the phone's universal back button at the bottom left.

Log

java.lang.IllegalStateException: You cannot access the NavBackStackEntry's ViewModels after the NavBackStackEntry is destroyed.
	at androidx.navigation.NavBackStackEntry.getViewModelStore(Unknown Source:69)
	at coil.util.-Logs.viewModel(Unknown Source:14)
	at okio.Utf8.PostActivity(Unknown Source:99)
	at com.jerboa.MainActivity$onCreate$1$3$6$25$1.invoke(SourceFile:52)
	at com.jerboa.MainActivity$onCreate$1$3$6$25$1.invoke(SourceFile:7)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(SourceFile:8)
	at com.jerboa.ui.components.post.PostListingsKt$PostListings$1$1.invoke(Unknown Source:100)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(SourceFile:3)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(SourceFile:14)
	at androidx.compose.material.SwipeToDismissKt$SwipeToDismiss$2.invoke(Unknown Source:772)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(SourceFile:3)
	at androidx.compose.foundation.CanvasKt$Canvas$1.invoke(SourceFile:203)
	at androidx.compose.foundation.CanvasKt$Canvas$1.invoke(SourceFile:13)
	at androidx.compose.runtime.ComposerImpl.recomposeToGroupEnd(Unknown Source:283)
	at okhttp3.CertificatePinner$check$1.invoke(Unknown Source:573)
	at okhttp3.CertificatePinner$check$1.invoke$1(Unknown Source:59)
	at coil.util.-Logs.observeDerivedStateRecalculations(Unknown Source:42)
	at androidx.compose.runtime.ComposerImpl.doCompose(Unknown Source:128)
	at androidx.compose.runtime.ComposerImpl.recompose$runtime_release(Unknown Source:35)
	at androidx.compose.runtime.CompositionImpl.recompose(Unknown Source:17)
	at androidx.compose.runtime.Recomposer.access$performRecompose(Unknown Source:100)
	at androidx.compose.material3.CheckboxKt$CheckboxImpl$1$1.invoke(Unknown Source:804)
	at androidx.compose.ui.platform.AndroidUiFrameClock$withFrameNanos$2$callback$1.doFrame(Unknown Source:6)
	at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(Unknown Source:47)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1029)
	at android.view.Choreographer.doCallbacks(Choreographer.java:854)
	at android.view.Choreographer.doFrame(Choreographer.java:785)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1016)
	at android.os.Handler.handleCallback(Handler.java:914)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loop(Looper.java:224)
	at android.app.ActivityThread.main(ActivityThread.java:7560)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.runtime.PausableMonotonicFrameClock@7529009, androidx.compose.ui.platform.MotionDurationScaleImpl@600420e, StandaloneCoroutine{Cancelling}@710942f, AndroidUiDispatcher@a8f9a3c]

edit: formatting
edit 2: found that it works with phone's back button also

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions