Mobile App Heap Size Issue – Investigation & Support Request

We are experiencing an OutOfMemoryError in the SugarCRM mobile application, which appears to be related to the heap size allocation on certain devices. It is happening on certain events like page refresh, Menu item click after login etc.

 

Following SDK version we used for customizations

45.0.657-1.4.2

 

Quick Fix

Configuration added to AndroidManifest.xml<application android:largeHeap="true" ... />

 

Impact:

Causes app crash, interrupting user workflows.

Affects specific devices more frequently, likely due to OS and hardware configuration.

Request:

Please advise on:

Any way to reduce heap size

Recommended heap size settings for SugarCRM mobile builds.

Any known SDK or configuration changes required to handle high-memory operations.

Possible workarounds to avoid crashes until a permanent fix is implemented.

Parents
  • The nature of your error most likely points to fact that your customization causes very high memory demand from application. 
    To avoid such problems you should inspect your customization carefully to identify and fix following possible causes:

    • Large Datasets in Memory: Loading a massive amount of data from an API and storing it all in a JavaScript array without pagination.

    • DOM Leaks: Continuously adding elements to the DOM without ever removing them. This is a classic memory leak in Single Page Applications (SPAs).

    • Inefficient Caching: Storing large images (e.g., as base64 strings) or complex objects in localStorage or in-memory variables.

    • Third-Party Libraries: A poorly written or buggy third-party JavaScript library can have its own memory leaks.

    • Complex UI Frameworks: Heavy use of complex components and deep component trees in frameworks like Angular or React can increase memory pressure.

    I don't think there is anything extra you can do other than optimising your code to avoid abnormal JS heap usage

Reply
  • The nature of your error most likely points to fact that your customization causes very high memory demand from application. 
    To avoid such problems you should inspect your customization carefully to identify and fix following possible causes:

    • Large Datasets in Memory: Loading a massive amount of data from an API and storing it all in a JavaScript array without pagination.

    • DOM Leaks: Continuously adding elements to the DOM without ever removing them. This is a classic memory leak in Single Page Applications (SPAs).

    • Inefficient Caching: Storing large images (e.g., as base64 strings) or complex objects in localStorage or in-memory variables.

    • Third-Party Libraries: A poorly written or buggy third-party JavaScript library can have its own memory leaks.

    • Complex UI Frameworks: Heavy use of complex components and deep component trees in frameworks like Angular or React can increase memory pressure.

    I don't think there is anything extra you can do other than optimising your code to avoid abnormal JS heap usage

Children
No Data