werbhelius/PickPhotoSample

OutOfMemoryError on Preview

onurh opened this issue · 3 comments

onurh commented

Hello, ive updated to 0.3.0 and after few photo preview its giving the error below.

FATAL EXCEPTION: 111
Process: com.werb.pickphotosample, PID: 11430
java.lang.OutOfMemoryError: Failed to allocate a 7834380 byte allocation with 5303464 free bytes and 5MB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.BitmapRegionDecoder.nativeDecodeRegion(Native Method)
at android.graphics.BitmapRegionDecoder.decodeRegion(BitmapRegionDecoder.java:285)
at com.shizhefei.view.largeimage.BlockImageLoader$LoadHandler.handleMessage(BlockImageLoader.java:856)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)

Got!

Hello @onurh , I am getting the same error too. Can you please try the commit from Jun 19, 2017 and see if the error persists? That is the latest commit before I made any changes. I am still getting the error even with that commit.

In my changes, I have not touched PreviewImageActivity except to change usages of List to ArrayList. I do not think the error is because of my code. That said, I could be wrong :P

fixed in release v0.3.5