• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
UBports Robot Logo UBports Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

App suspend behavour

Scheduled Pinned Locked Moved OS
14 Posts 6 Posters 1.7k Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D Offline
      dobey @Lakotaubp
      last edited by 31 Oct 2018, 17:48

      @lakotaubp Though, if the complaint is about "flawless" switching, I pretty strongly suspect it's not the app suspension that's the issue.

      L 1 Reply Last reply 31 Oct 2018, 18:13 Reply Quote 0
      • L Offline
        Lakotaubp @dobey
        last edited by 31 Oct 2018, 18:13

        @dobey You may well be right. Just thought it worth a mention it all helps

        G 1 Reply Last reply 31 Oct 2018, 20:43 Reply Quote 0
        • G Offline
          guru @Lakotaubp
          last edited by 31 Oct 2018, 20:43

          In this context: When you start in the terminal-app any process, as test you can use sleep 600, and you swipe to some other app or suspend the phone, this process receives SIGSTOP. Why?

          D 1 Reply Last reply 31 Oct 2018, 21:42 Reply Quote 0
          • D Offline
            dobey @guru
            last edited by 31 Oct 2018, 21:42

            @guru Because Terminal app is bound by the application lifecycle policy, and thus so is any child process of the Terminal app. When an app is placed in the background it is sent SIGSTOP after a few seconds, and when brought back to foreground, is sent SIGCONT.

            However, the special case of the Terminal (as you run CLI tools inside it) is different from apps that do not have user-directed child processes. It's also not something which would itself cause the presumed issues from the OP here.

            1 Reply Last reply Reply Quote 0
            • D Offline
              doniks @htc_tattoo
              last edited by 1 Nov 2018, 05:42

              @htc_tattoo one thing I struggled with multitasking on ut was about background tasks being killed and having to restart when I switch back to them. For example switching between browser and email to check something while writing the mail. this https://forum.xda-developers.com/ubuntu-touch/help/stopping-ut-killing-apps-t3424764 is my workaround for that. Im not sure this is the best solution, especially for the lifetime of my storage, but so far it works for me

              D 1 Reply Last reply 1 Nov 2018, 16:35 Reply Quote 0
              • D Offline
                dobey @doniks
                last edited by 1 Nov 2018, 16:35

                @doniks The best solution would be to fix memory usage and similar issues, across the board. Are there open issues for these cases? The best start to a solution, is to first document the problem. Then we can fix bugs and optimize code to perform better on lower end devices.

                D 1 Reply Last reply 1 Nov 2018, 16:50 Reply Quote 1
                • D Offline
                  doniks @dobey
                  last edited by 1 Nov 2018, 16:50

                  @dobey I agree. It's just that I didn't actually hear many people talk about this. Then I wasn't sure whether maybe it's Nexus 7 specific, and then the 'deb' was never really supported by anyone, and I don't have the impression that I can make a very crisp root cause analysis and it's probably quite intertwined and .... ok, I could also stop making excuses and just check the bugtracker and write an issue as best as I can ... let me try that instead 😛

                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    doniks
                    last edited by doniks 11 Jan 2018, 17:24 1 Nov 2018, 17:13

                    Ah, but seriously: I remember now one of my thoughts, which actually kept me from writing the issue: I'm not sure whether I have an issue about memory consumption. I don't even really have an issue about the killing of background apps.

                    Functionally, what I care about is: I want to switch back and forth between browser and email client. I want to do this repeatedly and step by step write an email while looking up things in the browser. Or vice versa: I want to write a forum post, while I repeatedly refer back to some emails, or maybe an attachment there.

                    I am sure that with the current installation, this workflow doesn't work out of the box, because the background apps are killed, which in turn is because I'm running out of memory.

                    I could imagine that a waste of memory is at fault. That might be the OS, or any of my open apps.

                    Or it could be that we are doing the best with the memory, but there just ain't enough memory. And actually the apps should do a better job of saving their state (which email draft were you working on, what is the scroll position that you where at, where was the cursor positioned, what was the qml page stack underneath you). But maybe the toolkit needs to actually support such "rich state saving". And maybe the OS needs to do a better job at restarting apps faster and having a higher resolution screenshot stored such that the time-to-restart is covered a little better.

                    Or it could be that we simply don't want to bother supporting devices with less than X memory, so it's a wontfix.

                    So, there we go, practical question: Do I raise the functional issue "Bad user experience switching between browser and email client", or do I raise the technical issue: "No fluent multitasking due to high memory consumption" ?

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      dobey
                      last edited by 1 Nov 2018, 19:00

                      @doniks said in App suspend behavour:

                      So, there we go, practical question: Do I raise the functional issue "Bad user experience switching between browser and email client", or do I raise the technical issue: "No fluent multitasking due to high memory consumption" ?

                      Well, the issue is with only those two apps open, one will get killed due to memory, right? That is an issue, or rather, probably multiple issues. I can tell you for certain we are not doing the beset with the memory. There are many optimizations that could be made across the system, and in apps. If I understand correctly how Dekko is implemented, there is almost certainly many places it could be improved.

                      As for the second part, it's probably more directly in apps. Even if apps get killed, they really need to handle saving state properly when they get paused as you move them into background, and restoring properly when starting in the event they did get killed. Session management is a feature that most app devs tend to traditionally not implement, simply because they think it's too hard, and they don't think it's necessary on traditional systems (despite it being a possible feature for decades). I'm not sure how much easier we can make it to implement, from a toolkit/SDK perspective though. That's something I'll have to think about a bit more.

                      1 Reply Last reply Reply Quote 0
                      • H Offline
                        htc_tattoo
                        last edited by 2 Nov 2018, 06:34

                        I tried to find a pattern to reproduce this issue. But there is none. The best way is to restart the phone, open the browser + uapp-explorer+youtube-app. Load something and begin switching. Mostly it works in the actual RC channel well, then something starts hanging which makes the browser restart and reload the startpage.
                        Same thing happens with browser+N5-camera that crashes. Email i didnt test since dekko2 has problems.
                        I also saw with systemsettings., but not often.
                        Could be an out of memory issue, but i could not trigger it...

                        1 Reply Last reply Reply Quote 0
                        • L Offline
                          L-00117 Banned @htc_tattoo
                          last edited by 30 Nov 2018, 16:09

                          This post is deleted!
                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post