bumptech / bumptech/glide

Possible issue with Android O : bitmaps stored on native memory, uncaught OOM, ...

Open
#2,788 5 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
Java
Stars
35k
Forks
6.2k
Avg merge
1d 11h
Merged PRs (30d)
8

Description

The app I'm using Glide on is for Android 8.1 and above. I think I know now why I couldn't decide what's going on with memory (written [here](https://github.com/bumptech/glide/issues/2768)) : Bitmaps seem to be stored on native memory .

Does Glide have the needed modifications to consider this?

For example, since it uses memory cache, it might not need to look at the heap memory size, to decide on the default mem cache size, or maybe it could set it to be the same size...

Not only that, but it seems that OOM exception might not be thrown at all in case you try to decode images, and you might get NPE instead on some other cases. This means Glide might need to have a different way to capture errors of bitmap allocations (unless it never did such a thing anyway).

On the other hand, I can't find a way to get the max native memory the OS allows the app to have, as well as many other memory related tools I had in the past. Because of this, I've written about it all [here](https://stackoverflow.com/q/48091403/878126).

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the related issue 2768 and the linked Stack Overflow question to understand the Android 8.1 memory behavior being reported. Investigate Glide's bitmap allocation, memory-cache sizing, and error handling, but the issue does not name files, tests, or a concrete acceptance condition for determining when the work is done.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile, performance
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.