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

eightbitlab.com.blurview.RenderScriptBlur.blur ANR triggered by main thread waiting for too long #206

Closed
jasondem opened this issue Aug 23, 2023 · 5 comments

Comments

@jasondem
Copy link

Please include:

  1. Library version
    version-2.0.3

  2. Device and OS version
    all devices OS version are android 11,such as Vivo 1901,Galaxy A50,Realme C12,CPH2239

  3. Detailed steps to reproduce the issue
    I don‘t konw how to reproduce it

  4. XML layout and code for BlurView setup

  5. Stacktrace in case of a crash
    image

@Dimezis
Copy link
Owner

Dimezis commented Aug 23, 2023

Provide the details required in the bug report.
There's not much I can do without steps to reproduce

@jasondem
Copy link
Author

It is a bottom navigationBar, I use BulrView to achieve the bottom navigation bar frosted-glass effect, anr place in 'RenderScriptBlur.blur', is frosted-glass rendering placed in other threads can solve this problem?

@jasondem
Copy link
Author

main (native):tid=1 systid=19015
#00 pc 0x7550c libc.so (syscall + 28)
#1 pc 0x1af800 libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*) + 148)
#2 pc 0x669eb0 libart.so (art::GoToRunnable(art::Thread*) + 460)
#3 pc 0x669ca0 libart.so (art::JniMethodEnd(unsigned int, art::Thread*) + 28)
at android.renderscript.RenderScript.rsnScriptSetVarObj(Native method)
at android.renderscript.RenderScript.nScriptSetVarObj(RenderScript.java:832)
at android.renderscript.Script.setVar(Script.java:438)
at android.renderscript.ScriptIntrinsicBlur.setInput(ScriptIntrinsicBlur.java:70)
at eightbitlab.com.blurview.RenderScriptBlur.blur(RenderScriptBlur.java:69)
at eightbitlab.com.blurview.PreDrawBlurController.blurAndSave(PreDrawBlurController.java:172)
at eightbitlab.com.blurview.PreDrawBlurController.updateBlur(PreDrawBlurController.java:122)
at eightbitlab.com.blurview.PreDrawBlurController$1.onPreDraw(PreDrawBlurController.java:50)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:1093)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3451)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2257)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8796)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1161)
at android.view.Choreographer.doCallbacks(Choreographer.java:983)
at android.view.Choreographer.doFrame(Choreographer.java:908)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1146)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:263)
at android.app.ActivityThread.main(ActivityThread.java:8292)
at java.lang.reflect.Method.invoke(Native method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:612)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1006)

@Dimezis
Copy link
Owner

Dimezis commented Aug 23, 2023

I don't think it's BlurView's problem.
Something is holding that lock libart waits on (WaitHoldingLocks).
Most likely it's just an unlucky coincidence that the BlurView happens to execute the blur when the lock is busy, and the root cause is elsewhere.

@jasondem
Copy link
Author

Thank you. I'll find out if it's caused by other places.

@Dimezis Dimezis closed this as completed May 11, 2024
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