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

java.lang.IllegalArgumentException: Software rendering doesn't support hardware bitmaps #5

Open
softlion opened this issue Feb 8, 2019 · 3 comments

Comments

@softlion
Copy link

softlion commented Feb 8, 2019

Google play automated tests found a problem with blur view on Pixel2 device, which crashes the app:

Any clue ?

java.lang.IllegalArgumentException: Software rendering doesn't support hardware bitmaps
	at android.graphics.BaseCanvas.onHwBitmapInSwMode(BaseCanvas.java:550)
	at android.graphics.BaseCanvas.throwIfHwBitmapInSwMode(BaseCanvas.java:557)
	at android.graphics.BaseCanvas.throwIfCannotDraw(BaseCanvas.java:69)
	at android.graphics.BaseCanvas.drawBitmap(BaseCanvas.java:127)
	at android.graphics.Canvas.drawBitmap(Canvas.java:1504)
	at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:545)
	at android.widget.ImageView.onDraw(ImageView.java:1360)
	at android.view.View.draw(View.java:20207)
	at android.view.View.draw(View.java:20077)
	at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
	at android.view.ViewOverlay$OverlayViewGroup.dispatchDraw(ViewOverlay.java:251)
	at android.view.View.draw(View.java:20216)
	at eightbitlab.com.blurview.BlockingBlurController.drawUnderlyingViews(BlockingBlurController.java:221)
	at eightbitlab.com.blurview.BlockingBlurController.drawBlurredContent(BlockingBlurController.java:234)
	at eightbitlab.com.blurview.BlurView.draw(BlurView.java:57)
	at android.view.View.updateDisplayListIfDirty(View.java:19082)
	at android.view.View.draw(View.java:19935)
	at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
	at android.support.constraint.ConstraintLayout.dispatchDraw(ConstraintLayout.java:1966)
	at android.view.View.draw(View.java:20210)
	at android.view.View.updateDisplayListIfDirty(View.java:19082)
	at android.view.View.draw(View.java:19935)
	at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
	at android.view.View.updateDisplayListIfDirty(View.java:19073)
	at android.view.View.draw(View.java:19935)
	at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
	at android.support.design.widget.CoordinatorLayout.drawChild(CoordinatorLayout.java:1234)
	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
	at android.view.View.draw(View.java:20210)
	at android.view.View.updateDisplayListIfDirty(View.java:19082)
	at android.view.View.draw(View.java:19935)
	at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
	at android.view.View.updateDisplayListIfDirty(View.java:19073)
	at android.view.View.draw(View.java:19935)
	at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
	at android.view.View.updateDisplayListIfDirty(View.java:19073)
	at android.view.View.draw(View.java:19935)
	at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
	at android.view.View.updateDisplayListIfDirty(View.java:19073)
	at android.view.View.draw(View.java:19935)
	at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
	at android.view.View.updateDisplayListIfDirty(View.java:19073)
	at android.view.View.draw(View.java:19935)
	at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
	at android.view.View.draw(View.java:20210)
	at com.android.internal.policy.DecorView.draw(DecorView.java:780)
	at android.view.View.updateDisplayListIfDirty(View.java:19082)
	at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:686)
	at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:692)
	at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:801)
	at android.view.ViewRootImpl.draw(ViewRootImpl.java:3312)
	at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3116)
	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2485)
	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1460)
	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7184)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:949)
	at android.view.Choreographer.doCallbacks(Choreographer.java:761)
	at android.view.Choreographer.doFrame(Choreographer.java:696)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
	at android.os.Handler.handleCallback(Handler.java:873)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at androidx.test.espresso.base.Interrogator.a(Interrogator.java:19)
	at androidx.test.espresso.base.UiControllerImpl.a(UiControllerImpl.java:164)
	at androidx.test.espresso.base.UiControllerImpl.a(UiControllerImpl.java:156)
	at androidx.test.espresso.base.UiControllerImpl.a(UiControllerImpl.java:34)
	at androidx.test.espresso.action.MotionEvents.a(MotionEvents.java:76)
	at androidx.test.espresso.action.MotionEvents.a(MotionEvents.java:51)
	at androidx.test.espresso.action.Tap.c(Tap.java:8)
	at androidx.test.espresso.action.Tap.a(Tap.java:18)
	at androidx.test.espresso.action.Tap$1.b(Tap.java:3)
	at androidx.test.espresso.action.GeneralClickAction.perform(GeneralClickAction.java:22)
	at androidx.test.espresso.ViewInteraction$SingleExecutionViewAction.perform(ViewInteraction.java:9)
	at androidx.test.espresso.ViewInteraction.a(ViewInteraction.java:79)
	at androidx.test.espresso.ViewInteraction.a(ViewInteraction.java:96)
	at androidx.test.espresso.ViewInteraction$1.call(ViewInteraction.java:3)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at android.os.Handler.handleCallback(Handler.java:873)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:193)
	at android.app.ActivityThread.main(ActivityThread.java:6669)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
@wcoder
Copy link
Owner

wcoder commented Feb 8, 2019

@softlion
Copy link
Author

I replaced this component with the one from mmin18/RealtimeBlurView. I translated it into C#:

https://gist.github.com/softlion/e8507be4ab62088fb424b3bfc95b8eef

It's much easier to use.

@dejanbasic
Copy link

I replaced this component with the one from mmin18/RealtimeBlurView. I translated it into C#:

https://gist.github.com/softlion/e8507be4ab62088fb424b3bfc95b8eef

It's much easier to use.

@softlion can I use this in Xamarin.Forms project and how? Can you provide a sample code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants