rive-app / rive-android

A runtime for interactive animations on Android
https://rive.app
MIT License
332 stars 30 forks source link

Crash: crashing the app while came back to Rive View contain class. #321

Open harisAsterbyte opened 3 months ago

harisAsterbyte commented 3 months ago

Scenario: Activity A -> Activity B -> Activity C Activity A contain rive view. intent the screen from A to B without finish Activity A. intent the screen from B to C , finish Activity B. back button press from Activity C.

getting crash with log below:

 android.renderscript.RSInvalidStateException: Calling RS with no Context active.
                                                                                                        at android.renderscript.RenderScript.validate(RenderScript.java:1241)
                                                                                                        at android.renderscript.Allocation.copyFrom(Allocation.java:992)
                                                                                                        at com.github.mmin18.widget.AndroidStockBlurImpl.blur(AndroidStockBlurImpl.java:66)
                                                                                                        at com.github.mmin18.widget.RealtimeBlurView.blur(RealtimeBlurView.java:233)
                                                                                                        at com.github.mmin18.widget.RealtimeBlurView$1.onPreDraw(RealtimeBlurView.java:273)
                                                                                                        at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:1093)
                                                                                                        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3089)
                                                                                                        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1952)
                                                                                                        at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8171)
                                                                                                        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:972)
                                                                                                        at android.view.Choreographer.doCallbacks(Choreographer.java:796)
                                                                                                        at android.view.Choreographer.doFrame(Choreographer.java:731)
                                                                                                        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
                                                                                                        at android.os.Handler.handleCallback(Handler.java:938)
                                                                                                        at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                        at android.os.Looper.loop(Looper.java:223)
                                                                                                        at android.app.ActivityThread.main(ActivityThread.java:7656)
                                                                                                        at java.lang.reflect.Method.invoke(Native Method)
                                                                                                        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
                                                                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
2024-03-15 17:04:12.775   646-1748  TaskPersister           system_process                       E  File error accessing recents directory (directory doesn't exist?).
umberto-sonnino commented 3 months ago

Hi @harisAsterbyte, do you mind sharing more about your setup and a reproducible example that we can run for this issue?

harisAsterbyte commented 3 months ago

@umberto-sonnino updated the step above

umberto-sonnino commented 2 months ago

Hi @harisAsterbyte can you share a sample project in a repo or a gist with that we can use to reproduce your crash?