[SOLVED] UnsatisfiedLinkError after switching to Minie physics

Hello, I switched to Minie physics using the tutorial, and now sdk builds fail with:

Exception in thread "main" java.lang.UnsatisfiedLinkError: com.jme3.bullet.PhysicsSpace.createPhysicsSpace(FFFFFFI)J
	at com.jme3.bullet.PhysicsSpace.createPhysicsSpace(Native Method)
	at com.jme3.bullet.PhysicsSpace.create(PhysicsSpace.java:972)
	at com.jme3.bullet.CollisionSpace.<init>(CollisionSpace.java:144)
	at com.jme3.bullet.PhysicsSpace.<init>(PhysicsSpace.java:263)
	at com.jme3.bullet.BulletAppState.createPhysicsSpace(BulletAppState.java:638)
	at com.jme3.bullet.BulletAppState.startPhysics(BulletAppState.java:586)
	at com.jme3.bullet.BulletAppState.stateAttached(BulletAppState.java:813)
	at com.jme3.app.state.AppStateManager.attach(AppStateManager.java:133)
	at vast.engine.core.Core.<init>(Core.java:30)

Relevant source of Core.java:

public class Core extends SimpleApplication {
    private final BulletAppState bulletAppState;
    ...
    public Core() {
        bulletAppState = new BulletAppState();
        bulletAppState.setDebugEnabled(true);
        stateManager.attach(bulletAppState); // Error here
        ...
    }
}

If it helps, I was using the default jme3 build setup (Ant I guess?) and used the section of the tutorial for the jme3 sdk, and encountered this error on the next build. I googled real quick, saw this, and switched to gradle hoping it would fix the issue, but it did not.

Any help appreciated, thanks for your time

1 Like

To add some environment info:
Jmonkey SDK 3.2.4-stable
openjdk 1.8
windows 8.1 x86

Are you getting the following startup message in the Output window:

Libbulletjme version 9.2.2 initializing

or are you getting this one?

Bullet-Native: Initializing java classes

If you get the latter message, then your project has jme3-bullet-native among its Libraries. Remove it. Does that solve the trouble?

Not sure where that message would be, but currently I don’t see that anywhere in the output windows. It actually doesn’t show either one, but if the message pops up on running the project, it might be hard for me to see, all the build output gets cleared when the error occurs. Is there a setting to change that? Anyway, give me a min, I’ll see if I can catch that output or find a setting to preserve it

In the meantime, heres the full output of both available output windows:

Application:

Running on jMonkeyEngine 3.2-stable
 * Branch: HEAD
 * Git Hash: 8291d61
 * Build Date: 2019-07-27
LWJGL 2.9.3 context running on thread jME3 Main
 * Graphics Adapter: igdumdim32
 * Driver Version: 10.18.10.3643
 * Scaling Factor: 1
OpenGL Renderer Information
 * Vendor: Intel
 * Renderer: Intel(R) HD Graphics
 * OpenGL Version: 4.0.0 - Build 10.18.10.3643
 * GLSL Version: 4.00 - Build 10.18.10.3643
 * Profile: Compatibility
Driver claims that default framebuffer is not sRGB capable. Enabling anyway.
Audio Renderer Information
 * Device: OpenAL Soft
 * Vendor: OpenAL Community
 * Renderer: OpenAL Soft
 * Version: 1.1 ALSOFT 1.15.1
 * Supported channels: 64
 * ALC extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_DEDICATED ALC_EXT_disconnect ALC_EXT_EFX ALC_EXT_thread_local_context ALC_SOFT_loopback
 * AL extensions: AL_EXT_ALAW AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_LOKI_quadriphonic AL_SOFT_buffer_samples AL_SOFT_buffer_sub_data AL_SOFTX_deferred_updates AL_SOFT_direct_channels AL_SOFT_loop_points AL_SOFT_source_latency
Pausing audio device not supported.
Audio effect extension version: 1.0
Audio max auxiliary sends: 4
Returning hash code of content
Reading welcome page content from web failed!
https://wiki.jmonkeyengine.org/doku.php/sdk:welcome:3_1?do=export_xhtmlbody
Checking page id 0 vs stored id 0
Check vast.engine.test.Test1 against com.jme3.app.state.AppState

Run:

run:
Exception in thread "main" java.lang.UnsatisfiedLinkError: com.jme3.bullet.PhysicsSpace.createPhysicsSpace(FFFFFFI)J
	at com.jme3.bullet.PhysicsSpace.createPhysicsSpace(Native Method)
	at com.jme3.bullet.PhysicsSpace.create(PhysicsSpace.java:972)
	at com.jme3.bullet.CollisionSpace.<init>(CollisionSpace.java:144)
	at com.jme3.bullet.PhysicsSpace.<init>(PhysicsSpace.java:263)
	at com.jme3.bullet.BulletAppState.createPhysicsSpace(BulletAppState.java:638)
	at com.jme3.bullet.BulletAppState.startPhysics(BulletAppState.java:586)
	at com.jme3.bullet.BulletAppState.stateAttached(BulletAppState.java:813)
	at com.jme3.app.state.AppStateManager.attach(AppStateManager.java:133)
	at vast.engine.core.Core.<init>(Core.java:30)
	at vast.engine.test.Test1.main(Test1.java:30)
C:\Users\Jasmathan\AppData\Roaming\.jmonkeyplatform\v3.2.4-stable-sdk1\var\cache\executor-snippets\run.xml:53: Java returned: 1
BUILD FAILED (total time: 0 seconds)

To also add, when I added Minie, I had forgotten a bullet dll in the project root, but i have since deleted this and have the same problem. I have left the bullet dlls in the jmonkeyengine folder (the IDE folder in Program Files), should I remove those as well?

And also, I have scoured the settings and all, and can’t find any mention of loading bullet dll, either the native jme one or minie.
To be honest, I don’t really use IDE’s, I usually prefer sublime text and my terminal, and JME3 is my first time using an IDE for serious development (other than arduino IDE :stuck_out_tongue: ), so it could be very well my lack of experience with IDE’s. Is there any info I could provide to help get to the root of this problem?

Sorry if I’m spamming the thread, but I just found that I have JME core 3.2, and Minie project page says it requires 3.3. I found that 3.3 SDK isn’t ready, but the 3.3 libraries could be added to the 3.2 SDK, so I downloaded the 3.3 core jar, but I don’t know how to add it to the SDK. I’ll try to force it in there, but in the meantime, if there’s a tutorial to add the 3.3 core to the 3.2 SDK I would be very appreciative

If you do one 3.3, the other jme libraries must also be 3.3

Edit: Easier to use gradle and set a version variable for dependencies.

Edit: But then you lose all the cool sdk stuff.

1 Like

Gotcha, I know how to add libraries already (I already added Minie and Heart, as well as a few others), but I’m worried about breaking everything. I’d prefer to manage dependencies myself, I’ve already tried using gradle on this project and was only reminded of why I don’t use it :laughing: So, if I were inclined to upgrade everything to 3.3, is there a list of things that need replaced? Or is it more of remove everything 3.2 and replace it. Because I’ve already got the zip of 3.3, and the folder structure is different than what is in the jmonkeyplatform folder, and I’m not sure of how to approach it other than add everything in the 3.3 zip to the libs folder, which I guess means I have to remove everything 3.2 in there as well?

I am not sure how the 3.3 libraries would affect the 3.2 sdk as I use it only to manage assets in gradle projects.

l use the same sdk version, 3.2, but use apache netbeans and gradle to manage dependencies and run projects.

If @sgold is using 3.2 and says need 3.3 then I would think that it should work just replacing any 3.2 libraries you have listed under the libraries folder of the project.

Edit: To make it simple, add the 3.3 libraries globally, then just remove a 3.2 and add a 3.3 of the same jar. If the sdk barfs after changing them, just add the 3.2 libraries back to the project.

Gotcha. I’ll give it a try right now and let you know how it works out

The startup message should appear above the stack trace, in the same Output window where the stack trace appears.

There are older releases of Minie that you could use with JME v3.2.4 . The most recent release that’s compatible with JME v3.2.4 would be 1.6.0for32.

At runtime, if your application finds a Bullet DLL in the current directory, it will load that DLL instead of Minie’s. So you should definitely delete any old DLL every time you reconfigure your build.

To develop JME v3.3 applications using a v3.2 SDK, best practice is to install the Gradle Plugin and build the project using Gradle.

If you’re not familiar with Groovy, Gradle takes a while to learn. Unlike Ant, there’s no “Gradle project” template built into the SDK. However, there are dozens of existing open-source projects you could use a template. My recommendation would be to start with BasicGame-on-Gradle. Once you’ve got it working, edit the “gradle.build” file and start experimenting.

Since you’re not an SDK person, note that Gradle also works great from the command line. Most Gradle-built projects come with a wrapper, in which case the magic command (from Windows Command Prompt) is usually .\gradlew run

Gotcha, well theres no message in the trace so I’m at a loss haha. I’m currently adding 3.3 libraries to the sdk by hand, and am pretty deep in already and don’t feel right stopping now haha. I removed all the old bullet dlls in the project directory and the problem persists.
I’ll have to try out gradle when I get my linux machine fixed, windows give me enough headaches, I’d rather learn something new on a more comfortable OS

ok I’m lost now haha, I have successfully shoved 3.3 into the 3.2 sdk (confirmed with non-physics enabled tests), but when running I get the same error.

Try deleting the cache. Select help > about in sdk to see where it is.

Exit sdk, delete cache folder, restart sdk.

It will rebuild upon startup.

Just tried that, same error. Does the minie jar come with everything? Or is there a native library I’m missing? It seems like something is missing. Where is the compiled code for PhysicsSpace.createPhysicsSpace? it seems like I’m missing whatever library contains that

When I downloaded Minie, I just got the Minie-3.0.0.jar , should I have gotten a different one? like Minie-3.0.0+dp.jar?

3.0.0+dp didn’t fix it

Can you expand the libraries folder in the project tab and paste a screenshot via https://imgur.com/, drag or minimize the sceneexplorer window to show the libraries if you need more space.

A screenshot of the files tab for the project would be great also.

Edit out any info you dont want shown prior to posting to imgur.