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

BlurView drawing above another BlurView causes crash #127

Closed
slavzilla opened this issue Nov 5, 2020 · 6 comments
Closed

BlurView drawing above another BlurView causes crash #127

slavzilla opened this issue Nov 5, 2020 · 6 comments

Comments

@slavzilla
Copy link

  1. 1.6.3
  2. Pixel 4 Api 29 Emulator
  3. I have a RecyclerView that has BlurView inside of it. That works fine. The problem is I have a fragment that hosts this RecyclerView and on one particular click on a button, I open DialogFragment which is completely custom. This DialogFragment is blurred. The problem is, when this dialog shows above the RecyclerView I get an error. I guess it is because one BlurView shows above another BlurView. I've seen in closed issues that someone already asked about this but in my case it is incidental and I really can't avoid it. Could you help me somehow?
  4. I can provide XML layout if you need it but the issue is not in it I guess
  5. 2020-11-05 15:21:22.753 17031-17031/lu.thebiggame E/AndroidRuntime: FATAL EXCEPTION: main Process: lu.thebiggame, PID: 17031 java.lang.IndexOutOfBoundsException: Index: 3, Size: 0 at java.util.ArrayList.get(ArrayList.java:437) at android.view.ViewGroup.getAndVerifyPreorderedView(ViewGroup.java:3659) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4147) at androidx.constraintlayout.widget.ConstraintLayout.dispatchDraw(ConstraintLayout.java:1975) at android.view.View.draw(View.java:21293) at android.view.ViewGroup.drawChild(ViewGroup.java:4388) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149) at android.view.View.draw(View.java:21424) at android.view.View.draw(View.java:21295) at android.view.ViewGroup.drawChild(ViewGroup.java:4388) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149) at androidx.constraintlayout.widget.ConstraintLayout.dispatchDraw(ConstraintLayout.java:1975) at android.view.View.draw(View.java:21293) at android.view.ViewGroup.drawChild(ViewGroup.java:4388) at androidx.recyclerview.widget.RecyclerView.drawChild(RecyclerView.java:5125) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149) at android.view.View.draw(View.java:21424) at androidx.recyclerview.widget.RecyclerView.draw(RecyclerView.java:4524) at android.view.View.draw(View.java:21295) at android.view.ViewGroup.drawChild(ViewGroup.java:4388) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149) at androidx.constraintlayout.widget.ConstraintLayout.dispatchDraw(ConstraintLayout.java:1975) at android.view.View.draw(View.java:21293) at android.view.ViewGroup.drawChild(ViewGroup.java:4388) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149) at android.view.View.draw(View.java:21424) at androidx.core.widget.NestedScrollView.draw(NestedScrollView.java:1998) at android.view.View.draw(View.java:21295) at android.view.ViewGroup.drawChild(ViewGroup.java:4388) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149) at androidx.constraintlayout.widget.ConstraintLayout.dispatchDraw(ConstraintLayout.java:1975) at android.view.View.draw(View.java:21424) at eightbitlab.com.blurview.BlockingBlurController.updateBlur(BlockingBlurController.java:149) at eightbitlab.com.blurview.BlockingBlurController$1.onPreDraw(BlockingBlurController.java:61) at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:1088) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2745) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1721) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7598) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:966) at android.view.Choreographer.doCallbacks(Choreographer.java:790) at android.view.Choreographer.doFrame(Choreographer.java:725) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:951) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
@Dimezis
Copy link
Owner

Dimezis commented Nov 5, 2020

Thanks for the report, I have couple of similar ones for a while already, and most of them have ConstraintLayout in the trace, so I thought maybe it is its fault.
But I have no clue how it's happening or how to reproduce it, so unless you can make an example project with a reliable way to replicate the issue, I can not help unfortunately.

@slavzilla
Copy link
Author

I can't give you my code as it is a corporate code I am not the owner. Could I help you in any other way? I can ask around and try to get approval to share parts of the project with you.

@Dimezis
Copy link
Owner

Dimezis commented Nov 6, 2020

You don't have to share the company code, you can just create a small new app that contains the minimum required setup to reproduce this issue, and publish it on Github

@LonLove
Copy link

LonLove commented Nov 13, 2020

另一个BlurView上方绘制的BlurView,上方的不生效没崩溃,都是包含在ConstraintLayout里面,我尝试把上方的从ConstraintLayout拿出来,然后在上方绘制,结果ok了。

@jayshreeSK
Copy link

I am also getting a crash.
Below are the logs.

2021-01-12 16:33:39.954 17678-17678/com.example.example D/AndroidRuntime: Shutting down VM
2021-01-12 16:33:39.955 17678-17678/com.example.example E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.example , PID: 17678
java.lang.IndexOutOfBoundsException: Index: 3, Size: 0
at java.util.ArrayList.get(ArrayList.java:437)
at android.view.ViewGroup.getAndVerifyPreorderedView(ViewGroup.java:3659)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4147)
at android.view.View.draw(View.java:21428)
at android.view.View.draw(View.java:21299)
at android.view.ViewGroup.drawChild(ViewGroup.java:4388)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149)
at android.view.View.draw(View.java:21428)
at eightbitlab.com.blurview.BlockingBlurController.updateBlur(BlockingBlurController.java:117)
at eightbitlab.com.blurview.BlockingBlurController$1.onPreDraw(BlockingBlurController.java:55)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:1088)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2746)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1722)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7605)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1041)
at android.view.Choreographer.doCallbacks(Choreographer.java:864)
at android.view.Choreographer.doFrame(Choreographer.java:799)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1026)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7397)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)

@Dimezis
Copy link
Owner

Dimezis commented Jan 21, 2021

Closing this one as a duplicate of #110
Please post your repos/code samples/steps to reproduce there.

@Dimezis Dimezis closed this as completed Jan 21, 2021
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

4 participants