This isn’t going to be very helpful but may help narrow something down.
Old time lore used to have it that some systems would get this error when the headphones were plugged in. I mention it partially in the slight chance that it’s directly relevant but also to highlight that it may be related to the sound source the is selected, etc…
It might be worth monkeying around in the sound settings for your desktop to see if anything changes the results in a meaningful way.
Obviously, the status quo is not really acceptable long term even if you find a work-around… but the work-around and/or additional information might be helpful. One more layer of the onion, so to speak. (Obligatory: “Why can’t Ogres be like a parfait?!? Everybody likes a parfait…”)
The OP mentioned they were using Windows, and I’ve never had the issue on Windows - but it might be headphone-related there.
I’ve got it working on many various nix distributions (mint, manjaro, ubuntu vanilla, etc) so it’s probably something silly. I’ll see if I can find the cause. It would be interesting to know if nothing else.
I have the following problem. I will probably write a book about gaming with Java (the publisher has not yet agreed). And then I want to introduce jME. So I need a work round that will help the reader get around this problem. I thought a different sound card would be the solution, but unfortunately it is not. And I don’t use headphones
If it is of any help, I always get this exception when I have no audio output device plugged in (100% reproducibility). It also never happens for me if an audio output device is plugged. I’m using Windows 10.
I ‘fixed’ this with settings.setAudioRenderer(null) since my game has no audio yet, but long term I would also be interested in fixing this properly.
I have had this issue on a VM where there was no audio card attached to the VM. I traced it down to a issue where if the computer (VM or physical) does not have a audio output channel, then this error will occur. I do not know if this is the same cause for you, but it is something I have run into.
When you say LWJGL 2 & 3 do you mean applications where both libs are present and can be chosen between at runtime, or where LWJGL 2 is used for one thing (say, audio), and LWJGL 3 another (such as rendering) (I.e, both are loaded and active at the same time)?
The exception is thrown from main.start() - restarting the context or application results in the same failure. Setting the appSettings to showSettings true/false doesn’t make any difference either. Trying as hard as I can to ensure the window is focused doesn’t make any difference - or I just can’t physically do it quick enough.
The only information I have really to go on after reading through the data in this post is that
it may be a race condition
the sound card is “busy”.
For the second point - does that mean that no spare channels are available? It requires exclusive access and can’t obtain it? I’m not sure exactly what “busy” means. It exists (I have a sound card). It works (in any other application). I have been listening to youtube/watching videos and run a JME app previously with no issues - so it shouldn’t require “exclusive” access.
Before submitting a PR, I’d like to implement a similar fix for LWJGL v3. To do so, I need to see a stack trace from a failing run with LWJGL v3. I looked through past discussions and didn’t find one. Can anyone provide a stack trace for this issue with LWJGL v3?