fresco icon indicating copy to clipboard operation
fresco copied to clipboard

When i Slide GridView back and forth quickly, the local image not display.fresco version is 0.5.0

Open somatezyc opened this issue 11 years ago • 12 comments

I used GridView to show photos,and v0.4.0 is normal.

my code: ImgBean item = getItem(position); if (item != null && !TextUtils.isEmpty(item.filePath)) { ImageRequest request = ImageRequestBuilder.newBuilderWithSource(UriParseUtil.parseFile(item.filePath)) .setResizeOptions(new ResizeOptions(itemWidth, itemWidth)) .build(); DraweeController controller = Fresco.newDraweeControllerBuilder() .setOldController(((SimpleDraweeView) convertView).getController()) .setImageRequest(request) .build(); ((SimpleDraweeView) convertView).setController(controller); } else { ((SimpleDraweeView) convertView).setImageURI(null); }

somatezyc avatar May 28 '15 02:05 somatezyc

I have same issue with 0.5.1. I'm using GridView with BaseAdapter. ListView looks OK. You can also check video - https://www.youtube.com/watch?v=_aJP7mEAGcM

Samsung Galaxy S2, Android 4.1.2. (Works on Nexus 5, Android 5.1.1).

@Override
public View getView(int position, View convertView, ViewGroup parent) {
    ViewHolder holder;
    if (convertView != null) {
        holder = (ViewHolder) convertView.getTag();
    } else {
        convertView = LayoutInflater.from(context).inflate(R.layout.grid_item_photo, parent, false);
        holder = new ViewHolder(convertView);
        convertView.setTag(holder);
    }
    holder.image.setImageURI(Uri.parse(photoList.get(position).url));
    return convertView;
}

radimvaculik avatar Jun 06 '15 23:06 radimvaculik

We also noticed this with the project I'm on. I didn't do a fully controlled series of tests, but it seems to me to happen with file URIs and not web URIs. I believe the checkin that caused this was e720a81 2015-05-14 Ian Childs Remove ImageTransformProducer (found by git bisecting on my project). We found that removing the resize call in our code fixed the issue, which was fine for our needs, and so we stopped digging into a solution. But of course, that may not be a viable option for all (or many). Hope that helps get this fixed.

mbrubin56 avatar Jun 07 '15 17:06 mbrubin56

Does adding CloseableReference.closeSafely(ret.first); to the line below this one https://github.com/facebook/fresco/blob/master/imagepipeline/src/main/java/com/facebook/imagepipeline/producers/ResizeAndRotateProducer.java#L161 make any difference? That is a bug that will be fixed in the next release.

If not, do you get anything in logcat?

Thanks for your help.

IanChilds avatar Jun 07 '15 20:06 IanChilds

@IanChilds It isn't worked,and i coundn't found any exception in logcat.

somatezyc avatar Jun 08 '15 07:06 somatezyc

There is no exception in logcat. Is there any option, how to turn on a debug?

radimvaculik avatar Jun 08 '15 07:06 radimvaculik

Call FLog.setMinimumLoggingLevel(FLog.VERBOSE) to see all logs.

tyronen avatar Jun 08 '15 21:06 tyronen

I upload a demo. @tyronen @Kuratkoo b18645751b80106561e4b8eb078b68b62f2e530f

somatezyc avatar Jun 09 '15 06:06 somatezyc

In my case,LogCat show this Sometimes while the local image not display in a grid list sliding quickly:

06-09 19:42:07.667: V/unknown:AbstractDraweeController(20887): controller 13b9e4 450: final_failed @ onFailure: failure: com.facebook.imagepipeline.memory.BasePool$PoolSizeViolationException: Pool hard cap violation? Hard cap = 75497472 Used size = 73858320 Free size = 0 Request size = 3686400 06-09 19:42:07.677: V/unknown:AbstractDraweeController(20887): controller 240e7d02 451: final_failed @ onFailure: failure: com.facebook.imagepipeline.memory.BasePool$PoolSizeViolationException: Pool hard cap violation? Hard cap = 75497472 Used size = 73858320 Free size = 0 Request size = 3686400

YongFongZhang avatar Jun 09 '15 11:06 YongFongZhang

@tyronen Could you tell me a progress of this bug, please?

ghost avatar Jun 11 '15 20:06 ghost

@tyronen Could you tell me a progress of this bug, please? +1

somatezyc avatar Jun 12 '15 03:06 somatezyc

v0.6.0 and 0.6.1 improved handling of local images. Also consider using our downsampling feature.

tyronen avatar Aug 10 '15 14:08 tyronen

I have still same problem - https://www.youtube.com/watch?v=0RKR2-wb14w @tyronen Do you need any information? Let me know.

ghost avatar Aug 10 '15 19:08 ghost