Diagnosing and Fixing Memory-Related Crashes in an iOS OCR App
KotenOCR is an iOS app that performs OCR on classical Japanese texts using ONNX Runtime. It ships with 6 ONNX models totaling approximately 230MB on disk. After reaching 300 downloads, the crash rate was found to be 6.7% (20 crashes). No crash logs appeared in Xcode Organizer, so a different investigation approach was required. Investigation Approach Four parallel investigation tracks were pursued: Memory and model size analysis Image processing pipeline review ONNX Runtime thread safety audit Camera and UI lifecycle inspection Root Causes The investigation identified four issues, listed here in order of estimated severity. ...


