Hi!
My app needs to be active for several hours running videos and other content.
The problem that randomly, in 30 minutes or in 5 hours, it froze and the ADB did not tell me the reason, the ADB also froze.
With a lot of cost and via logcat, testing on Amazon Fire Stick with 1gb of ram, maybe I found the reason: Low Memory Killer.
My app, via Scout and after thousands of optimizations, uses, even after 5 hours of use, less than 40mb of memory, rarely peaks because it needs to do something, but I clear the memory as soon as possible.
Through the LOGCAT log, the low memory killer informs me that my app is not using as much memory, but it still kills my app. (the important part of the log is below)
And the problem doesn't just occur on this device, it's occurring on several different devices.
The question is, because of several Android processes, even mine saying that it is using less than 100mb of memory by the system, why is it that needs to be sacrificed?
A game nowadays easily uses more than 100mb of memory ...
But I found something that I didn't understand:
"Optimizing Adobe AIR for Code Execution, Memory and Rendering"
In that article, there is a part on page 15 that says this:
"Memory fragmentation is pretty severe in AIR:
- Objects may garbage collect, but memory page won’t be released back to system
- You can’t rely on ever getting back to slim memory profile after extended application use. "
That is, an app after a long time in use, even if it is well optimized, will the memory only increase? Will free memory never be returned to the system? Is that why Android is killing my app?
Sorry, I am not an expert in AIR, every day learning more, I thank you for your attention.
Important part of the log: (package name : MYAPPUID)
PASTEBIN LOG