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

Android apps don't start in low memory situations

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

Artem gravatar image

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

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

Comments

Yep - noticed that behaviour, too ....

Manankanchu ( 2013-12-29 14:30:29 +0200 )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 +0200 )edit

I have seen that too.

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

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 +0200 )edit
3

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 +0200 )edit

2 Answers

Sort by » oldest newest most voted
6

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

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

Comments

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 +0200 )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 +0200 )edit
0

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

simo gravatar image

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

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

Follow
7 followers

Stats

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

Seen: 1,959 times

Last updated: Dec 20 '14