Closed kimi14314 closed 1 year ago
Crashed here
Crashed here
Hello, have you solved this problem? I also encountered this problem, can you tell me how to solve it?
Crashed here
Hello, have you solved this problem? I also encountered this problem, can you tell me how to solve it?
Hello, I tried to upgrade libwep to v1.2.0, but I am not sure if the problem could be solved since it's an unusual crash. Need to observe for a while
@skyxian @kimi14314 At what probability does it happen in production? I need more information to investigate into it, such as os version, more detailed stack traces etc.
"EXC_BAD_ACCESS · Attempted to dereference null pointer" Seems to be a multi-thread problem. Probability is about 1% in production.
"
Has this problem been solved? I also encountered this problem in production(KingfisherWebP version = 1.3.0 ,device model: = iPhone 8p,os = 14.7.1), but i couldn't reproduce.
Has this problem been solved? I also encountered this problem in production(KingfisherWebP version = 1.3.0 ,device model: = iPhone 8p,os = 14.7.1), but i couldn't reproduce.
It shouldn't be a multithreaded problem, since webp decoding is totally a blocking operation. From this stack trace I assume it might be caused by some memory pressure. How much memory used and left on the device when this crash occurred?
Has this problem been solved? I also encountered this problem in production(KingfisherWebP version = 1.3.0 ,device model: = iPhone 8p,os = 14.7.1), but i couldn't reproduce.
It shouldn't be a multithreaded problem, since webp decoding is totally a blocking operation. From this stack trace I assume it might be caused by some memory pressure. How much memory used and left on the device when this crash occurred?
Thanks!
Your guess may be correct.
这个问题解决了吗?我在生产中也遇到过这个问题(KingfisherWebP version = 1.3.0 ,device model: = iPhone 8p,os = 14.7.1),但无法重现。
它不应该是一个多线程问题,因为 webp 解码完全是一个阻塞操作。从这个堆栈跟踪我认为它可能是由一些内存压力引起的。发生此崩溃时,设备上已使用和剩余多少内存?
谢谢!
你的猜测可能是正确的。
is there any solution,When the memory is low
any update here? same issue at low memory case
Previously, the use of webp was closed due to a crash. After the recent two versions were opened, this crash ranks in the top two positions. I can provide the following information. Can the author help analyze how to solve it?,thanks
The crash seems to have occurred in models below iphoneXR,And it all happens in the WebPAnimDecoderDelete(dec) method @yeatse
Actually this crash comes from the previous line: memcpy(bufCopy, buf, bufsize);
. As we discussed earlier, this is fundamentally an out-of-memory issue, that we failed to copy the decoded image buffer for future use. In my personal experience, memory issues are more likely to occur on devices with 3GB RAM. For more details on this topic, please refer to this article.
To resolve this crash and prevent similar issues in the future, you should pay close attention to your app's overall memory usage. Here are a couple of methods that can help:
ResizingImageProcessor
after WebPProcessor
to downscale your result imageI will release a new version later that returns a null image instead of crashing when low memory occurs; however, it is still important for you to implement these changes.
@skyxian
Actually this crash comes from the previous line:
memcpy(bufCopy, buf, bufsize);
. As we discussed earlier, this is fundamentally an out-of-memory issue, that we failed to copy the decoded image buffer for future use. In my personal experience, memory issues are more likely to occur on devices with 3GB RAM. For more details on this topic, please refer to this article.To resolve this crash and prevent similar issues in the future, you should pay close attention to your app's overall memory usage. Here are a couple of methods that can help:
- Set Kingfisher's memory cache to a lower limit: https://github.com/onevcat/Kingfisher/wiki/Cheat-Sheet#cache
- Add a
ResizingImageProcessor
afterWebPProcessor
to downscale your result imageI will release a new version later that returns a null image instead of crashing when low memory occurs; however, it is still important for you to implement these changes.
@skyxian
Thank you very much, I will modify the existing code according to your suggestion, and look forward to your new release version
@yeatse
Released 1.4.1
现实上这个崩溃来自上一步:以
memcpy(bufCopy, buf, bufsize);
备将来使用。根据我的个人经验,内存问题更可能发生在配备了3GB RAM的设备上。有关于此主题的更多详细信息,请参阅附件。要解决此崩溃并阻止将出现类似问题,您应该密切注意应用的整体内存使用情况。以下是一些可以提供帮助的方法法:
- 将 Kingfisher 的内部存储设置为下载:https ://github.com/onevcat/Kingfisher/wiki/Cheat-Sheet#cache
- 添加一个
ResizingImageProcessor
afterWebPProcessor
以缩小小结果图像之后我会发布一个新版本,它会返回一个空间图像,而不是在内存不及时崩溃;但是,实际应用这些更改对您来说仍然很重要要。
@skyxian
"添加一个ResizingImageProcessor
afterWebPProcessor
以缩小小结果图像"
是这样设置吗:
options?.append(.processor(ResizingImageProcessor(referenceSize: size))) options?.append(.processor(WebPProcessor.default))
现实上这个崩溃来自上一步:以
memcpy(bufCopy, buf, bufsize);
备将来使用。根据我的个人经验,内存问题更可能发生在配备了3GB RAM的设备上。有关于此主题的更多详细信息,请参阅附件。 要解决此崩溃并阻止将出现类似问题,您应该密切注意应用的整体内存使用情况。以下是一些可以提供帮助的方法法:
- 将 Kingfisher 的内部存储设置为下载:https ://github.com/onevcat/Kingfisher/wiki/Cheat-Sheet#cache
- 添加一个
ResizingImageProcessor
afterWebPProcessor
以缩小小结果图像之后我会发布一个新版本,它会返回一个空间图像,而不是在内存不及时崩溃;但是,实际应用这些更改对您来说仍然很重要要。 @skyxian
"添加一个
ResizingImageProcessor
afterWebPProcessor
以缩小小结果图像"是这样设置吗:
options?.append(.processor(ResizingImageProcessor(referenceSize: size))) options?.append(.processor(WebPProcessor.default))
参考:https://github.com/onevcat/Kingfisher/wiki/Cheat-Sheet#multiple-processors Resizing 放 WebP 后面
这两个调换下先后 webp动图就不动了
这两个调换下先后 webp动图就不动了
1.5.2 版本之后动图可以使用 AnimatedImageView 了,会自动根据 View 的实际大小压缩图片
Met an unusual crash.
Any idea on what happened?