Issues with building SkyControl

@8Keep123, I’ve started a new topic to address the issues you’re having with SkyControl.

The symptom you’re seeing (no lwjgl in java.library.path) is a familiar one, but I don’t know the exact cause.

If I were to send you a zipfile containing all the JAR files used in my game, do you think could you figure out how to incorporate them into your project? I suspect that would resolve the issue.

2 Likes

Thanks. That would be great!

All of the results I got on google were for applets, which is apparently fixed by using the sdk applet settings. But I don’t know what is happening, because the native libraries should still be good.

I do see that you are importing org.lwjgl.Sys; in both Bats main class and AssetProcessor, for use in the lwjgl version call: Sys.getVersion(). I figured thats just for debugging or testing purposes, so I took out the import statement and the calls. Running AssetProcessor then gave me this error: No loader registered for type “blend”:

[java]run:
Nov 24, 2013 7:41:21 PM com.jme3.app.Application handleError
SEVERE: Uncaught exception thrown in Thread[Headless Application Thread,5,main]
java.lang.IllegalStateException: No loader registered for type “blend”
at com.jme3.asset.ImplHandler.aquireLoader(ImplHandler.java:198)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:271)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:374)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:378)
at bats.AssetProcessor.processModel(AssetProcessor.java:198)
at bats.AssetProcessor.processModelFolder(AssetProcessor.java:215)
at bats.AssetProcessor.processBlockModels(AssetProcessor.java:157)
at bats.AssetProcessor.simpleInitApp(AssetProcessor.java:139)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:226)
at com.jme3.system.NullContext.initInThread(NullContext.java:84)
at com.jme3.system.NullContext.run(NullContext.java:127)
at java.lang.Thread.run(Thread.java:722)

BUILD SUCCESSFUL (total time: 17 seconds)[/java]

This means the blender loading library was not added. I added the jme3-libraries-blender library to the project. I then got an error:

[java]Nov 24, 2013 7:43:52 PM com.jme3.app.Application handleError
SEVERE: Uncaught exception thrown in Thread[Headless Application Thread,5,main]
com.jme3.asset.AssetLoadException: An exception has occured while loading asset: Models/units/bob/bob.blend
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:290)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:374)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:378)
at bats.AssetProcessor.processModel(AssetProcessor.java:198)
at bats.AssetProcessor.processUnitModels(AssetProcessor.java:275)
at bats.AssetProcessor.simpleInitApp(AssetProcessor.java:143)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:226)
at com.jme3.system.NullContext.initInThread(NullContext.java:84)
at com.jme3.system.NullContext.run(NullContext.java:127)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.io.IOException: Unexpected importer exception occured: Index: 1794, Size: 1772
at com.jme3.scene.plugins.blender.BlenderModelLoader.load(BlenderModelLoader.java:100)
at com.jme3.scene.plugins.blender.BlenderModelLoader.load(BlenderModelLoader.java:56)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:288)
… 9 more
Caused by: java.lang.IndexOutOfBoundsException: Index: 1794, Size: 1772
at java.util.ArrayList.rangeCheck(ArrayList.java:604)
at java.util.ArrayList.get(ArrayList.java:382)
at com.jme3.scene.plugins.blender.meshes.MeshBuilder.appendFace(MeshBuilder.java:199)
at com.jme3.scene.plugins.blender.meshes.MeshHelper.readBMesh(MeshHelper.java:378)
at com.jme3.scene.plugins.blender.meshes.MeshHelper.toMesh(MeshHelper.java:128)
at com.jme3.scene.plugins.blender.objects.ObjectHelper.toObject(ObjectHelper.java:160)
at com.jme3.scene.plugins.blender.BlenderModelLoader.load(BlenderModelLoader.java:70)
… 11 more

BUILD SUCCESSFUL (total time: 12 seconds)[/java]

Ehhh… Something wrong with the model? IndexOutOfBoundsException. Don’t know where to go from here.

Oh and for some reason the skytest works fine, and it has the import and lwjgl version call. (Possibly) disregard what I said above…

If you run your app and are missing the natives then maybe your app does not include the natives jar.

@pspeed said: If you run your app and are missing the natives then maybe your app does not include the natives jar.

It does though

If you create your own projects then it works?

I tend to work with bleeding-edge libraries (3.x) due to some bugs in the 3.0.x line. As I result, my code is not 100% compatible with 3.0.4.

I’ve uploaded known-good JARs to my dropbox: jars.zip

Linking to those JARs will hopefully clear up any remaining issues. If not, I’m here for ya!

1 Like

I’ve moved the utilities package (including SkyControl) to a separate Google Code project, which includes pre-compiled JAR files jME3-utilities.jar and jME3-utilities-assets.jar.

New build directions coming soon.

1 Like

I’ve moved the utilities package (including SkyControl) to a separate Google Code project, which provides pre-compiled JAR files, including jME3-utilities.jar and jME3-utilities-assets.jar.

New build instructions coming soon.

2 Likes

Thanks. This is super helpful!

1 Like

By the way, it turned out that the “no lwjgl in java.library.path” error message was a bit misleading. It actually seems to be triggered by missing DLLs: lwjgl64.dll and OpenAL64.dll

It goes against the grain to add DLLs to a source-code repository, but that’s what I’ve done. If there’s a better way to ensure that a JME3 project includes these DLLs – or to work around the dependency in some other way – I’m interested in hearing about it.

Do you use awt panels or start the app in any strange way? Because the natives / dlls normally get extracted when the application is run.

@normen, as far as I know I’m not using awt panels. I start the app from the IDE using either the “Run Main Project” button in the toolbar or else the “Run” option after selecting the project in the Projects window.

I mean how you initialize the application, like your code.

@normen said: I mean how you initialize the application, like your code.

My code includes several classes with a main() method, each of which extends SimpleApplication. main() invokes start() in the usual way.

Perhaps the oddest thing I’m doing is enumeratng individual JARs (such as “jME3-effects.jar”) in my classpath rather than the global libraries “jme3” and “jme3-libraries”.

Is the DLL extraction code located in a JAR? If so, which one?

oO why do you have multiple SimpleApplications?

@normen said: oO why do you have multiple SimpleApplications?
Unit testing.

Another odd thing I was doing was invoking org.lwjgl.Sys.getVersion() prior to com.jme3.app.SimpleApplication.start(). When I change the order so that start() invokes getVersion(), my app seems to start normally.

Bottom link: I seem to have found a workaround.

@sgold said: Another odd thing I was doing was invoking org.lwjgl.Sys.getVersion() prior to com.jme3.app.SimpleApplication.start(). When I change the order so that start() invokes getVersion(), my app seems to start normally.

Bottom link: I seem to have found a workaround.

Yeah, I think that’s because you were trying to access the lwjgl DLL before the system had extracted it. Natives extraction happens as part of app startup.

1 Like