Skip to content

Android 14 - OutOfMemoryError #231

@josh-watcha

Description

@josh-watcha

This abnormal termination is happening, and there have been about 100 cases in a month.
More than 98% are Android 14 and Samsung devices

Iterator<Bitmap> iterator = cacheBitmaps.iterator();
I think too many bitmaps are cached in obtainBitmap, is it possible to modify it?

Exception java.lang.OutOfMemoryError:
  at java.util.HashMap$KeySet.iterator (HashMap.java:981)
  at java.util.HashSet.iterator (HashSet.java:173)
  at com.github.penfeizhou.animation.decode.FrameSeqDecoder.obtainBitmap (FrameSeqDecoder.java:103)
  at com.github.penfeizhou.animation.apng.decode.APNGDecoder.renderFrame (APNGDecoder.java:139)
  at com.github.penfeizhou.animation.decode.FrameSeqDecoder.step (FrameSeqDecoder.java:510)
  at com.github.penfeizhou.animation.decode.FrameSeqDecoder.access$200 (FrameSeqDecoder.java:36)
  at com.github.penfeizhou.animation.decode.FrameSeqDecoder$1.run (FrameSeqDecoder.java:60)
  at android.os.Handler.handleCallback (Handler.java:958)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loopOnce (Looper.java:230)
  at android.os.Looper.loop (Looper.java:319)
  at android.os.HandlerThread.run (HandlerThread.java:67)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions