You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The application crashes while running monkey tests with LeakCanary enabled
stacktrace:
FATAL EXCEPTION: LeakCanary-Activity-DB
java.lang.IllegalArgumentException: width and height must be > 0
at android.graphics.Bitmap.createBitmap(Bitmap.java:1197)
at android.graphics.Bitmap.createBitmap(Bitmap.java:1163)
at android.graphics.Bitmap.createBitmap(Bitmap.java:1111)
at android.graphics.Bitmap.createBitmap(Bitmap.java:1070)
at leakcanary.internal.activity.screen.HeapDumpRenderer.render(HeapDumpRenderer.kt:173)
at leakcanary.internal.activity.screen.RenderHeapDumpScreen$createView$$inlined$apply$lambda$2$1.invoke(RenderHeapDumpScreen.kt:51)
at leakcanary.internal.activity.screen.RenderHeapDumpScreen$createView$$inlined$apply$lambda$2$1.invoke(RenderHeapDumpScreen.kt:47)
at leakcanary.internal.activity.db.Io$execute$2.invoke(Io.kt:45)
at leakcanary.internal.activity.db.Io$execute$2.run(Io.kt:10)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
Steps to Reproduce
run monkey test (example comand adb shell monkey -p your.package.name -v 500000)
wait
app crashed
Expected behavior:
app did not crash
Version Information
LeakCanary version: 2.13
Android OS version: 13
Gradle version: 7.6.3 (AGP 7.4.1)
The text was updated successfully, but these errors were encountered:
yep I could see this happen. in RenderHeapDumpScreen, in onGlobalLayout, we should extract measuredWidth and measuredHeight before calling executeOnIo()
Description
The application crashes while running monkey tests with LeakCanary enabled
stacktrace:
FATAL EXCEPTION: LeakCanary-Activity-DB
java.lang.IllegalArgumentException: width and height must be > 0
at android.graphics.Bitmap.createBitmap(Bitmap.java:1197)
at android.graphics.Bitmap.createBitmap(Bitmap.java:1163)
at android.graphics.Bitmap.createBitmap(Bitmap.java:1111)
at android.graphics.Bitmap.createBitmap(Bitmap.java:1070)
at leakcanary.internal.activity.screen.HeapDumpRenderer.render(HeapDumpRenderer.kt:173)
at leakcanary.internal.activity.screen.RenderHeapDumpScreen$createView$$inlined$apply$lambda$2$1.invoke(RenderHeapDumpScreen.kt:51)
at leakcanary.internal.activity.screen.RenderHeapDumpScreen$createView$$inlined$apply$lambda$2$1.invoke(RenderHeapDumpScreen.kt:47)
at leakcanary.internal.activity.db.Io$execute$2.invoke(Io.kt:45)
at leakcanary.internal.activity.db.Io$execute$2.run(Io.kt:10)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
Steps to Reproduce
Expected behavior:
app did not crash
Version Information
The text was updated successfully, but these errors were encountered: