11

All of a sudden my Samsung Galaxy S claims to not support mp3 files (the phone has been idle for a few hours, I did not touch anything). Ogg files however still play without problems. When this happens, no app can play mp3 files, e.g. my custom ring tone is not played anymore (it just vibrates as if it were muted). A reboot of the phone fixes the issue but within 3-4 days the problem comes back. It does not make a difference if files are stored on internal or external sd card.

This also affects video playback, I'm just not sure if it happens at the same time or independent of each other. The youtube app can no longer start videos (unknown playback problem), and the video player app claims all video files as unsupported. I suppose the issue may not be the video playback itself but the audio codec used in the video (mp3).

Any idea how to fix this or debug this? I don't want to reboot my phone every couple of days - it takes 2-3 minutes to do this and a phone should just work.

I applied 2.2.1 firmware lately and this only seemed to make the problem worse. I had this before 2.2.1 (with 2.2) but only very rarely.

I'm curious if TitaniumBackup may be the culprit as the backup scheduler seems to stop processes sometimes. Maybe others experiencing this issue use scheduled TitaniumBackups, too? The hint was that since upgrading to 2.2.1 I also upgraded to the licensed TitaniumBackup version and scheduled daily backups. But this may just be coincidence. What contradicts this theory: Backups are scheduled at night but last time I saw this issue it happened during the day - mp3 worked in the morning, failed in the afternoon. The phone was idle during the time it "decided" to no longer play mp3.

Looking at forums (I only found a few hits in Google), people having the same problems suggest to simply reboot the phone - but that is no fix at all. Or they suggest to send the phone back for replacement - and guess what: It has not fixed the problem for people experiencing this issue. So I suggest it is not a hardware issue (neither related to sdcards nor to the phone itself).

11
  • 1
    I had the same problem happening to me twice now, but I am unable to force the issue. BTW: I don't use Titanium Backup, so you can probably strike that of your list of culprits.
    – bjoernz
    Commented May 3, 2011 at 8:23
  • @Matt I don't think this helps. On the one hand, there's my contradiction, on the other hand there's @bjoernz confirming it's also happening without TB installed.
    – hurikhan77
    Commented May 3, 2011 at 10:52
  • BTW: I suspect the MediaFly app or the Adobe Flash is the culprit...
    – bjoernz
    Commented May 3, 2011 at 18:10
  • @bjoern I don't use MediaFly so you can strike that out. But how does Flash fit into the picture?
    – hurikhan77
    Commented May 3, 2011 at 18:55
  • 1
    This is getting ridiculous. Ever since I commented on this question I can observe this effect every 2-3 days... and I am still not able to enforce this behaviour. BTW: It does not only effect MP3s, video files (*.mp4) are also affected.
    – bjoernz
    Commented May 9, 2011 at 12:32

8 Answers 8

4

I think I found the problem.

Like bjoernz said, some application is creating many objects from MediaPlayer class and it's not releasing that after. So, I opened an adb shell, became root (su) and I found the PID (process ID) of mediaserver, using the command:

ps | grep mediaserver

The mediaserver's PID, in my case, is: 84

Then, I listed all resources used by that PID with the command:

lsof | grep 84

And I got the following result:enter image description here

So, it became easy to identify that the official twitter application (com.twitter.android-1.apk) was the problem. Then I removed twitter application and I installed TweetDeck instead and the problem disappeared since last week.

Hope this can help you.

[]'s

1
  • This is interesting...
    – hurikhan77
    Commented Sep 12, 2011 at 12:21
7
+50

A last resort is always a factory reset, which should fix this problem. You could also have a look at the logcat output, maybe this will give you a hint about the cause of the problem.

5
  • When upgrading to 2.2.1 I did a fresh factory reset - essentially this is why I bought the TB license (restoring 100 apps by manual confirmation went beyond my patience)
    – hurikhan77
    Commented May 3, 2011 at 10:47
  • 1
    Even though I didn't really wanted to do a factory reset, I tried it on Friday and the problem has not occurred since. While I am not sure, if the problem is gone for good, I will award you the bounty, so it won't go to waste :-)
    – bjoernz
    Commented May 16, 2011 at 7:55
  • The problem still persists :-(
    – bjoernz
    Commented May 20, 2011 at 7:18
  • @bjoern: I was already sure that a factory reset does not help.
    – hurikhan77
    Commented May 26, 2011 at 11:24
  • @hurikhan77: I wanted to do it anyways ;-)
    – bjoernz
    Commented May 27, 2011 at 16:51
4

I have finally had a chance to look at the logcat while the problem was occuring. The error message reads:

Completed command PLAYER_PREPARE status=-17

According to this forum "it’s caused by having too many MediaPlayer objects active at once." Unfortunately I have not yet found a fix. The only known workaround seems to be rebooting.

I am still not sure, which app (or combination of apps) reproduce the error reliably.

Edit: I guess that any application, that uses the MediaPlayer class can cause the problem. Those apps probably never reach a state where they call MediaPlayer.release(). Maybe we need to contact the vendors of applications that use the MediaPlayer, so they make sure they call release().

My superficial research did not lead to a solution, that would fix the problem without a reboot.

Edit 2: I have updated to Android 2.3 (Gingerbread) and unfortunately this problem still persists.

Some logcat messages around the error:

06-08 20:03:08.785 V/PlayerDriver( 2377): CommandCompleted
06-08 20:03:08.785 V/PlayerDriver( 2377): Completed command PLAYER_INIT status=1
06-08 20:03:08.785 V/PVPlayer( 2377): run_set_video_surface s=0, cancelled=0
06-08 20:03:08.785 V/PVPlayer( 2377): run_set_audio_output s=0, cancelled=0
06-08 20:03:08.785 V/PlayerDriver( 2377): Send player code: 5
06-08 20:03:08.785 V/PlayerDriver( 2377): Create realtime output
06-08 20:03:08.785 V/PlayerDriver( 2377): CommandCompleted
06-08 20:03:08.785 V/PlayerDriver( 2377): Completed command PLAYER_SET_AUDIO_SINK status=1
06-08 20:03:08.785 V/PVPlayer( 2377): run_prepare s=0, cancelled=0
06-08 20:03:08.789 V/PlayerDriver( 2377): Send player code: 7
06-08 20:03:08.789 V/PlayerDriver( 2377): disable natpkt - 0
06-08 20:03:08.789 D/        ( 2377): After GetDurationFromRandomScan: clipDuration=8716644 
06-08 20:03:08.789 D/        ( 2377): After GetDurationFromRandomScan: clipDuration=8716644 
06-08 20:03:08.804 V/PlayerDriver( 2377): HandleInformationalEvent: 26
06-08 20:03:08.804 V/PlayerDriver( 2377): HandleInformationalEvent: type=26 UNHANDLED
06-08 20:03:08.804 V/PlayerDriver( 2377): CommandCompleted
06-08 20:03:08.804 V/PlayerDriver( 2377): Completed command PLAYER_PREPARE status=-17
06-08 20:03:08.804 E/PlayerDriver( 2377): Command PLAYER_PREPARE completed with an error or info -17
06-08 20:03:08.804 V/PVPlayer( 2377): check_for_live_streaming s=-2147483648, cancelled=0
06-08 20:03:08.804 V/PlayerDriver( 2377): HandleInformationalEvent: 27
06-08 20:03:08.804 W/PlayerDriver( 2377): PVMFInfoErrorHandlingComplete
06-08 20:03:08.804 W/MediaPlayer(22989): info/warning (1, 26)
06-08 20:03:08.804 E/MediaPlayer(22989): error (1, -17)
06-08 20:03:08.808 I/AudioService( 2471):  AudioFocus  abandonAudioFocus() from android.media.AudioManager@480f3630null
06-08 20:03:08.812 I/AudioService( 2471):  AudioFocus  abandonAudioFocus() from android.media.AudioManager@480f3630null
06-08 20:03:08.812 D/PlayTo  (22989): opening content://dtmedia/media/1553 with Android Player
06-08 20:03:08.812 D/PlayTo  (22989): About to set Android Player datasource to content://dtmedia/media/1553
06-08 20:03:08.812 E/PVPlayer( 2377): isDrmfile playing 0
06-08 20:03:08.812 V/PVPlayer( 2377): reset
06-08 20:03:08.812 V/PlayerDriver( 2377): Send player code: 18
06-08 20:03:08.812 V/PlayerDriver( 2377): handleCancelAllCommands
06-08 20:03:08.816 V/PlayerDriver( 2377): CommandCompleted
06-08 20:03:08.816 V/PlayerDriver( 2377): Completed command PLAYER_CANCEL_ALL_COMMANDS status=1
06-08 20:03:08.816 V/PlayerDriver( 2377): Send player code: 11
06-08 20:03:08.816 V/PlayerDriver( 2377): handleReset
06-08 20:03:08.816 V/PlayerDriver( 2377): CommandCompleted
06-08 20:03:08.816 V/PlayerDriver( 2377): Completed command PLAYER_RESET status=1
06-08 20:03:08.816 V/PlayerDriver( 2377): Send player code: 17
06-08 20:03:08.816 V/PlayerDriver( 2377): handleRemoveDataSource
06-08 20:03:08.816 V/PlayerDriver( 2377): CommandCompleted
06-08 20:03:08.816 V/PlayerDriver( 2377): Completed command PLAYER_REMOVE_DATA_SOURCE status=1
06-08 20:03:08.816 V/PVPlayer( 2377): unmap file
1
  • I've switched to DarkyROM 10.2, now on 10.3. Both versions are Gingerbread based (2.3.3 and 2.3.4) and do not exhibit this behaviour. So it seems to be something specific to the Samsung stock ROM.
    – hurikhan77
    Commented Sep 12, 2011 at 11:38
4

I have the same problem here, using Galaxy S with Android 2.3.3.

Looking at the log, we can see the PID (proccess ID) used by PlayerDriver.

V/PlayerDriver( 84): Completed command PLAYER_PREPARE status=-17

So, I've killed the PlayerDriver process and it has fixed.

In order to do that, you need to root your device and connect with adb as root. Ex.:

adb shell

su

Next time I'll try identify what files and pipes the process is using through lsof command

Hope this help.

3

The same problem is on my galaxy s. I've noticed that if I use Google Listen and have some queue, mp3 stops playing. After clearing queue it was getting ok! But... It seems Adobe Flash influences on media playback too. If I use it them any media playback fails, before rebooting. Maybe 2.3 will fix the problem. Almost tired to find the solution for 2.2 on Galaxy S

4
  • I just deinstalled Flash Player and will keep you informed when the problem occurs again.
    – bjoernz
    Commented May 27, 2011 at 16:47
  • I have flash installed but almost never use it. Plugins are loaded manually in my browser so it is never triggered. I doubt that flash itself is the problem, it is probably related to memory usage. If I do many parallel market updates, mp3 stops working. If I use memory intensive apps, mp3 stops working. It seems android kills an important service (which is normal behaviour according to its task management description) but never restarts this service.
    – hurikhan77
    Commented May 28, 2011 at 12:51
  • I just started every app that I have (start app, press home button, start next app, ...) and my mp3s currently play anyways. BTW: Flash was not uninstalled apparently, only the updates. It got updated today again.
    – bjoernz
    Commented May 29, 2011 at 10:41
  • I found that the official Twitter app could be a culprit Youtube Forum
    – geaden
    Commented May 31, 2011 at 4:35
3

I experience the same problems, and I can't seem to get a consistent cause. After rebooting my phone, I don't see the problem again for another 12-24 hours. Because I use custom music as my alarm clock, I've adopted the habit or rebooting my phone before going to sleep. It's caused many late days to work before I figured out what was going on.

I started with a factory fresh install. Tested it out for a few days with no problems. Begin installing programs one-by-one with no problems. Eventually I started using Widgets, with no problems. I installed Launcher Pro with no problems.

But now the problems have started up again. I uninstalled Launcher Pro altogether to no avail. I removed all of my widgets, which appeared to work. I added them back one by one and I didn't seem to have any problems. But the problem came back. Over the period of two weeks, I couldn't isolate one widget that was causing the issue, so I ruled widgets out all together.

I have custom ringtones for my SMS, notifications, G-talk, Gmail, and ringtones. When this problem occurs, I can't even get my voicemail to play, much less anything else.

I use a program called "Soundhound" to discover music I haven't heard before. I think it might be related. Then again, I also use Advanced Task Killer, but even when I had that installed before it didn't have problems. I think when I use Soundhound, it is setting off some kind of strange chain-reaction which eventually---hours later--causes my phone to have this error.

I don't know enough about the logs or how to access them actual debug the phone, but I do know droves of people have had this issue and there seems to be no fix. In the meantime, I've uninstalled Soundhound and I'm checking to see if I still have the problem.

3

I noticed this problem on my galaxy s, it took a while to piece together, but it appeared to have started when I began using third party task managers. It happened with advanced task killer and watchdog installed.

I went back to using the native task manager and the problem appears to have gone away.... Hasn't occured in the past week. I'm running 2.2.1.

What I thought was the strangest was it happened on days I didn't even use the task manager, just The mere presence cause the problem...

Unsure of the technical reason behind this, but don't care... Native task mgr is fine.

Hope this helps the rest of you.

1
  • 1
    It's always a good idea to remove any third party Task Manager or Task Killer apps, Google specifically recommend against using them. There's evidence that they cause a lot of problems, and with Android's already aggressive memory management barely solve anything.
    – GAThrawn
    Commented Jul 5, 2011 at 9:15
2

Have you tried testing for individual media files causing the problem?

Many moons ago I had a problem where certain files would corrupt the database of music and eventually cause problems for the whole library. This is very hypothetical as my experience wasn't on an android device and my Galaxy S works just fine. Despite this I thought you could try loading only a small subset of your media on and see if you still get the problem. It doesn't look like a codec problem and perhaps the media scanner cleans the database when you restart the phone. Sorry I don't have a better answer.

3
  • I will try and let you know, if it helps. But since I cannot reproduce the problem at will and I do not change my media collection on the phone at all, I doubt that it has anything to do with the files on my phone.
    – bjoernz
    Commented May 13, 2011 at 12:02
  • The problem still occurs if I have no "external" media files on my phone. I have just been streaming a podcast in mp3-format and after some time/some action mediafly will tell me that it is unable to stream the file and that I should download it (even for the same episode that previously worked). It is not a network issue, because I can download the episode without a problem and than I am still unable to play it unless I reboot.
    – bjoernz
    Commented May 23, 2011 at 11:28
  • Well, humpff. Perhaps 2.3 will resolve your problem? If I ever see it on my Galaxy S I will be sure to come back
    – KCD
    Commented May 23, 2011 at 22:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .