NullPointerException inside engine during loading mp3 file
See original GitHub issueHello!
From time to time I get this crash: NullPointerException at Mp3.java:82 (here) as a part of crash reports from players, and once I did also reproduce this issue.
(I load a lot of sounds using AssetManager
)
java.lang.NullPointerException
at com.badlogic.gdx.backends.lwjgl.audio.Mp3$Music.read(Mp3.java:82)
at com.badlogic.gdx.backends.lwjgl.audio.OpenALMusic.fill(OpenALMusic.java:240)
at com.badlogic.gdx.backends.lwjgl.audio.OpenALMusic.update(OpenALMusic.java:224)
at com.badlogic.gdx.backends.lwjgl.audio.OpenALAudio.update(OpenALAudio.java:227)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:211)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:123)
Probably, this is a thread problem, but I think, simple wrap with if (bitstream != null)
gonna solve the issue.
Issue Analytics
- State:
- Created 8 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Play mp3 files in java - nullpointerexception - Stack Overflow
Try putting the file in the root directory. Maybe you can access it from there, using MainClass.getResourceAsStream("file.mp3");.
Read more >How to Fix and Avoid NullPointerException in Java - Rollbar
The NullPointerException occurs due to a situation in application code where an uninitialized object is attempted to be accessed or modified.
Read more >MediaPlayer - Android Developers
While in the Started state, the internal player engine calls a user supplied OnBufferingUpdateListener.onBufferingUpdate() callback method if a ...
Read more >Java NullPointerException - Detect, Fix, and Best Practices
NullPointerException is raised in an application when we are trying to do some operation on null where an object is required.
Read more >Troubleshoot error messages in Wowza Streaming Engine
Cause: Occurs when there is an attempt to play a file that's not an MP4 file. This error is thrown by the MP4...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
How is a NullPointerException inside lwjgl not a lwjgl issue? Should be reported there, no?
Will reopen if self contained example is provided that reproduces this issue.