[Interest] Android: can QCoreApplication::exec() be terminated unexpectedly?

Dmitriy Purgin dpurgin at gmail.com
Sat Nov 30 14:16:45 CET 2019


 Hi Alexander,

I'm not an Android expert nor have I written a Qt/Android application other
than small demos but what I remember from Java/Android application
lifecycle, an application consists of "activities" that may be
paused/unloaded/terminated by the operating system at any time due to
various reasons [1]. In a Java application, you get to override the
corresponding methods that the OS calls when a lifecycle event occurs, and
it is the programmer's responsibility to save and restore the state of the
application.

Maybe this is what's happening in your Qt application as well? Just a guess.

[1]
https://developer.android.com/guide/components/activities/intro-activities

Cheers
Dmitriy

On Sat, Nov 30, 2019 at 1:36 PM Alexander Dyagilev <alervdvcw at gmail.com>
wrote:

> Hello,
>
> It seems that my app "suffers" from unexpected terminating of
> QCoreApplication::exec() event loop processing.
>
> I was always thinking that QCoreApplication::exec() terminates only if
> one calls QCoreApplication::quit().
>
> But under Android it seems that either QCoreApplication::quit() is
> somehow called by Qt itself (i.e. not by my code), or it's terminated
> due to an unknown (for me) reason.
>
> I use QApplication for main activity process and QAndroidService for
> service process. Don't know exactly inside what process this occurs.
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20191130/10389374/attachment.html>


More information about the Interest mailing list