How to figure out what's killing Android app after about a minute?
timday last edited by timday
I have an old Android app built in Qt5.7 (QQuickView, QML plus some custom C++ & OpenGL components).
It works great on the HW it originally a targeted - a Galaxy Tab S2 (now up to OS 7.0) - but on a Galaxy Tab S4 (OS 8.1.0) something kills it after on the order of thirty seconds to a minute of starting it up, whether I'm actively using it or just letting it sit on its own "front page" doing absolutely nothing. There's nothing obvious (to me) in the logging (from the app's own qInfo() logging or in all the system spew) which informs me why it might have been shut down... but then I have to admit most of the Android logging is opaque to me and I've no idea what to look for or what most of it is.
A quick test on an OS 9 phone showed a similar issue there, so now I am slightly worried this is something which will affect all devices with OS8 or later... need to do some more testing though.
App has been more widely tested on iPads (works great on everything we've tried it on). On Android, in the early days we had some issues with rcc files being too big to be reliably memory mapped but this isn't that.
Any ideas what might have changed in the Android OS that Qt5.7 didn't anticipate and/or any pointers what to look for in the logs to understand why the system has decided to kill it? (Googling led to QTBUG-56648, but that's about services rather than apps, I think. I do wonder if more aggressive power management is something to do with it though).
Raad last edited by
That might be silly to ask but have you tried deploying and debugging your app while running on the phone to see exactly which part of your code cause the crash and what is the exact error?
timday last edited by
Ooops I should have added that I don't actually have any Android HW other than the OS7 Galaxy Tab S2 mentioned... all the other testing has been via AWS's "Device Farm" which lets you upload an apk and interact with it (or automated fuzz-test it) and capture videos/screenshots/logs... but not actually debug it!
Have been away from this issue for a couple of weeks but about to start looking at it again. Might indeed be easiest to just get hold of some more recent Android HW though!