Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MediaPlayer$EventHandler.handleMessage NPE #2470

Closed
asdf-qwert opened this issue Oct 14, 2014 · 5 comments
Closed

MediaPlayer$EventHandler.handleMessage NPE #2470

asdf-qwert opened this issue Oct 14, 2014 · 5 comments

Comments

@asdf-qwert
Copy link
Contributor

Today happened twice on Nexus 5 and Nexus 7 2013 probably when stopped and disposed sounds/music

java.lang.NullPointerException
at android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:2218)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
@asdf-qwert
Copy link
Contributor Author

Probably this problem https://code.google.com/p/android/issues/detail?id=63345

@MobiDevelop
Copy link
Member

None of that stack trace references anything within libgdx, and you provided no code to reproduce.

@asdf-qwert
Copy link
Contributor Author

Well, there is no code to reproduce, as I sad I stopped that music with stop() and disposed with dispose()
and after few miliseconds it crashes, but most of the time it's ok.
I found that calling MediaPlayer.stop() right before MediaPlayer.release() may cause problems.

@MobiDevelop
Copy link
Member

So... what are you proposing? Removing the call to stop before release in dispose?

@asdf-qwert
Copy link
Contributor Author

Yes, just like described on page above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants