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

App 子线程中初始化 APNGImage 偶现 crash #131

Open
Mervin1024 opened this issue Dec 13, 2022 · 0 comments
Open

App 子线程中初始化 APNGImage 偶现 crash #131

Mervin1024 opened this issue Dec 13, 2022 · 0 comments

Comments

@Mervin1024
Copy link

线上崩溃日志收集如下:

#32 Thread SIGABRT

0 ??? 0x00000001acdf0f9c + 0
1 ??? 0x00000001e9ff75c0 + 0
2 ??? 0x00000001f2930000 + 0
3 ??? 0x00000001acdf1484 + 0
4 ??? 0x00000001acdff928 + 0
5 libdyld.dylib dyld_stub_binder + 60
6 APPName read (Reader.swift:104)
7 APPName read (<compiler-generated>:0)
8 APPName init (APNGDecoder.swift:78)
9 APPName init (APNGDecoder.swift:67)
10 APPName loadEmoticonMapper (<compiler-generated>:0)
11 APPName _$sIeg_IeyB_TR (<compiler-generated>:0)
12 libdispatch.dylib __dispatch_call_block_and_release + 24

crash 统计中,目前的用户设备系统版本均为 iOS13+。

  • loadEmoticonMapper 中加载 APNGImage 的代码在子线程调用,通过如下方式使用
    if let image = try? APNGImage(fileURL: url, scale: 3) { /// }

为何 try catch 无法避免 APNGDecoder.init() 方法引起的 crash 呢?

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

1 participant