DEV Community

Robin Alex Panicker
Robin Alex Panicker

Posted on • Originally published at quora.com

5 1

Why do mobile apps crash?

Here are some of the common reasons why mobile apps crash.

  1. Memory usage going beyond permissible levels. Solution is to ensure object reuse as much as possible. For example Table Cells can be reused to ensure the content that needs to be displayed at a given point in time is in the memory.

  2. Memory leaks (stale objects hanging around). Make sure you use lists and static objects with care.

  3. Unhandled exceptions. Make sure anticipated exceptions are handled properly.

  4. Trying to access non-existent memory location. Make sure you have clear understanding of life time of the objects you create.

Well, how much ever testing you do it’s very difficult to cover all possible scenarios. This is much true in the case of mobile apps as they run in a variety of devices. Use tools like Crashlytics (Firebase Crashlytics | Crash Reporting to help you prioritize and fix stability issues faster (https://firebase.google.com/products/crashlytics) - for crashes), Finotes (Detect memory leaks, crashes, ANR, bugs in Android & iOS apps (https://finotes.com) - for crashes, memory leaks, memory usage issues, ANR, http issues), New Relic (New Relic | Deliver more perfect software (https://newrelic.com) - crashes, http issues) to capture bugs in live mobile apps so that you get to know them as and when it happens.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (2)

Collapse
 
ridaehamdani profile image
Ridae HAMDANI

can we make our own embedded crash, ANR... classes inside the app without using other library?

Collapse
 
robin_a_p profile image
Robin Alex Panicker

You can do crash handling inside app, but ANR will be a challenge as doing that in production will drain the app's resources if not implemented right.

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay