Closed aureq closed 6 months ago
From the logcat you provided, it seems that the problem is in the background start of the service responsible for restoring the timeout when battery is low and/or screen is turned off. Prior to version 1.16.1, it was possible to use the feature without exempting the app from battery optimization, but it is now mandatory, as the the service sometimes started and sometimes not when the exemption was not granted. The user is, however, confronted with the requirement only when enabling/disabling the functions, so existing users are able to use the function without battery optimizations ignored, unless they make changes in the app itself. Therefore, exempt the app from battery optimizations and tell me if this fixes the issue.
P.S. Thanks for the logcat 🙂
Thanks a lot for the explanation @elastic-rock
I've manually set the setting as your recommended and so far no reboot. I will keep you posted over the next few days whether or not I see another crash.
Ok, so after giving it a few days, the app is still randomly crashing.
The KeepScreenOn app shows the tile is correctly installed and all the permissions have been granted correctly.
The 1st occurrence below occurred when I switch back to my main Android user, the second, about an hour later occurred after browsing for a while.
It seems the app crashes because it calls setLabel()
without knowing the Tile
object for which it should do so. However, I have no idea why this is the case, because it should take the Tile
object from the TileService()
class. Additionally, this is not a problem on my Pixel running the stock os. It might be a GrapheneOS thing, idk. If you haven't tried reinstalling the app, try so, but I fear that won't help anything. 🙁
Ah! Interesting. I'm running multiple Androind profiles on my phone (as a way to separate some apps). The app tends to crash more often when coming back to the profile where the app is installed.
I've deployed the latest f-droid update this morning. Would you like me to keep updating this issue if I see new crashes?
I think you do not need to post new logcats if you encounter crashes. I will try to get Graphene OS up and running in the emulator to hopefully reproduce the crashes.
I've tested it on grapheneos but no crashes occur to me
@elastic-rock The issue occurs only when switching user profiles. If you only use a single profile, then everything works as expected.
I'm running on the latest version of GrapheneOS and the latest version of KeepScreenOn (via f-droid). When I unlock my phone, KeepScreenOn keeps crashing and below is the exception that's generated. I've also attached the
logcat
in hope this might help Keep Screen On log 53aeee890cf9.txt.Let me know if you need further information or tests on my end.