-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bitmap limit is hardcoded to 384 #1980
Comments
Are the stickers animated (gif / webp)? If not, it's probably just a matter of either increasing the memory cache size (which you can do when configuring the pipeline), or more aggressively recycling DraweeViews. What are you using to display stickers, ScrollView or List/RecyclerView? |
Yes I use some animated (gif) and png Stickers in RecyclerView. |
This is the Error Message (version 1.7.1) : `Android: 4.2.2 com.facebook.imagepipeline.common.TooManyBitmapsException: Attempted to pin a bitmap of size 65536 bytes. The current pool count is 384, the current pool size is 45220368 bytes. The current pool max count is 384, the current pool max size is 100663296 bytes. |
Nobody ? |
It seems nobody knows the issue and I obligate to use glide instead. |
We have this issue internally to some degree as well. In our case the fix was to use You can also look into using videos instead.
Do you mean version |
I remove all gifs and load just png. Even in version 1.8.0 there is this problem too. |
So I think in v1.4.0 (is this what you're using?) we switched from having a separate memory cache for GIF frames to using the main one. This is good generally as it reduces the overall memory footprint (and OOMs) of Fresco by evicting other bitmaps in favor of animation frames, but it does also lead to this exception. @oprisnik since you made this change, do you know if there is a way around this exception? Perhaps increasing the default bitmap pool size? Or configuring the frame prefetching differently? |
The limit is hardcoded to 384 at the moment (https://github.com/facebook/fresco/blob/master/imagepipeline/src/main/java/com/facebook/imagepipeline/memory/BitmapCounterProvider.java#L26) but we should re-evaluate that. |
We are facing the same issue that reaching the 384 limitation. Is there any solution we can bypass this exception ? |
I don't know why the official still not solve this problem? This will cause lots of crash in my app. |
We should make this configurable. |
This is now an option 3ccf021 |
use RecyclerView |
if bitmap over 384, it do not recycle/release? |
@huopochuan Sorry, not sure I understand your question. |
Hi. I'm using fresco to load a lot of stickers.
Until version number 14 there is no any problem. In 14 and above always on pre lollipop version this exception happened and app crashed.
I set maximum number of cache in fresco configuration.
com.facebook.imagepipeline.common.TooManyBitmapsException
The text was updated successfully, but these errors were encountered: