wowprompt

Mobile app crash log diagnosis with a fix and a guard

Reads a crash stack trace from an Android or iOS app with the related code, names the root cause in plain words, writes the fix, adds a guard so the same class of crash cannot return, and suggests a test. Use it when a crash report tool shows a top crash and the team needs to ship a fix quickly.

A root cause in two sentences, the crashing line explained, a code fix in a diff, a defensive guard, a test that reproduces the crash, and release notes
The output this prompt produced, unedited.

The prompt

Constraints

  • Change the smallest amount of code that fixes the cause, not the symptom.
  • Never fix a crash by catching and ignoring every exception.
  • If the stack trace is obfuscated or missing frames from the app's own code, say so and explain how to get a readable trace before guessing.
  • Keep the user's data safe: no fix may delete or reset saved data silently.

Inputs

  • Platform and language: [e.g. Android with Kotlin, iOS with Swift, a cross-platform framework]
  • Crash stack trace: [paste the full trace]
  • Code for the frames from the app: [paste the functions named in the trace]
  • Crash numbers: [e.g. 1.8 percent of sessions, mostly on Android 13, since version 4.2.0]
  • What changed in that version: [paste release notes or the diff summary]
  • Steps users were taking, if known: [e.g. rotating the screen during checkout]

Task

Find why the app crashes and fix it so it stays fixed.

Output format

  1. Root cause in two plain sentences.
  2. The exact line that fails and why it fails there, such as a null value, a closed screen, a background thread touching the UI, or an index out of range.
  3. Why it started in this version, linked to the change listed.
  4. The fix as a diff.
  5. A guard against the whole class of crash, such as lifecycle checks or safe unwrapping, with one line on why.
  6. A test or manual steps that reproduce the crash before the fix and pass after it.
  7. Release note line and the crash rate to expect after rollout.
app crash fixstack trace analysisandroid crashios crashcrash logmobile debugging

How to run this

Copy the prompt and paste it into Gemini, then set the aspect ratio to 3:4. No reference photo is needed for this one.

The prompt is written in Markdown with each part under its own heading, which is what the copy action hands over. Change one section at a time, keeping the rest intact, so you can tell which change did the work.

Related prompts

All productivity