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

Getting crash after library version update from 1.3.3 to 1.6.2 #106

Closed
Mihir3646 opened this issue Oct 31, 2019 · 4 comments
Closed

Getting crash after library version update from 1.3.3 to 1.6.2 #106

Mihir3646 opened this issue Oct 31, 2019 · 4 comments

Comments

@Mihir3646
Copy link

Mihir3646 commented Oct 31, 2019

Getting crash after library version update from 1.3.3 to 1.6.2
When Device state is background

BlockingBlurController.java line 142
eightbitlab.com.blurview.BlockingBlurController.updateBlur 

Fatal Exception: java.lang.NullPointerException Attempt to invoke virtual method 'void android.graphics.Canvas.drawRect(android.graphics.RectF, android.graphics.Paint)' on a null object reference

Library version 1.6.2
Device and OS version - post-Marshmallow 6.x
Detailed steps to reproduce the issue - Don't know
XML layout and code for BlurView setup - Not sure on which layout used at multiple places with different configurations
Stacktrace in case of a crash - As below

android.graphics.drawable.GradientDrawable.draw (GradientDrawable.java:777) eightbitlab.com.blurview.BlockingBlurController.updateBlur (BlockingBlurController.java:142) eightbitlab.com.blurview.BlockingBlurController$1.onPreDraw (BlockingBlurController.java:61) android.view.ViewTreeObserver.dispatchOnPreDraw (ViewTreeObserver.java:977) android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:2394) android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:1437) android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:6886) android.view.Choreographer$CallbackRecord.run (Choreographer.java:1029) android.view.Choreographer.doCallbacks (Choreographer.java:841) android.view.Choreographer.doFrame (Choreographer.java:772) android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:1015) android.os.Handler.handleCallback (Handler.java:794) android.os.Handler.dispatchMessage (Handler.java:99) android.os.Looper.loop (Looper.java:176) android.app.ActivityThread.main (ActivityThread.java:6651) java.lang.reflect.Method.invoke (Method.java) com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:547) com.android.internal.os.ZygoteInit.main (ZygoteInit.java:824)

Screenshot 2019-10-31 at 2 20 11 PM
Screenshot 2019-10-31 at 2 20 19 PM
Screenshot 2019-10-31 at 2 20 25 PM
Screenshot 2019-10-31 at 2 23 07 PM

@Dimezis
Copy link
Owner

Dimezis commented Oct 31, 2019

Thank you for the detailed report.
Do you call somewhere setBlurEnabled or setBlurAutoUpdate?

@Mihir3646
Copy link
Author

Mihir3646 commented Nov 1, 2019

@Dimezis Yes, I am using setBlurEnabled every time to enable or disable runtime.
Like

    private void setUpBlurView() {
        final View decorView = getWindow().getDecorView();
        //Activity's root View. Can also be root View of your layout (preferably)
        final ViewGroup rootView = decorView.findViewById(android.R.id.content);
        //set background, if your root layout doesn't have one
        final Drawable windowBackground = decorView.getBackground();

        binding.blurView.setupWith(rootView)
                .setFrameClearDrawable(windowBackground)
                .setBlurAlgorithm(new RenderScriptBlur(this))
                .setBlurRadius(10);

        binding.blurView.setBlurEnabled(true);
    }

@Dimezis
Copy link
Owner

Dimezis commented Nov 4, 2019

It should be fixed in 1.6.3.
Please let me know in case if this issue persists.

@Mihir3646
Copy link
Author

Thank you for a quick solution. Let me try with 1.6.3.

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