Android MediaPlayer bug when using reset() and release() calls

Jona picture Jona · Jan 20, 2011 · Viewed 9.8k times · Source

The bug I'm seeing is on the calls to reset() and release() never returning thus leaving my application in an indefinitely stopping state. It doesn't matter if I call stop() before reset() or release() the hang can always be reproduced.

Anyone experienced any similar issues with the MediaPlayer locking up? Any tips? I'm working on a multi-threaded application.

The DDMS reports the following when looking at the threads that are holding:

CLASS | METHOD | FILE | LINE | NATIVE

android.media.MediaPlayer _release MediaPlayer.java -2 true
android.media.MediaPlayer release MediaPlayer.java 1049 false

Answer

skyler picture skyler · May 11, 2011

You may have stumbled across this bug: http://code.google.com/p/android/issues/detail?id=959. It has sat for some time, I wouldn't expect it to be addressed any time soon, unfortunately.