I have an application built using Cordova 7.x/AngularJS 1.x which has some functionality to take a picture using the camera - this all seems to work on my new Android device (less than 12 months old) but on older devices such as Galaxy Note 4 & Galaxy S5 it seems to struggle after a few minutes of usage and close the app.
I have viewed the android abd logcat and can see the following :-
17:42:28.731 16736-16915/com.abc.abc.123 A/chromium: [FATAL:memory.cc(19)] Out of memory. size=63492096
17:42:28.731 16736-16915/com.abc.abc.123 A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 16915 (CompositorTileW)
17:42:29.951 16736-16736/com.abc.abc.123 I/Choreographer: Skipped 70 frames! The application may be doing too much work on its main thread.*
Clearly the out of memory is an obvious problem but as I am using the ng-file-upload Angular plugin to upload the photo from the camera it uses whatever the current camera settings are. For instance, a lot of users won't change their camera settings which by default are usually the highest (e.g 16M 5312x2988) - if I drop these settings in the camera application the crashing seems to stop (or at least much less frequent?)
I have tried the Android Studio Monitor to gauge the status of the phone before and after it crashes and I do not see any obvious issues with the memory usage in the Android Monitor.
What are the next steps to debug an application that crashes 'semi-regularly' in this manner?
-- Error in adb logcat isn't always exactly the same either --
A/libc: Fatal signal 4 (SIGILL), code 1, fault addr 0x9cef1e96 in tid 21795 (Chrome_InProcRe)
There seems to be a lot of high GPU & CPU spikes

