SoundSword icon indicating copy to clipboard operation
SoundSword copied to clipboard

Crash when resuming from background

Open chanonly123 opened this issue 8 years ago • 3 comments

Great Library! Thanks for sharing

chanonly123 avatar Jul 13 '17 10:07 chanonly123

Found crashing When resuming from background and playing again.

FATAL EXCEPTION: main
Process: samaritanheuristics.testapp, PID: 11209
java.lang.IllegalStateException
at android.media.MediaPlayer._reset(Native Method)
at android.media.MediaPlayer.reset(MediaPlayer.java:1724)
at com.matthewtamlin.soundsword.PlaybackService.resetMediaPlayer(PlaybackService.java:995)
at com.matthewtamlin.soundsword.PlaybackService.onAudioFocusChange(PlaybackService.java:281)
at android.media.AudioManager$ServiceEventHandlerDelegate$1.handleMessage(AudioManager.java:2158)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

chanonly123 avatar Jul 14 '17 10:07 chanonly123

I'll look into it but I can't guarantee a fix because I have very little time for these things right now. Can you provide more information about the circumstances leading to the crash?

jack-bradshaw avatar Jul 14 '17 13:07 jack-bradshaw

  1. Start testapp1
  2. BIND TO SERVICE
  3. SET MEDIA TO NEXT QUEUE
  4. PLAY MEDIA
  5. minimize app (go to Home)
  6. resume app
  7. try to BIND TO SERVICE (need to click 3 times)
  8. SET MEDIA TO NEXT QUEUE
  9. PLAY MEDIA
  10. Crash.

chanonly123 avatar Jul 17 '17 05:07 chanonly123