Antennapod: Random restart instead of resume

Created on 11 Feb 2014  Â·  41Comments  Â·  Source: AntennaPod/AntennaPod

Every now and then when I start AntennaPod with a podcast where the playback was paused somewhere in the middle and I hit play, it does not continue from where it was paused but restarts playback from the beginning of the track. In the player view the progress bar and runtime still show the correct values right before starting but as soon as I press play, both jump back to the beginning.

I could not track down if it is related to some special event, but it only occurs if AntennaPod has not been used for at least several hours. I have the suspicion that it could be related to the fact that my phone sometimes (partially?) reboots which I do not necessarily notice every time it happens.

This might be somehow related to #319 but I'm not quite sure if it is the same bug.

confirmed bug

All 41 comments

I was able to reproduce this bug in 0.9.8.0, but not anymore in 0.9.8.1 (should be available in a couple of hours). Could you check if this issue has been resolved on your device, too?

@danieloeh I would, of course. Unfortunately 0.9.8.1 has not arrived on f-droid, yet. I don't know if you somehow can push them to build the most current version or if just their build service has some hickups...

@danieloeh Meanwhile I'm on 0.9.8.3 and the issue is still there.

issue persists in 0.9.9.0

issue persists in 0.9.9.5 in android 4.0.3 and 4.1.1

this was for ages now the only flaw in this application. now that I have a new phone I do not experience it anymore. Has it been fixed?

issue persists in 0.9.9.6 in android 4.0.3 and 4.1.1. It hasn't been fixed.

I have Android 4.4.4 and everything works fine

@dlmagsv, are you using Prestissimo?

@TomHennen. No, I don't use Prestissimo on android 4.1.1 and 4.0.3.

I have never seen this behavior. Thus, I have several questions:

  • Does this still happen in the current 1.1.2?
  • Does this happen with multiple different podcasts or only with one in particular?
  • Do you download 'n' play or stream?

@mfietz

  1. Yes, this still happen in 1.1.2
  2. This happen with all audio podcasts. Video podcasts resumes correctly.
  3. Always download and play.

Up to now I only had experienced this behaviour after I hadn't used antenna pod for some hours (like over night or so). Yesterday, my playback was paused by an incoming call and as I wanted to resume playback directly afterwards (the call lasted less than a minute) playback jumped to a totally random time – something like 3 minutes 28 seconds.

This is strange indeed. I'm not entirely sure how to diagnose it. It has normal behavior for most.

I wonder if using a debug version, capturing the logcat output and reproducing the problem would be helpful.

I would love to help with some logcats if someone would provide me with a debug version.

Here is the 1.2 debug build
https://www.dropbox.com/s/4hffb3t2ej8965k/AntennaPod_1.2_debug.apk?dl=0

On Wed, Jun 3, 2015, 6:19 AM benedetto [email protected] wrote:

I would love to help with some logcats if someone would provide me with a
debug version.

—
Reply to this email directly or view it on GitHub
https://github.com/AntennaPod/AntennaPod/issues/345#issuecomment-108288633
.

Downloaded and installed. I guess I will get some test time after the weekend.

Finally it took me a bit longer to test and finally find the time to extract the interesting parts from the logs. But here they are. I had six encounters of the last week or so and I tried to save the logs from all of them, which are pasted in the following:

06-12 08:11:25.380 D/AocateReplacementMediaPlayer(17353): In setDataSource(context, /storage/sdcard0/Android/data/de.danoeh.antennapod.debug/files/media/LogbuchNetzpolitik/LNP140 Hoch die internationale Spionageaktivität!.mp3)
06-12 08:11:25.383 D/AocateAndroidMediaPlayer(17353): setDataSource(/storage/sdcard0/Android/data/de.danoeh.antennapod.debug/files/media/LogbuchNetzpolitik/LNP140 Hoch die internationale Spionageaktivität!.mp3)
06-12 08:11:25.480 D/UserPreferences(17353): Registered change of user preferences. Key: de.danoeh.antennapod.preferences.currentPlayerStatus
06-12 08:11:25.480 W/UserPreferences(17353): Unhandled key: de.danoeh.antennapod.preferences.currentPlayerStatus
06-12 08:11:29.591 D/UserPreferences(17353): Registered change of user preferences. Key: de.danoeh.antennapod.preferences.currentPlayerStatus
06-12 08:11:29.592 W/UserPreferences(17353): Unhandled key: de.danoeh.antennapod.preferences.currentPlayerStatus
06-12 08:11:29.595 E/dalvikvm(17353): Could not find class 'android.app.Notification$MediaStyle', referenced from method de.danoeh.antennapod.core.service.playback.PlaybackService$3.onPostExecute
06-12 08:11:29.595 W/dalvikvm(17353): VFY: unable to resolve new-instance 38 (Landroid/app/Notification$MediaStyle;) in Lde/danoeh/antennapod/core/service/playback/PlaybackService$3;
06-12 08:11:34.583 D/UserPreferences(17353): Registered change of user preferences. Key: de.danoeh.antennapod.preferences.currentPlayerStatus
06-12 08:11:34.584 W/UserPreferences(17353): Unhandled key: de.danoeh.antennapod.preferences.currentPlayerStatus
06-17 08:57:21.760 E/ActivityThread(26387): Activity de.danoeh.antennapod.activity.MainActivity has leaked IntentReceiver de.danoeh.antennapod.core.asynctask.DownloadObserver$1@415de900 that was originally registered here. Are you missing a call to unregisterReceiver()?
06-17 08:57:21.760 E/ActivityThread(26387): android.app.IntentReceiverLeaked: Activity de.danoeh.antennapod.activity.MainActivity has leaked IntentReceiver de.danoeh.antennapod.core.asynctask.DownloadObserver$1@415de900 that was originally registered here. Are you missing a call to unregisterReceiver()?
06-17 08:57:21.760 E/ActivityThread(26387):     at de.danoeh.antennapod.core.asynctask.DownloadObserver.onResume(DownloadObserver.java:62)
06-17 08:57:21.760 E/ActivityThread(26387):     at de.danoeh.antennapod.fragment.QueueFragment.onStart(QueueFragment.java:120)
06-17 08:57:21.765 E/ActivityThread(26387): Activity de.danoeh.antennapod.activity.MainActivity has leaked ServiceConnection de.danoeh.antennapod.core.asynctask.DownloadObserver$2@41602160 that was originally bound here
06-17 08:57:21.765 E/ActivityThread(26387): android.app.ServiceConnectionLeaked: Activity de.danoeh.antennapod.activity.MainActivity has leaked ServiceConnection de.danoeh.antennapod.core.asynctask.DownloadObserver$2@41602160 that was originally bound here
06-17 08:57:21.765 E/ActivityThread(26387):     at de.danoeh.antennapod.core.asynctask.DownloadObserver.connectToDownloadService(DownloadObserver.java:100)
06-17 08:57:21.765 E/ActivityThread(26387):     at de.danoeh.antennapod.core.asynctask.DownloadObserver.onResume(DownloadObserver.java:63)
06-17 08:57:21.765 E/ActivityThread(26387):     at de.danoeh.antennapod.fragment.QueueFragment.onStart(QueueFragment.java:120)
06-19 18:00:38.668 E/dalvikvm(23765): Could not find class 'android.app.Notification$MediaStyle', referenced from method de.danoeh.antennapod.core.service.playback.PlaybackService$3.onPostExecute
06-19 18:00:38.668 W/dalvikvm(23765): VFY: unable to resolve new-instance 38 (Landroid/app/Notification$MediaStyle;) in Lde/danoeh/antennapod/core/service/playback/PlaybackService$3;
06-20 09:48:33.481 E/dalvikvm(5020): Could not find class 'android.app.Notification$MediaStyle', referenced from method de.danoeh.antennapod.core.service.playback.PlaybackService$3.onPostExecute
06-20 09:48:33.481 W/dalvikvm(5020): VFY: unable to resolve new-instance 38 (Landroid/app/Notification$MediaStyle;) in Lde/danoeh/antennapod/core/service/playback/PlaybackService$3;
06-22 07:56:00.147 D/QueueFragment(6724): onEvent(QueueEvent[action=REMOVED,item=FeedItem[title=Business English News 32 – Currency Wars,chapters=<null>,contentEncoded=<null>,description=<null>,feed=de.danoeh.antennapod.core.feed.Feed@4,pubDate=Sun Apr 12 14:33:36 MESZ 2015,flattrStatus=de.danoeh.antennapod.core.util.flattr.FlattrStatus@416bea40,paymentLink=<null>,image=<null>,itemIdentifier=http://www.businessenglishpod.com/?p=7167,link=http://feedproxy.google.com/~r/BusinessEnglishPod/~3/-vwOE2fxeRw/,media=de.danoeh.antennapod.core.feed.FeedMedia@5d,feedId=4,hasChapters=false,read=true,autoDownload=true,id=94],items=<null>,position=0])
06-22 07:56:05.814 D/QueueFragment(6724): onEvent(QueueEvent[action=REMOVED,item=FeedItem[title=BEP 268 – Strategic Negotiations 5: Recovering from Setbacks,chapters=<null>,contentEncoded=<null>,description=<null>,feed=de.danoeh.antennapod.core.feed.Feed@4,pubDate=Sun May 03 11:08:31 MESZ 2015,flattrStatus=de.danoeh.antennapod.core.util.flattr.FlattrStatus@416808b0,paymentLink=<null>,image=<null>,itemIdentifier=http://www.businessenglishpod.com/?p=7386,link=http://feedproxy.google.com/~r/BusinessEnglishPod/~3/ykzwkelJQr4/,media=de.danoeh.antennapod.core.feed.FeedMedia@5a,feedId=4,hasChapters=false,read=true,autoDownload=true,id=91],items=<null>,position=0])
06-22 07:56:12.277 E/dalvikvm(6724): Could not find class 'android.app.Notification$MediaStyle', referenced from method de.danoeh.antennapod.core.service.playback.PlaybackService$3.onPostExecute
06-22 07:56:12.277 W/dalvikvm(6724): VFY: unable to resolve new-instance 38 (Landroid/app/Notification$MediaStyle;) in Lde/danoeh/antennapod/core/service/playback/PlaybackService$3;
06-23 10:40:45.357 E/dalvikvm(29156): Could not find class 'android.app.Notification$MediaStyle', referenced from method de.danoeh.antennapod.core.service.playback.PlaybackService$3.onPostExecute
06-23 10:40:45.357 W/dalvikvm(29156): VFY: unable to resolve new-instance 38 (Landroid/app/Notification$MediaStyle;) in Lde/danoeh/antennapod/core/service/playback/PlaybackService$3;
06-24 09:36:33.248 E/dalvikvm(14573): Could not find class 'android.app.Notification$MediaStyle', referenced from method de.danoeh.antennapod.core.service.playback.PlaybackService$3.onPostExecute
06-24 09:36:33.248 W/dalvikvm(14573): VFY: unable to resolve new-instance 38 (Landroid/app/Notification$MediaStyle;) in Lde/danoeh/antennapod/core/service/playback/PlaybackService$3;

It seems that all the events have in common the two lines with the output

(*timestamp*) E/dalvikvm(14573): Could not find class 'android.app.Notification$MediaStyle', referenced from method de.danoeh.antennapod.core.service.playback.PlaybackService$3.onPostExecute
(*timestamp*) W/dalvikvm(14573): VFY: unable to resolve new-instance 38 (Landroid/app/Notification$MediaStyle;) in Lde/danoeh/antennapod/core/service/playback/PlaybackService$3;

while the other log entries occur only for single encounters. It should also be noted that all the records stem from cases where playback was resumed after some hours or days of pause.

I also had one case where the playback jumped after answering a call (as mentioned in this comment) but I was unfortunately not able to save the logs from that case.

I hope that helps in debugging or at least gives some hint on the problem. If you need more information or logs, let me know!

After some investigation I don't think this portion of the log is related. That it couldn't find MediaStyle is actually expected if you're running an older version of Android. We have the _use_ of that functionality behind an API guard.

We'll still keep an eye out for this behavior, but we may not be able to do anything for 1.3.

I encounter this issue with all podcast apps except one (DoggCatcher). It has this option in the settings which solves the problem. Does anybody know what solution they use?

My phone is based on MTK6577 and runs Android 4.1.1. I tried the latest version of AntennaPod. Position shifts to the beginning only after restarting the application, otherwise it works fine.
screenshot_2016-02-05-22-43-30

Not familiar with DC myself. Maybe also put this question to the users in 'Playback position regularly moves back to pre-last position after pause' (#1264)

I also noticed that current time is displayed differently in different views. It's the same file paused at the same position. Maybe it's somehow related to the problem.
screenshot_2016-02-06-00-50-54
screenshot_2016-02-06-00-51-05

time is displayed differently in different views [@sunabozu]

Given the previous issues with playback time in other places (widget #1278, queue after playback reset #1263), my guess is that it's not necessarily related. You might want to open another issue for this.

I created another build with more logging: https://www.dropbox.com/s/kzyz7h2s8rmlhk9/antennapod-resume.apk?dl=0 (based on latest develop version)
I also added some lines of code that might fix any resume issues - or it could go horribly go wrong...
Any testing and logs are appreciated.

@danieloeh I know this is probably coming late, but this issue seems to be related to the MTK family of processors. Some information here:
https://forum.fairphone.com/t/problem-audio-does-not-resume-at-where-it-was-paused/502/9
They mention MTK65xx, but my Redmi Note 2 has an MTk67xx.
Changing the player or the speed seems to solve the issue.

I've tried the sonic media player, but at least on the first try, it ended up sending me back quite a bit. Going to test 1.05x speed.

EDIT: forgot to add, Android 5.0.2 LRX22G

I had this problem on Android 4.1.1. Now, when I updated to 4.4.2, it works as expected.

I hope it will help to investigate.

Ok, 1.05x speed didn't solve either.

I had this issue again a few weeks ago. But this was only with ONE podcast with multiple episodes. But my other 10 Podcasts are working like a charm.
I listened CRE.fm in the past and had the issue at that time. Very likely that only this podcast triggered the bug on my setup (but Desire HD Android 4.0.4 and Fairphone 2 Android 5.1).

https://cre.fm/cre180-passivhaeuser
https://cre.fm/cre075-energiesparhaeuser

my android 5.1 showed this buggy behavior and i had the feeling it only affected mp3 feeds and not m4a.
wasn't affected since i moved to android 7.x.

I was having this issue, but enabling 'Playback > Adjust media info to playback speed' seems to have fixed it for me.

@keunes could we close this issue?

This is not fixed.
Situation where I see it:
Reopen antennapod with the player in fullscreen with the podcast image.
When I touch the image the app sometimes starts from the beginning. (I never have that with hitting play/pause.)
Hitting pause / play in the "footer" in the middle pauses playback.
When I hit the play/pause again the audio resumes from the correct (old) position (and not the beginning.

I'm sorry to hear you're still seeing this behaviour. I guess we can't close the issue.
Unfortunately I'm not a developer so wouldn't know how to debug this.

@HolgerJeromin What AntennaPod version do you use? What media player (Settings » Playback » Media Player)?

@HolgerJeromin What AntennaPod version do you use? What media player (Settings » Playback » Media Player)?

default android internal player.
2.1.0 RC3 from google play beta
But I am not 100% sure I had this problem with RC3. But had it in the last month for sure.

Try using ExoPlayer. It is a lot more stable. The android internal player is no longer actively supported.

Had it just now. So still buggy with rc3.
Will try the other player.

Thanks for all the great work over the years!!

I think I had the situation with ExoPlayer right now.
The play button had a touch feedback but playback did not start.
Starting again worked. Position was not reset.
Perhaps you should disable the buggy player.

Try using ExoPlayer. It is a lot more stable. The android internal player is no longer actively supported.

@ByteHamster Should we label this audio player (deprecated) in the UI?

Should we label this audio player (deprecated) in the UI?

I do not think that will change really much. Nobody will leave this player because of a changed label on upgrade.
I hope the buggy player is not the default right now.

Should we label this audio player (deprecated) in the UI?

:+1:

I hope the buggy player is not the default right now.

ExoPlayer is way more stable than the old ones. The number of bug reports with weird media player behavior was reduced a lot since we switched the default to ExoPlayer.

Was this page helpful?
0 / 5 - 0 ratings