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

In-app messages cause android app crash "Software rendering doesn't support hardware bitmaps" #711

Closed
kauz-mobilepay opened this issue Oct 21, 2020 · 3 comments

Comments

@kauz-mobilepay
Copy link

Hi,

Mixpanel in-app messages are causing "Software rendering doesn't support hardware bitmaps" crashes when capturing screens that contain hardware accelerated images:

com.mixpanel.android.util.ActivityImageUtils.getScaledScreenshot (ActivityImageUtils.java:15)
com.mixpanel.android.util.ActivityImageUtils.getHighlightColorFromBackground (ActivityImageUtils.java:43)
com.mixpanel.android.mpmetrics.MixpanelAPI$PeopleImpl$2.run (MixpanelAPI.java:2509)
android.app.Activity.runOnUiThread (Activity.java:6922)
com.mixpanel.android.mpmetrics.MixpanelAPI$PeopleImpl.showGivenOrAvailableNotification (MixpanelAPI.java:2482)

PixelCopy could be used for solving this.

@clhols
Copy link

clhols commented Feb 23, 2021

We are still seeing this crash our app in Mixpanel 5.8.5.

@zihejia
Copy link
Contributor

zihejia commented Mar 9, 2021

hi @kauz-mobilepay @clhols , we have released v5.8.7 which has a fix for this issue. I'm closing this one now, please feel free to reopen it if the problem still exists.

@gosr
Copy link

gosr commented Sep 8, 2021

Hi @zihejia, this crash is also occurring in v5.9.1:

Fatal Exception: java.lang.IllegalArgumentException: Software rendering doesn't support hardware bitmaps
at android.graphics.BaseCanvas.onHwBitmapInSwMode(BaseCanvas.java:673)
at android.graphics.BaseCanvas.throwIfHwBitmapInSwMode(BaseCanvas.java:680)
at android.graphics.BaseCanvas.throwIfCannotDraw(BaseCanvas.java:84)
at android.graphics.BaseCanvas.drawBitmap(BaseCanvas.java:142)
at android.graphics.Canvas.drawBitmap(Canvas.java:1648)
at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:548)
at android.widget.ImageView.onDraw(ImageView.java:1453)
at android.view.View.draw(View.java:23901)
at android.view.View.draw(View.java:23773)
at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
at androidx.constraintlayout.widget.ConstraintLayout.dispatchDraw(ConstraintLayout.java:1975)
at android.view.View.draw(View.java:23771)
at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
at android.view.View.draw(View.java:23771)
at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
at android.view.View.draw(View.java:23904)
at android.view.View.draw(View.java:23773)
at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
at androidx.recyclerview.widget.RecyclerView.drawChild(RecyclerView.java:5030)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
at android.view.View.draw(View.java:23904)
at androidx.recyclerview.widget.RecyclerView.draw(RecyclerView.java:4429)
at android.view.View.draw(View.java:23773)
at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
at androidx.constraintlayout.widget.ConstraintLayout.dispatchDraw(ConstraintLayout.java:1975)
at android.view.View.draw(View.java:23771)
at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
at android.view.View.draw(View.java:23771)
at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
at androidx.fragment.app.FragmentContainerView.drawChild(FragmentContainerView.java:261)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
at androidx.fragment.app.FragmentContainerView.dispatchDraw(FragmentContainerView.java:249)
at android.view.View.draw(View.java:23771)
at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
at androidx.constraintlayout.widget.ConstraintLayout.dispatchDraw(ConstraintLayout.java:1975)
at android.view.View.draw(View.java:23771)
at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
at androidx.coordinatorlayout.widget.CoordinatorLayout.drawChild(CoordinatorLayout.java:1277)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
at android.view.View.draw(View.java:23771)
at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
at android.view.View.draw(View.java:23771)
at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
at android.view.View.draw(View.java:23771)
at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
at android.view.View.draw(View.java:23771)
at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
at android.view.View.draw(View.java:23771)
at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
at android.view.View.draw(View.java:23904)
at com.android.internal.policy.DecorView.draw(DecorView.java:1282)
at com.mixpanel.android.util.ActivityImageUtils.getScaledScreenshot(ActivityImageUtils.java:31)
at com.mixpanel.android.util.ActivityImageUtils.getHighlightColorFromBackground(ActivityImageUtils.java:52)
at com.mixpanel.android.mpmetrics.MixpanelAPI$PeopleImpl$2.run(MixpanelAPI.java:2541)
at android.app.Activity.runOnUiThread(Activity.java:7154)
at com.mixpanel.android.mpmetrics.MixpanelAPI$PeopleImpl.showGivenOrAvailableNotification(MixpanelAPI.java:2514)
at com.mixpanel.android.mpmetrics.MixpanelAPI$PeopleImpl.showGivenNotification(MixpanelAPI.java:2333)
at com.mixpanel.android.mpmetrics.MixpanelAPI.track(MixpanelAPI.java:2928)
at com.mixpanel.android.mpmetrics.MixpanelAPI.track(MixpanelAPI.java:900)
at com.mixpanel.android.mpmetrics.MixpanelAPI.trackMap(MixpanelAPI.java:842)

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