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

IllegalArgumentException in RingView.reallocateCache #904

Closed
iSoron opened this issue May 12, 2021 · 1 comment
Closed

IllegalArgumentException in RingView.reallocateCache #904

iSoron opened this issue May 12, 2021 · 1 comment
Labels
bug Something is not behaving as the developers expected cant-reproduce The developers cannot replicate the issue on their own devices high-severity
Milestone

Comments

@iSoron
Copy link
Owner

iSoron commented May 12, 2021

Description

From Google Play Console:

java.lang.IllegalArgumentException: 
  at android.graphics.Bitmap.createBitmap (Bitmap.java:1150)
  at android.graphics.Bitmap.createBitmap (Bitmap.java:1117)
  at android.graphics.Bitmap.createBitmap (Bitmap.java:1067)
  at android.graphics.Bitmap.createBitmap (Bitmap.java:1028)
  at org.isoron.uhabits.activities.common.views.RingView.reallocateCache (RingView.kt:197)
  at org.isoron.uhabits.activities.common.views.RingView.onDraw (RingView.kt:137)
  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 android.view.View.draw (View.java:23904)
  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 android.view.View.draw (View.java:23904)
  at org.isoron.uhabits.widgets.BaseWidget.getBitmapFromView (BaseWidget.kt:110)
  at org.isoron.uhabits.widgets.BaseWidget.buildRemoteViews (BaseWidget.kt:86)
  at org.isoron.uhabits.widgets.BaseWidget.getRemoteViews (BaseWidget.kt:120)
  at org.isoron.uhabits.widgets.BaseWidget.getLandscapeRemoteViews (BaseWidget.kt:48)
  at org.isoron.uhabits.widgets.StackRemoteViewsFactory.onDataSetChanged (StackRemoteViewsFactory.kt:145)
  at android.widget.RemoteViewsService$RemoteViewsFactoryAdapter.onDataSetChanged (RemoteViewsService.java:142)
  at com.android.internal.widget.IRemoteViewsFactory$Stub.onTransact (IRemoteViewsFactory.java:150)
  at android.os.Binder.execTransactInternal (Binder.java:1190)
  at android.os.Binder.execTransact (Binder.java:1159)

System information

  • Phone: Samsung Galaxy S10e
  • Phone Operating System: Android 11 (SDK 30)
  • App version: 2.0.1
@iSoron iSoron added bug Something is not behaving as the developers expected cant-reproduce The developers cannot replicate the issue on their own devices labels May 12, 2021
iSoron added a commit that referenced this issue May 23, 2021
In rare cases, it seems either that `onDraw` is called before `onMeasure` or
that `onMeasure` is called with a view that has zero height/width. This causes
`reallocateCache` to produce an IllegalArgumentException. This patch ensures
that diameter is never zero.

Fixes #904
@iSoron
Copy link
Owner Author

iSoron commented May 23, 2021

Fixed in hotfix/2.0.2

@iSoron iSoron closed this as completed May 23, 2021
@iSoron iSoron added this to the Loop 2.0.2 milestone May 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not behaving as the developers expected cant-reproduce The developers cannot replicate the issue on their own devices high-severity
Projects
None yet
Development

No branches or pull requests

1 participant