OGG playback lockup

Hey there.

For a while now I’ve had this nightmare of an issue where the game that I’m working on locks up completely when I try to play an ogg music file. (upon calling .play() on the audioNode) It seems to only happen with ogg, as wav works fine (but is extremely large in filesize!)

The oggs play just fine in a brand new JME application, so the export/format is not at fault.
At this point I’m really not sure what could be tripping this, because there’s nothing audio related that I can see which is handled differently than another JME project I’ve worked on, where I had no such issue.
I’ve tried fiddling with the stream & cache booleans on initialization, no bueno.

Debugging seems to show that it’s stuck on line 94 of OGGLoader.java (I use the 3.0 SDK)

It’s this line:

if ((cnt = vs.readPcm(buf, offset + bytesRead,length - bytesRead)) <= 0) {

Furthermore, there’s a hidden source calls section with a stack that changes a little bit between each pause. (there’s probably more than just these two but my debugging skills aren’t my strong suit)

"LWJGL Renderer Thread"

"LWJGL Renderer Thread"

It almost seems like it’s supposedly loading, but why on earth would it take hours when the same thing loads up instantly in a different app?

Any ideas on what might be going wrong? (or how I could track down what’s causing the lockup?)
Thanks in advance!

I had a similar problem some years ago. I had to recode the OGG file, in my case I could get away using an uncompressed wav.

Does the same ogg file work in one of your JME projects and not another?

It would be useful to figure out the differences between the two projects.

Edit: also, regarding your stack traces it would be useful to know what the other threads are doing at the time.

Running the app from the command line (java -jar or whatever) and hitting ctrl+break will do a full thread dump… and also tell you if the JRE detects a real deadlock.