11 Common Reasons for Mobile App Crashing

Mario Žderić
Co-founder
Development

Nothing spells a bad user experience more than a mobile app crashing. If that happens to your app pretty often, it’s almost certain that you’ll lose the majority of your users pretty soon. 

This is why unstable apps are a nightmare and every app owner should take preventive measures against them.

Mobile apps crash for many different reasons. 

Sometimes, they are the result of inadequate app testing, poor memory management, or even device incompatibility. 

Irrespective of the error source, certain best practices can help you keep your app up at all times on most devices.

In this article, we’ll share 11 common reasons why app crashes happen and walk you through some tips and tools for avoiding them. 

But before that, let’s consider why they’re such a big deal.

What Happens If Apps Crash

It’s almost impossible to keep any customer satisfied if your app crashes regularly. 

Research reveals that the majority of Android app users can only tolerate an average daily crash rate of 0.25%

As a rule of thumb, lower retention rates equal less revenue. 

If you’re still wondering how a mobile app’s lack of stability affects revenue generation, here are some of its effects you should bear in mind:

Bad Reviews and Ratings

Ratings and reviews often make all the difference when a prospective app user chooses between multiple competitors. SEO algorithms also rely heavily on them. By beta testing your app, you can easily avoid the risk of piling up bad reviews that make your app unmarketable.

Uninstalls

App crashes don’t affect prospective users only—existing ones are not spared either. A bad user experience can lead even the most loyal users to the competition. In the end, low retention rates result in a Customer Acquisition Cost (CAC) hike.

Interrupted or Lost Transactions

If you own an eCommerce app, you should be most worried about app crashes. A lot of effort goes into securing a conversion, so sing a buyer to technical errors is something you want to avoid.

Such experiences during financial transactions may also impact the buyer’s trust in your brand significantly.

Crashes also require multiple unnecessary updates to fix. 

Furthermore, apart from the inconvenience to the user, you suffer a lot in terms of development costs

In essence, being proactive about these issues will always prove beneficial to your entire mobile development process.

Now, let’s consider the major issues you should look out for if you want to avoid mobile app crashes.

Common Reasons Why Apps Crash

To know where to look in case they happen to you in the future, here are 11 of the most prevalent causes of app crashes.

1. Poor Memory Management

In enterprise-scale applications, in particular, proper memory management is a common challenge for developers. 

One of the major reasons why apps develop performance issues and trigger memory warnings is high memory usage. In extreme cases, these performance issues end up causing the app to terminate.

As an app owner or developer, reducing your app’s memory footprint should always be a priority.

When a mobile device OS requires more memory to perform tasks, the first course of action is to terminate high usage apps. 

If your app consistently sucks up a lot of memory, it may just end up on the OS’s blacklist. In such circumstances, the user experience is sure to suffer tremendously.

Many factors could lead to poor memory management on your mobile app. 

At the top of the list are incorrect cache usage and retain cycles. Without proper sizing and configuration, cache usage can quickly grow and eat up existing memory.

On the other hand, when two objects with a strong reference point at each other, a retain cycle is activated. The objects in the retain cycle can only get released when the app is terminated.

One way to escape these issues is to only load memory objects (large images, etc.) when the need arises. 

This not only helps to avoid crashes but also minimizes screen load times and boosts performance. 

You can also implement different actions, such as releasing non-compressed memory objects when you receive a memory warning.

2. Inadequate Testing

It’s impossible to deliver your users a stable and reliable app without thorough testing. To prevent or minimize your app’s risk of crashing, it’s important to test it continuously. 

While doing so, bear in mind that the quality of testing is equally as important as how regularly you conduct it.

Testing your app correctly generally involves doing so in several running environments. 

This could mean trying it on different platforms, devices, resolutions, orientations, and even networks. In the process, you’ll get to identify and monitor the errors and bugs that eventually compromise your app’s stability.

One error common among developers is the tendency to test an app feature by feature. 

While this is indispensable in the development cycle, some issues may not pop up on the developer’s end. For a clearer insight into the end-user experience, you need to test the entire app experience.

That’s the main idea behind testing—to experience these issues first-hand before the user does. 

This way, you can fix unusual behavior, so they don’t have to encounter it at all. 

To fully manage your testing properly, we recommend powerful tools such as Shake

These tools have effective crash-reporting features that help to keep track of your app’s issues in real-time and also fix bugs automatically.

3. Errors and Exception Handling

Considering how complicated mobile development can be, certain errors or exceptions are bound to occur. Regardless of how rigorous your testing cycles may have been, a memory issue, network condition, or sudden API change may sometimes go undetected. 

In such conditions, only effective error and exception handling can prevent a crash.

In general, an exception is a type of object that can be introduced in certain cases when an app’s calling code encounters an error condition. 

The exception object then alters the execution flow of your application’s code. However, exceptions are also well known for causing invalid application states, leading to app crashes.

To counter this, both iOS (Objective-C) and Android (Java) have dedicated exception handling mechanisms or frameworks. 

Exception handlers use a well-defined hierarchy to ensure that your app is prepared when a process falls into an exception path. 

When done properly, they ensure that your app processes don’t terminate, causing the app to crash.

As a mobile development best practice, handling exceptions as they occur may not be enough. 

Therefore, try using existing exception history and test environment responses to envisage and prevent future errors and exceptions. 

One of the most interesting tools we’ve found for taking care of this is New Relic Mobile.

4. Excessive Code

If you’re yet to consider it, another reason why your app may be less than stable is that you’re writing too much code. 

One thing is certain—more code doesn’t always equate better code or better functionality. 

The best approach to writing code is to keep it minimal. In most cases, the more code you have, the more bugs you’ll have to deal with.

Stripping your app of excessive code may be one of your best efforts towards keeping it crash-free. 

Here are some certain areas you should focus on when looking to keep your code as light as possible:

  • Functionality: Your priority as a developer is to deliver a reliable and functional application. And in most circumstances, functional programming keeps the addition of dependencies to the bare minimum. While dependencies aren’t bad, any error in the chain causes a series-circuit effect. This impacts the modularity of your code negatively.

  • Nomenclature: Names are a very important element of your code that you need to optimize at all times. Long names with dispensable descriptions simply make unnecessary code, while too-short acronyms make things difficult for future developers.

  • Duplication: Another easy way to keep your code light is to avoid repetition. If you recognize a pattern in your code, the same thing may exist somewhere in another class, function, or method. In such circumstances, you want to restructure your code to account for stable execution and the growth of the codebase. This is called refactoring.

  • Code privacy: Though it’s a fast and easy approach, there are good reasons why you shouldn’t always make your code public. When your code is a global state, it becomes easily accessible. This often means you may have to deal with unforeseen changes from external parties.

If you’re looking to keep your app as crash-free as possible, clean, functional code should always be a priority.

5. Device Incompatibility

Your app may also be crashing on a user’s device because it’s not compatible with that device. 

As a mobile developer, one of the major difficulties you’ll have to deal with is the fact that you’re building apps to run in environments that may be out of your control. 

Unfortunately, Android devices complicate this problem even further.

In contrast to the iOS development space, where everything is strictly controlled by Apple, Android working environments are far less predictable. 

Fragmentation has always been a major challenge of the Android world and developers seem to always end up on the receiving end.

As far back as 2015, there were over 24,000 unique Android devices in use worldwide. 

Besides the highly fragmented hardware from several manufacturers, you’ll still have to deal with different OS versions. 

Considering that Android devices account for 71.81% of the mobile market share, it’s imperative that you optimize your app for them.

The truth is, keeping up with all the device and OS versions may be quite unrealistic. 

However, Google recommends supporting at least 90% of all live devices and targeting the latest OS version. 

Embedding the Android Support Library into your app can also help you support multiple API versions without any unnecessary code.

6. Network Issues

For quite obvious reasons, cloud computing has experienced wide adoption in recent years. The mobile development space has hopped onto this trend as well. 

However, these continuous interactions with cloud services have also exposed iOS and Android apps to another vulnerability—network problems.

Network issues are such a major factor in software stability that they now account for 20% of all mobile app crashes

That’s quite a staggering figure! 

These network management issues arise when your app is trying to access data over a network or from other third-party services. 

In such cases, if network access is unstable, the app can easily terminate while waiting for a response.

Changes in the network (from 3G to 4G or losing reception in remote areas) may also be responsible for these issues. It could also be related to the network bandwidth your app is built to handle.

If the issue is temporary and beyond your control, you may want to offer the user an offline version of the app. 

Alternatively, you could also redirect them to a particular line of action that may be of interest. 

For apps such as Instagram or Twitter that rely entirely on an internet connection, the only way out may be to display the most recently loaded version of the app.

7. Software Development Lifecycle

Poor management of your application’s lifecycle events is another common crash trigger in mobile apps. 

An app’s basic lifecycle often consists of events and activities that are arranged in a particular hierarchy or sequence between the time an activity is launched and when it’s shut down.

These events may be tagged with callbacks such as ‘onCreate()’, ‘onPause()’, and ‘onDestroy()’

At each step of the way, there are stage-specific issues that could compromise the stability of your app.

However, Mobile Application Lifecycle Management (MALM) issues generally fall into one or more of these categories: security, privacy, and compliance. 

From experience, it’s become evident that the key to solving these problems is to define the proper hierarchy of these lifecycle events and react appropriately to any potential issues related to them.

To achieve this, you’ll need to track the key application states using flags that leave no room for assumption. 

These flags help the application to ascertain that certain key events have been completed. 

Once the present flag is checked and ascertained as true, only then can your app proceed to the next event in the sequence.

Some signs of badly managed app lifecycles include heavy consumption of resources even when the app is inactive, crashes due to app switch, or loss of user’s progress while changing display orientation.

8. Database Contention

In the course of your app processes and activities, your app is always requesting to use shared database resources. 

These resources could be storage, processing memory, or network. In certain scenarios, the demand for these shared resources may exceed the supply. This leads to database or resource contention.

When multiple requests for the same database resource hit the database simultaneously, one request gains access while the others queue up behind. 

As a result, the app can only execute limited work on the user’s end, causing poor performance. In extreme cases, the app crashes completely.

 

Database contention issues are pretty notorious for being highly technical and hard to identify and resolve.

Oftentimes, they appear to be fixed only to resurface when there’s a high demand for performance. The first step to resolving this type of issue is to identify it as contention-related while troubleshooting.

However, there is a major setback.

With the increased adoption of cloud technology and virtual environments, contention issues have become even harder to track. 

Resource contention can now occur at various stages and in multiple dynamic environments. 

Nevertheless, once you identify the competing transactions or processes, you need to prioritize them and grant access based on business considerations.

9. Errors Due to Agile Methodology

This risk factor may seem unlikely, but it remains one of the causes of app instability you need to bear in mind. 

The Agile approach to development has become the gold standard in the mobile space. 

However, the methodology’s obvious peculiarities—speed and incremental improvements—set up mobile apps to be prone to crashing.

Agile’s underlying architecture focuses on delivering new product features and updates in small increments at regular intervals. 

This approach is ideal for incorporating user feedback and offering your customers the latest technologies and business innovations. 

Conversely, this also comes with its disadvantages from a technical perspective.

With incremental deliveries, you often have to deal with compatibility issues, poor resource planning, inadequate documentation, and indefinite improvement rounds. 

Among these disadvantages, compatibility remains the most critical to performance.

At its initial stages, a feature or OS release is often either unstable or incompatible with the device hardware.

Even when the new OS is well-optimized and stable, the user may be slow to update the app. This can also lead to app crashes. 

Additionally, third-party services integrated to enhance performance and deliver certain features may present their technical bottlenecks as well.

10. Poor Front-End Optimization

When it comes to app crashes, one area of concern that is often overlooked is the front end. 

While the majority of your app’s performance vulnerabilities are mostly on the back end, an unoptimized front end caused by certain bad practices can also be responsible for your app’s instability.

The most common front-end mistake that impacts app performance critically is poor media optimization.

When adding media content to your app, you may easily overlook the file sizes, especially if it loads seamlessly in your local environment. 

However, considering that bandwidth usage is limited, the app performance will take a significant hit if the content is not optimized.

Fortunately, with the right image optimization tools, you can ensure that your users don’t face performance challenges and bandwidth issues while loading your app screens.

We’ll talk more about these bandwidth constraints while discussing the last reason.

Other common front-end bad practices include incorporating inline styles, including redundant styles in your code, and superfluous use of child elements. 

While these errors may not cause your app to crash directly, they impact customer satisfaction negatively.

11. Bandwidth Constraints

Though there are pockets of other root causes of app crashes, the last one we want to mention in this article is related to how your app connects to the mobile network. 

Each time an app accesses the mobile network in the background, it also requests other system resources such as the CPU and radio.

If these requests are sent repeatedly or excessively, bandwidth constraints are often triggered. In mild cases, this drains the device’s battery quickly.

In more severe circumstances, bandwidth constraints cause the app to crash completely.

It’s therefore important to track whether or not your app is making excessive use of the network while active in the background.

On Android, Android vitals can provide all the utility you need here. 

As a way of improving your app’s performance, Android vitals will alert you via the Play Console when it considers background network usage excessive. 

For even more insight on mobile network usage, apps such as Battery Historian help you understand your app’s network usage behavior even better.

Some Best Practices For Avoiding Crashes

While discussing the probable reasons why you’re experiencing the issues described above, we also talked about how to troubleshoot them. 

However, an even better approach is to incorporate some universal strategies that ensure your apps enjoy optimum stability.

If you’re looking to improve the performance of your apps, then you should consider these three tips:

  • Use Error Monitoring Software. This is a great tip for staying ahead of the game. These software tools monitor your app and collate all the data you need to identify, anticipate, and resolve application problems. We’ll recommend some in the next section.

  • Track all performance metrics possible. Monitoring tools already do a great job keeping an eye on your app’s error rates, but you may want to do more by looking at other metrics such as slow pages, CPU usage, and request rates. These metrics often expose loopholes that later result in crashes.

  • Keep testing. We’ve previously identified inadequate testing as one of the causes of app crashes. Though seemingly far-fetched, the end goal of your testing should be to get your crash rate to 0%. So, whether it’s server tests, local devices, or network tests, make sure to fire on all cylinders even after deployment.

Being proactive about your app’s stability and overall health will benefit you and your customer base tremendously.

App Monitoring Tools to Prevent App Crashing

For mobile app owners and developers, getting one or multiple Application Performance Monitoring (APM) tools is simply a no-brainer. 

These tools help you proactively track several performance metrics intelligently and protect your mobile project from failure. 

The APM provider space is so well established that finding the right vendor often poses a challenge.

One tool we’ve found useful is AppDynamics. The tool’s uniqueness is mostly related to how much power and efficiency it brings to the app monitoring space. 

Among other features, AppDynamics is capable of offering real-time insight into all your app processes and every line of code in dynamic multi-cloud environments.

Datadog also comes behind very closely with its clear and extensive visualization of performance data. 

The customizable dashboard offers a personalized system of tracking high-priority metrics based on your most important business needs. 

For projects with an emphasis on network monitoring, then AppNeta Performance Manager is the tool to use.

Other APM tools worthy of mention include New Relic, BMC TrueSight App Visibility, and Stackify Retrace.

Conclusion

A mobile app that crashes frequently is a bottleneck even the most loyal customers will rarely tolerate. 

Beyond losing a substantial fraction of your user base, these issues will eventually get you into a lot of business trouble. 

It’s therefore imperative to approach crashes proactively rather than reactively.

Poor memory management remains one of the most prevalent root causes of mobile app crashes. 

An app that consistently sucks up memory (whether due to poorly configured cache usage or retain cycles) is bound to be unstable. 

Your app can also be vulnerable as a result of ineffective exception handling, hardware incompatibility, and inadequate testing.

In all, we’ve discussed 11 common reasons in this article and also pointed out tips and tools for optimizing your app’s stability. 

We hope these resources help you deliver your app users that optimum customer experience.