gateship-one / odyssey

Odyssey music player
GNU General Public License v3.0
235 stars 39 forks source link

Playback stops unexpectedly when resumed via Bluetooth headset #180

Open relan opened 5 years ago

relan commented 5 years ago

I experience an issue similar to #171 on Android 9.0.0 with Odyssey 1.1.17. My use case:

  1. Start playback via a Bluetooth headset.
  2. Pause playback using a headset button.
  3. Wait for a few minutes.
  4. Resume playback with a headset button.
  5. Music plays for several seconds and then suddenly stops.

Logcat indicates it's a background execution limitation:

E ActivityManager: ANR in org.gateshipone.odyssey:serviceProcess
E ActivityManager: PID: 26979
E ActivityManager: Reason: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{e5ab7f6 u0 org.gateshipone.odyssey/.playbackservice.PlaybackService}
...
I ActivityManager: Killing 26979:org.gateshipone.odyssey:serviceProcess/u0a90 (adj 900): bg anr

Let me know if you need more info.

gnome17 commented 5 years ago

Hi, thanks for reporting this. We were never able to reproduce something similar to what you describe. If you don't mind you could test the APK attached. Hopefully this should resolve your issue. Otherwise please add a full logcat output if possible and also information about the device that you are using.

Please note that the APK is signed with the same signings like in the google play store. So if you are using the FDroid version you have to reinstall Odyssey.

odyssey_anr_test_1.zip

relan commented 5 years ago

Installed, will report in a couple of days. Could you push the changes you made into a branch? If they don't help, I'll be able to experiment myself.

The device is an LG V30+ (H930DS) with a custom ROM (self-built AOSP 9.0.0). I don't think this is an OS bug because I had no such issue with another player app (but I like Odyssey more).

gnome17 commented 5 years ago

Hi,

if you want to experiment yourself you can use this branch: https://github.com/gateship-one/odyssey/tree/investiagte_start_service_anr

relan commented 5 years ago

No luck. I can reproduce this issues in the very same way as before. Logcat attached.

logcat.txt