App 子线程中初始化 APNGImage 偶现 crash
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 2.3k
- Forks
- 201
- PR merge metrics
- No merged PRs in 30d
Description
线上崩溃日志收集如下:
#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 呢?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with loadEmoticonMapper and follow APNGImage initialization into APNGDecoder.swift:67 and :78, then inspect the read call at Reader.swift:104. Determine the failure path represented by the SIGABRT and explain why the shown try? usage does not prevent it; done means a confirmed cause and a documented or reproducible resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100