DEV Community

loading...

Why do mobile apps crash?

Robin Alex Panicker
Software Engineer. Architecting Finotes - an SDK that autodetect bugs in mobile apps.
Originally published at quora.com ・1 min read

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.

Discussion (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 Author

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.