question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NullPointerException inside engine during loading mp3 file

See original GitHub issue

Hello!

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:closed
  • Created 8 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
nczempincommented, Mar 20, 2016

How is a NullPointerException inside lwjgl not a lwjgl issue? Should be reported there, no?

0reactions
Tom-Skicommented, Apr 20, 2016

Will reopen if self contained example is provided that reproduces this issue.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found