Closed opusforlife2 closed 5 months ago
Interesting: Since Android 8.0, apps are only allowed to create services while the app is in foreground (or: create a foreground service (-> notification)): https://developer.android.com/about/versions/oreo/background
It's pretty strange that this happens while FullPlaybackActivity.onStart()
is called since the app is about to come into the foreground.
Did you have this issue since forever or did it only start recently?
I think it might have started in this or the previous version. I'm not sure, sorry.
I tried to reproduce this today on an Android 10 device, but was unable to:
I tried to:
am stopservice ch.blinkenlights.android.vanilla/.PlaybackService
via ADB which would kill the playback service immediately (and be restarted next time the app is launched)-> No crash, tried about 20 times :-/
How consistent can you reproduce the issue? Maybe we could catch the exception and fire off a worker thread which would try to create the activity once the app is fully launched.
It's not consistent, as I've said. I've speculated on what might trigger it, but I can't reproduce it at will.
I can install a debug APK to test solutions out, if you want.
Got the crash again. One line is slightly different this time:
java.lang.IllegalStateException: Not allowed to start service Intent { cmp=ch.blinkenlights.android.vanilla/.PlaybackService }: app is in background uid UidRecord{a02f111 u0a175 CAC bg:+12m39s511ms idle change:cached procs:1 seq(0,0,0)}
Edit: Another:
java.lang.IllegalStateException: Not allowed to start service Intent { cmp=ch.blinkenlights.android.vanilla/.PlaybackService }: app is in background uid UidRecord{f00b293 u0a175 TPSL bg:+2m37s516ms idle change:cached procs:1 seq(0,0,0)}
Another thing I noticed:
This time I encountered the crash when my car Bluetooth connected and the phone tried to resume playing audio in Vanilla (since it was the last used media app). The error message was the same, so I didn't bother keeping the crash log.
Got a pretty quick crash this time. The time between going away from Vanilla and coming back must have been less than a minute.
It's the same crash as all the ones above.
Closing as I haven't encountered this for a long time.
[x]
):Steps to reproduce the issue
Play some music in Vanilla. Then pause it/let it be paused by another media app. Do something else for a while. Come back to Vanilla. Crash.
This behavious is not consistent, though. Sometimes it crashes, but other times it resumes just fine. Probably, a longer period away from the app would make it more likely to encounter a crash.
Logs