Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-32563

Qt Creator kills all Android processes from package when main process exits

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • Qt Creator 15.0.1
    • Android Support
    • None
    • Android

    Description

      Context : Android application with a Foreground Service running in a separate process, both packaged in the same APK. The service auto-exits when it has finished its tasks.

       

      Expected behaviour : After deploying & running the app from Qt Creator, when the main app exits (eg. when the user kills it), the service should continue running.

       

      Actual behaviour : After deplying & running the app from Qt Creator, when the main app exits, all processes from the same package (ie. the service) are instantly killed by a process .

      This is a recent modification (not sure when it was introduced, though), because I used to be able to watch logs from the service (in logcat, not in Qt Creator) after the app had exited.

      If I start the app directly on the device (once it has been deployed by Qt Creator, but not run from it), the service behaves correctly.

      When the app is run from Qt Creator, the logs show that once the main app exits, some other process (obviously linked to Qt Creator, since this only happens when the app is run from it) kills everything in the package. The last two lines of the (curated) logs attached to the report show that a process (12538) launched after both MyApp (11374) and MyService (12377) forces stopping the whole package. No other mention of 12538 in the logs, I strongly suspect an on-device shell command automatically launched by Qt Creator when the main app exits.

       

      Expected correction : Don't force-kill anything when the app currently attached to Qt Creator exits. In other words, please restore the old behaviour which allowed us to debug foreground services even when the main app has exited.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            portale Alessandro Portale
            iruau iruau logic
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes