I have the same issue, and I can’t seem to detect why it’s happening. I’m using Kubuntu 20.04 fully updated. Audio works as intended on any other application (VLC, browsers, games).
I’ve tried:
- LWJGL and LWJGL3
- Java 8 and 11
- 3.2.0-stable, 3.2.1-stable, 3.2.2-stable, 3.2.3-stable
This is my gradle.build
file. Super minimal. Literally the minimum required for JME to run on desktop.
plugins {
id 'java'
id 'application'
}
group 'com.jayfella'
version '0.0.1'
mainClassName = "com.jayfella.animalia.Main"
repositories {
jcenter()
}
project.ext {
jme_version = "3.2.3-stable"
}
dependencies {
implementation "org.jmonkeyengine:jme3-core:$jme_version"
implementation "org.jmonkeyengine:jme3-desktop:$jme_version"
implementation "org.jmonkeyengine:jme3-lwjgl:$jme_version"
}
This is a minimal class - again - the minimum required to start the JME application.
package com.jayfella.animalia;
import com.jme3.app.SimpleApplication;
import com.jme3.app.state.AppState;
import com.jme3.system.AppSettings;
public class Main extends SimpleApplication {
public static void main(String... args) {
Main main = new Main();
main.start();
}
@Override
public void simpleInitApp() {
}
}
This is the entire log output.
13:13:31: Executing task 'run'...
Starting Gradle Daemon...
Connected to the target VM, address: '127.0.0.1:46099', transport: 'socket'
Gradle Daemon started in 681 ms
> Task :compileJava
Connected to the VM started by ':run' (localhost:35137). Open the debugger session tab
> Task :processResources NO-SOURCE
> Task :classes
> Task :run
Jul 25, 2020 1:13:36 PM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.2-stable
* Branch: HEAD
* Git Hash: e2245aa
* Build Date: 2019-03-18
Jul 25, 2020 1:13:37 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: LWJGL 2.9.3 context running on thread jME3 Main
* Graphics Adapter: null
* Driver Version: null
* Scaling Factor: 1
Jul 25, 2020 1:13:37 PM com.jme3.renderer.opengl.GLRenderer loadCapabilitiesCommon
INFO: OpenGL Renderer Information
* Vendor: NVIDIA Corporation
* Renderer: GeForce GTX 1060 3GB/PCIe/SSE2
* OpenGL Version: 4.6.0 NVIDIA 440.100
* GLSL Version: 4.60 NVIDIA
* Profile: Compatibility
Jul 25, 2020 1:13:37 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.ogre.MeshLoader
Jul 25, 2020 1:13:37 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.ogre.SkeletonLoader
Jul 25, 2020 1:13:37 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.ogre.MaterialLoader
Jul 25, 2020 1:13:37 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.ogre.SceneLoader
Jul 25, 2020 1:13:37 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.blender.BlenderModelLoader
Jul 25, 2020 1:13:37 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.fbx.FbxLoader
Jul 25, 2020 1:13:37 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.gltf.GltfLoader
Jul 25, 2020 1:13:37 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.gltf.BinLoader
Jul 25, 2020 1:13:37 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.gltf.GlbLoader
Jul 25, 2020 1:13:37 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.audio.plugins.OGGLoader
ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
AL lib: (EE) alsa_open_playback: Could not open playback device 'default': Device or resource busy
ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
AL lib: (EE) alsa_open_playback: Could not open playback device 'default': Device or resource busy
Jul 25, 2020 1:15:26 PM com.jme3.app.LegacyApplication handleError
SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.RuntimeException: org.lwjgl.LWJGLException: Could not locate OpenAL library.
at com.jme3.audio.lwjgl.LwjglALC.createALC(LwjglALC.java:17)
at com.jme3.audio.openal.ALAudioRenderer.initOpenAL(ALAudioRenderer.java:95)
at com.jme3.audio.openal.ALAudioRenderer.initialize(ALAudioRenderer.java:225)
at com.jme3.app.LegacyApplication.initAudio(LegacyApplication.java:283)
at com.jme3.app.LegacyApplication.initialize(LegacyApplication.java:602)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:178)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:211)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.lwjgl.LWJGLException: Could not locate OpenAL library.
at org.lwjgl.openal.AL.create(AL.java:156)
at org.lwjgl.openal.AL.create(AL.java:102)
at org.lwjgl.openal.AL.create(AL.java:206)
at com.jme3.audio.lwjgl.LwjglALC.createALC(LwjglALC.java:15)
... 8 more
BUILD SUCCESSFUL in 1m 58s
2 actionable tasks: 2 executed
13:15:30: Task execution finished 'run'.
Disconnected from the target VM, address: '127.0.0.1:46099', transport: 'socket'
So I did a little bit of tracing myself and I noticed an error during the sound initialization phase that may or may not mean something.
Notice the variables in the lower-right window indicating an error occurred. Googling doesn’t seem to reveal anything of use. As stated, though, I have tried Java 1.8 and 11 to see if it yielded any difference - which it didn’t.
And a little further down the lines of code in the same method is where the origin of the exception is thrown.
I noticed the log weren’t being displayed so I configured a logger, which yielded more information.
13:26:06: Executing task 'run'...
> Task :compileJava
> Task :processResources NO-SOURCE
> Task :classes
> Task :run
25 Jul 2020 13:26:08 [ INFO | JmeSystem ] Running on jMonkeyEngine 3.2-stable
* Branch: HEAD
* Git Hash: e2245aa
* Build Date: 2019-03-18
25 Jul 2020 13:26:09 [ INFO | LwjglContext ] LWJGL 2.9.3 context running on thread jME3 Main
* Graphics Adapter: null
* Driver Version: null
* Scaling Factor: 1
25 Jul 2020 13:26:09 [ INFO | GLRenderer ] OpenGL Renderer Information
* Vendor: NVIDIA Corporation
* Renderer: GeForce GTX 1060 3GB/PCIe/SSE2
* OpenGL Version: 4.6.0 NVIDIA 440.100
* GLSL Version: 4.60 NVIDIA
* Profile: Compatibility
25 Jul 2020 13:26:09 [ WARN | AssetConfig ] Cannot find loader com.jme3.scene.plugins.ogre.MeshLoader
25 Jul 2020 13:26:09 [ WARN | AssetConfig ] Cannot find loader com.jme3.scene.plugins.ogre.SkeletonLoader
25 Jul 2020 13:26:09 [ WARN | AssetConfig ] Cannot find loader com.jme3.scene.plugins.ogre.MaterialLoader
25 Jul 2020 13:26:09 [ WARN | AssetConfig ] Cannot find loader com.jme3.scene.plugins.ogre.SceneLoader
25 Jul 2020 13:26:09 [ WARN | AssetConfig ] Cannot find loader com.jme3.scene.plugins.blender.BlenderModelLoader
25 Jul 2020 13:26:09 [ WARN | AssetConfig ] Cannot find loader com.jme3.scene.plugins.fbx.FbxLoader
25 Jul 2020 13:26:09 [ WARN | AssetConfig ] Cannot find loader com.jme3.scene.plugins.gltf.GltfLoader
25 Jul 2020 13:26:09 [ WARN | AssetConfig ] Cannot find loader com.jme3.scene.plugins.gltf.BinLoader
25 Jul 2020 13:26:09 [ WARN | AssetConfig ] Cannot find loader com.jme3.scene.plugins.gltf.GlbLoader
25 Jul 2020 13:26:09 [ WARN | AssetConfig ] Cannot find loader com.jme3.audio.plugins.OGGLoader
25 Jul 2020 13:26:09 [ ERROR | LegacyApplication ] Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.RuntimeException: org.lwjgl.LWJGLException: Could not locate OpenAL library.
at com.jme3.audio.lwjgl.LwjglALC.createALC(LwjglALC.java:17)
at com.jme3.audio.openal.ALAudioRenderer.initOpenAL(ALAudioRenderer.java:95)
at com.jme3.audio.openal.ALAudioRenderer.initialize(ALAudioRenderer.java:225)
at com.jme3.app.LegacyApplication.initAudio(LegacyApplication.java:283)
at com.jme3.app.LegacyApplication.initialize(LegacyApplication.java:602)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:178)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:211)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.lwjgl.LWJGLException: Could not locate OpenAL library.
at org.lwjgl.openal.AL.create(AL.java:156)
at org.lwjgl.openal.AL.create(AL.java:102)
at org.lwjgl.openal.AL.create(AL.java:206)
at com.jme3.audio.lwjgl.LwjglALC.createALC(LwjglALC.java:15)
... 8 more
ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
AL lib: (EE) alsa_open_playback: Could not open playback device 'default': Device or resource busy
ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
AL lib: (EE) alsa_open_playback: Could not open playback device 'default': Device or resource busy
BUILD SUCCESSFUL in 5s
2 actionable tasks: 2 executed
13:26:12: Task execution finished 'run'.
If there’s any more information I can provide please do let me know. As it stands right now I must the the AudioRenderer to null
in order to get the JME application to start.