Skip to main content
Answered

17.1.2 iOS SDK Memory leak and app crashes.

  • 17 July 2024
  • 1 reply
  • 43 views

Our mobile development team has identified a significant memory leak in the latest iOS Intercom SDK 17.1.2. This is causing app crashes for many users.

Observations:

  • Memory Usage: Before integrating Intercom, our app uses ~50MB of RAM. After integration, RAM usage exceeds 200MB, primarily allocated by the SDK.

     Maybe this post can be relevant: 

     

  • Performance Issues: The app experiences periodic CPU and IO spikes, leading to further slowdowns. iOS may terminate the app if CPU usage exceeds 50% for over 180 seconds.

  • A way to cause a Crash: Interrupting an image upload, retrying, and repeating reliably crashes the SDK.

  • Memory Profiling Suggestion: The SDK significantly increases RAM usage with chat usage, especially with image handling. Profiling suggests the decodedImageUsingGraphicsImageRendererRefWithCGImageRef function consumes substantial memory.

  • Photo handling: The SDK renders images poorly, seemingly sending them at their full file size without any optimization. This is a massive waste of resources.

Steps to Reproduce memory leaks:

  1. Integrate the Intercom SDK into an app.

  2. Monitor memory usage before and after integration.

  3. Conduct multiple image uploads, interruptions, and retries.

  4. Fill a chat with large photos from a Pro Max device and measure memory usage.

Additionally, if our users grant full access to their own gallery, during these crashes, the intercomSDK also can deletes certain content from their devices.

If affected devices are those with weak batteries that heat up quickly, and as a result, the OS immediately terminates everything.
 

 


Please address these issues urgently. Thank you.

1 reply

Userlevel 3
Badge +5

Hi Adam Sinka, It’s Mat from the Support Engineering Team 😀

First, I noticed that you’ve posted the same message 3 times where one is more than enough.

I’ve created an Intercom conversation for you to flag this issue to our engineers and conduct a thorough investigation.

Please continue this thread there.

Reply