Skip to content
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

代码没有处理错误回调 #1637

Open
ChannelYu opened this issue Feb 27, 2023 · 1 comment
Open

代码没有处理错误回调 #1637

ChannelYu opened this issue Feb 27, 2023 · 1 comment

Comments

@ChannelYu
Copy link

ChannelYu commented Feb 27, 2023

提bug前必看
请先回答下列三个问题,否则不允处理,谢谢配合。
1、我最新的Demo是否有这个bug?【如果Demo没问题,请升级新版
答:有

2、你用的是什么版本?升级到最新版后是否正常?
答:3.8.3

3、是否有改动过我库内部的代码?【如有,请说明改动点
答:无

bug内容描述

将一张iOS系统不支持的图片格式(例如tiff格式),后缀修改成jpg,导入到系统相册。
伪装的jpg,一样在TZImagePickerController的图片列表中可以被显示。当然预览图显示空白。
此刻,选中这张有问题的图片,并点击右下角「完成」。界面一直显示loading。就没下文了。

我如何复现这个bug?

把一张iOS系统不支持的图片格式,后缀修改成jpg,导入到系统相册。然后通过tzimagepicker选中这张图片,点击完成。

其它说明
伪装成jpg是为了防止系统根据后缀把诸如tiff不支持的图片格式先过滤掉了,这样通过photokit相关接口就拿不到这张图片了。
伪装图片同时也是为了模拟网络中下载的图片,可能存在格式错误。

image

对于系统无法解码的图片,系统返回info存在PHImageErrorKey,并且result == nil。 此刻无法匹配代码中框住的两个if条件。于是外部就一直接收不到任何回调了。
@banchichen
Copy link
Owner

欢迎PR哈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants