Background and Problem Localization
The article discusses identifying and resolving ImageIO-related crash issues in iOS applications, particularly those occurring after iOS 14 updates, by analyzing crash logs and system behavior.
Background
Last September, many users upgraded to iOS 14, leading to ImageIO-related crashes in many apps, with some reaching Top 3 crashes.
Problem Localization
Using APM data, the team analyzed detailed crash logs to identify the issue.
Crash Analysis
1.1 Stack Trace The crash occurs during ImageIO parsing, specifically in CGImageSourceCopyPropertiesAtIndex implementation. 1.2 Problem Aggregation Issues are concentrated in iOS 14+ versions and occur in the background. 1.3 Analysis Initial analysis shows the crash is not due to specific image formats or multithreading issues. Reverse Engineering 1.4 Stack Trace The crash address 0x000021a1ee2fa271 points to a memory access error, with x8 register holding an incorrect value. 1.5 Source Identification The variable sDefaultNameSpacePrefixMap in AdobeXMPCore_Int is suspected, as it's accessed in multiple methods. 1.6 Runtime Debugging Debugging reveals the variable is accessed in threads after the main thread has deallocated it, causing crashes. Conclusion The crash occurs when background threads access a deallocated global variable sDefaultNameSpacePrefixMap after the main thread has freed it.
ByteDance Terminal Technology
Official account of ByteDance Terminal Technology, sharing technical insights and team updates.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.