Skip to content

使用一段时间后,根据URL获取图片出错。 #91

Open
@cmallocfree

Description

@cmallocfree

使用一段时间后,对UIImageView或YYAnimatedImageView显示图片时,显示图片错乱,比如存在imageView1、imageView2、imageView3,正确时应该分别显示图片img1、img2和img3。但是却依次显示了图片img2、img3、image4(img4是另外一张图片)。检查了数据的url,确认数据的url无误,根据URL获取的图片却不是应该正确显示的图片。

当关闭App数据写到硬盘后,再次启动App时,URL和对应的图片仍然是错乱的。

Activity

ibireme

ibireme commented on Apr 19, 2016

@ibireme
Owner

查看一下你的 YYWebImage 和依赖的 YYImage、YYCache 版本。升级到最新版本试试。

6david9

6david9 commented on Apr 25, 2016

@6david9

是不是 imageview 被复用了,前一个网络请求没有结束,返回的图片,复用到了新的 imageView 上。

santcool

santcool commented on May 11, 2016

@santcool

我也正在被这个问题烦恼,而我同时用了sdwebimage和yywebimage这两个库,两个库都出过这种问题。我看了下你们的源代码,然后通过电脑导入替换应用缓存文件的方式,找到问题:getObject:forKey: key相同的情况下,可能取到不同名字的object。@ibireme 你或许可以参考下我的办法

santcool

santcool commented on May 12, 2016

@santcool

SDWebImage里面也有不少人反映这个问题 SDWebImage/SDWebImage#1344

cvby

cvby commented on May 23, 2016

@cvby

@liupengpanda 现在才到1.0.3,哪来的1.0.4

crazyant

crazyant commented on Sep 7, 2016

@crazyant

+1 遇到了这个问题。

9527kevin

9527kevin commented on Oct 21, 2019

@9527kevin

遇到同样的问题了,有办法解决吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @6david9@ibireme@crazyant@santcool@cmallocfree

        Issue actions

          使用一段时间后,根据URL获取图片出错。 · Issue #91 · ibireme/YYWebImage