We have moved to a new Sailfish OS Forum. Please start new discussions there.

Android apps don't start in low memory situations

asked 2013-12-29 13:54:11 +0300

Artem gravatar image

updated 2013-12-29 19:25:34 +0300

Quite often I try starting Instagram, it sort of starts, shows its screen and a top feed element sometimes and then crashes. And again and again. Then I go to task manager kill normal Sailfish apps and Instagram starts fine.

That makes be speculate that Dalvik asks host system for memory dynamically and if there is no memory available, well, you are out of luck. Problem is that it happens often and apparently Sailfish is not able to put other running apps to swap [fast enough].

Is it a bug, feature, lack of feature? - I don't know. Needs to be fixed anyway :)

edit retag flag offensive close delete


Yep - noticed that behaviour, too ....

Manankanchu ( 2013-12-29 14:30:29 +0300 )edit

All Dalvik apps seem to do that, as far as I've tried. Usually it's enough to quit the browser in Sailfish.

jsiren ( 2013-12-29 15:39:31 +0300 )edit

I have seen that too.

ortylp ( 2013-12-29 19:24:47 +0300 )edit

At least Dalvik should tell you why it shut down the Android app. Just closing it doesn't give a good user experience.

pycage ( 2013-12-30 15:45:37 +0300 )edit

This is big problem for ordinary users, because they don't understant why Android apps don't work.

pazix ( 2013-12-30 17:09:19 +0300 )edit

2 Answers

Sort by » oldest newest most voted

answered 2014-01-04 21:52:16 +0300

It's a bug/architectural problem that can be fixed.

For some technical details, I can recommend reading:

http://www.it.iitb.ac.in/arndg/dokuwiki/images/f/f4/113050076_Rajesh_Prodduturi_Stage-01_report_8_113050076_stage01.pdf - chapter 3/4/5

It explains quite well the manner that Dalvik is managing memory. There's a bit of a clash of what the runtime does and evaluates situations before launching a new app, and how we want to do memory handling/application lifecycle.

The rough memory model we'd like to get to is that the base system processes are practically unkillable/constantly in memory and then applications in order of last recently used have priorities of if they might get killed. Because of the way we have the UI, this is something that is possible to map in your mind as well - that when you haven't used applications in a very long while, they might shut down.

But we don't really have support for getting signalled that you are on death row in the application framework/Silica just yet. Ideally we'd communicate to Dalvik to follow similar approach - and it'd be more obvious if Android applications had a cover each.

edit flag offensive delete publish link more


But we don't really have support for getting signalled that you are on death row

I give you a vote for that quote!

Without me reading chapters 3-5 is there an easy answer for whether it's possible to get a signal back from Dalvik if it's close to memory exhaustion?

A notification would be a big step in the user experience. Even though I haven't even tried running more than one android app, so I haven't experienced it myself :)

Tanghus ( 2014-01-05 03:54:31 +0300 )edit

Yes, but.. Killing both Android and native apps in low me situation is important, but shouldn't Sailfish also be able to swap some apps to disk? Possibly letting app keep minimal code running for cover. Inability to have both Browser and Instagram/Facebook running sort'a kills the multitasking idea.

Artem ( 2014-01-06 16:06:25 +0300 )edit

answered 2014-12-20 12:37:34 +0300

simo gravatar image

updated 2014-12-20 12:38:06 +0300

Swapping other processes was improved with Sailfish OS update 10, and Android apps seems to launch better and also stay on a cover when launching more apps. Solved?

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools



Asked: 2013-12-29 13:54:11 +0300

Seen: 1,889 times

Last updated: Dec 20 '14