ANR on JB when calling reset() on a MediaPlayer object that has not finished preparing

Issue #37 resolved
Will Lunniss repo owner created an issue

This is a bug in the native code where it gets in a deadlock and android then throws an ANR dialog when being reset before it has finished preparing. This is specficially a problem when the MediaPlayer takes ages to prepare becuase it cannot process the file, so far workarounds are not that great, e.g. start a new thread and studown the MediaPlayer in that. While this is OK for skipping one or two tracks, it could be pretty bad if the user skipped past lots of tracks in one go.

This should be mitigated when managing the downloading of audio manually, as the time to prepare (and fail to prepare) will be much shorter. For now I'll try to kill them in the background and try to ensure I don't have too many lying around :(

Comments (5)

  1. Log in to comment