dropbox / dropshots

Easy on-device screenshot testing for Android.
Apache License 2.0
257 stars 17 forks source link

OutOfMemoryError when generating images on API 23 #48

Open saket opened 1 year ago

saket commented 1 year ago

Emulator details: Device: Pixel 7 System image: Marshmallow 23 RAM: 2536mb VM heap: 1228mb

Stacktraces:

java.lang.OutOfMemoryError: Failed to allocate a 20736012 byte allocation with 4194304 free bytes and 16MB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:831)
at android.graphics.Bitmap.createBitmap(Bitmap.java:808)
at android.graphics.Bitmap.createBitmap(Bitmap.java:775)
at com.dropbox.dropshots.Dropshots.generateDiffImage(Dropshots.kt:206)
at com.dropbox.dropshots.Dropshots.writeThen(Dropshots.kt:170)
at com.dropbox.dropshots.Dropshots.assertSnapshot(Dropshots.kt:119)
at com.dropbox.dropshots.Dropshots.assertSnapshot(Dropshots.kt:88)
java.lang.OutOfMemoryError: Failed to allocate a 10368012 byte allocation with 4194304 free bytes and 8MB until OOM
at com.dropbox.differ.Mask.<init>(Mask.kt:6)
at com.dropbox.dropshots.Dropshots.assertSnapshot(Dropshots.kt:129)
at com.dropbox.dropshots.Dropshots.assertSnapshot(Dropshots.kt:88)