Skip to content

Blog · Audits, crashes and speed

Finding and fixing app crashes

By Shahid Hussain, senior mobile & web engineer ·

A crash report only helps once it points at a line of your code. The work is the same on iPhone, Android and Flutter: measure how many people crash, make the reports readable, rank them by how many people they hit, reproduce the top ones, fix the cause, and confirm in production that the fix worked. This is the order I follow in a Fix & Speed Sprint.

1. Start from the crash-free rate

The number that matters is the share of users, and of sessions, that don’t crash, per app version. Your crash reporter shows it: Firebase Crashlytics or Sentry, Xcode Organizer for iPhone, and Android vitals in Google Play Console.

  • Compare it per version. A drop right after a release points at that release’s changes.
  • Watch users and sessions. A crash that hits a few heavy users many times looks small per user and large per session.
  • Know the Play Store’s line. Google Play counts a user-perceived crash rate above 1.09% overall, or above 8% on a single phone model, as bad behaviour, and can show the app to fewer people. The thresholds are on Google’s Android vitals page.

2. Make every report readable

Release builds are stripped of symbol names, so a raw crash shows memory addresses or names like a.b.c instead of your classes. Each platform needs its symbols uploaded once per build:

  • iPhone: the dSYM files from the archive. Crashlytics uploads them with a build phase script; Xcode Organizer uses the ones from your App Store Connect uploads.
  • Android: the R8 mapping file (mapping.txt). The Crashlytics Gradle plugin uploads it when it’s enabled; Play Console takes it with each release.
  • Flutter: if the app is built with --obfuscate --split-debug-info, upload that symbols folder to your crash reporter, or every Dart stack trace stays unreadable.

If one platform’s stack traces still make no sense after this, check the native layer: plugins and SDKs that ship native code need their own symbols.

3. Group and rank

Crash reporters group reports by where they happen. Rank the groups by people affected, then by where in the app:

  1. Crashes on launch come first, because the app can’t be used at all.
  2. Then crashes in paid or critical flows: checkout, sign-in, the main screen.
  3. Then everything else, by users affected.

A handful of groups usually accounts for most of the crashes, so fixing the top three to five moves the crash-free rate the most.

4. Reproduce it

Read what the report carries besides the stack: the last screens and actions (breadcrumbs), the device, the OS version, memory and disk state, locale and app version. Then recreate those conditions. The causes I find most often:

  • Swift on iPhone: force-unwrapping a value that is nil (!), reading past the end of an array, updating the UI from a background thread, and state that changes while a view is being torn down.
  • Kotlin on Android: null values crossing from Java code, fragment work after the activity saved its state, and large images loaded at full size until memory runs out.
  • Flutter: errors in async code nobody awaited, the null-check operator (!) on a value that is null, and plugin calls that fail on one platform. Catch what’s left with FlutterError.onError and PlatformDispatcher.instance.onError, so nothing crashes silently.

Out-of-memory terminations on iPhone are worth knowing about: they don’t show up as crashes, but Xcode Organizer lists them under terminations. An app that “just closes” for some users is often this.

5. Fix the cause, not the symptom

Wrapping the failing line in a try or a null check makes the crash disappear from the report and moves the problem somewhere users can’t see it. Find why the value is missing or the state is wrong, fix that, and add a check that fails loudly in debug builds if it happens again.

6. Confirm the fix in production

Ship the fix to a slice of users first: Google Play’s staged rollout lets you choose the percentage, and the App Store’s phased release spreads an update over seven days. Watch the crash-free rate of the new version for those users before releasing to everyone, and keep the crash group open until it stops appearing in the new version.

What to send if you want help

A link to your crash reporter or an export of the top crash groups, the app version, and the devices that matter to you. That’s enough to start ranking.

About the author

Shahid Hussain is a senior mobile & web engineer in Islamabad, Pakistan (UTC+5), with 27+ apps shipped to production in SwiftUI, Flutter, React and Next.js, for Zavi Technology and independent clients.