[SOLVED] Exception in control, Scene content removed, ArrayIndexOutOfBoundsException

I get
Exception in control, Scene content removed, ArrayIndexOutOfBoundsException
in the SDK using latest stable version.

Added Animation control is the cause. The controls actions are visible in scene explorer after it removes the model. I don’t see how a model with 2 actions in the control can be out of bounds when that’s all there is from the start. Crashes the same with importing the blend file. There are no errors reported when exporting or importing.

The actions are for the lower half and upper half of an idle animation. The NLA editor in blender shows 2 actions with a empty <no action> above them but when looking at videos of exporting they also have that <no action> channel and it didn’t affect them.

The skeleton.xml file matches the bones that were moved including parenting.

There’s a sorta similar post about normal maps that generated a similar problem but doesn’t seem to of ever been resolved.

I tired baking the actions to the rig also, didn’t change anything.

Any ideas what could be the cause?

Signed,
Crash magnet.

1 Like

This happens to all models, even Sinbad and Oto which all worked in 3.1.2 SDK. 3.1.4 seems to have a problem.

Edit:
I am not sure what is causing it because all models cause the error whether they have any controls or none. There is no stack trace, nothing in logs, the model is just removed.

Well boys and girls after much effort some things are becoming more clear.

After trying every conceivable way I could to get the thing to work exporting ogre or importing blend files I decided to export it using FBX then converting it to blend then to j3o.

Conversion from FBX to blend shows

Running blender as converter for file C:/Users/Robert/Documents/JMonkey/Tutorial/Experiment/assets/Textures/Eve/Eve.fbx
found bundled python: C:\Program Files\jmonkeyplatform\blender\2.78\python
Info: Total files 0 | Changed 0 | Failed 0
FBX Import: start importing C:\Users\Robert\Documents\JMonkey\Tutorial\Experiment\assets\Textures\Eve\Eve.fbx
FBX version: 7400
	FBX import: Prepare...
		Done (0.000000 sec)
	FBX import: Templates...
		Done (0.000000 sec)
	FBX import: Nodes...
		Done (0.000000 sec)
	FBX import: Connections...
		Done (0.000000 sec)
	FBX import: Meshes...
		Done (0.062400 sec)
	FBX import: Materials & Textures...
		Done (0.000000 sec)
	FBX import: Cameras & Lamps...
		Done (0.000000 sec)
	FBX import: Objects & Armatures...
		Done (0.000000 sec)
	FBX import: ShapeKeys...
		Done (0.000000 sec)
	FBX import: Animations...
		Done (0.031200 sec)
	FBX import: Assign materials...
		Done (0.000000 sec)
	FBX import: Assign textures...
		Done (0.000000 sec)
	FBX import: Cycles z-offset workaround...
		Done (0.000000 sec)
	Done (0.171601 sec)
Import finished.
batch job finished, exiting
Blender quit
AL lib: (EE) UpdateDeviceParams: Failed to set 44100hz, got 48000hz instead

When converting from blend to j3o with a animation named Idle Lower , three errors show up,

First, a second animation appears and I don’t know where it is coming from.
Found animation: Armature|Armature|Idle Lower|Armature|Idle Lower.

Second,
Animation uses both euler and quaternion tracks for rotations. Quaternion rotation is applied. Make sure that this is what you wanted!

Yet the blender setting are Quaternion.

Third, 2 textures show up yet there’s only 1 material with a generated texture, ie diffuse.

Loading animations that will be later applied to scene features.
Found animation: Armature|Armature|Idle Lower|Armature|Idle Lower.
Found animation: Armature|Idle Lower|Idle Lower.
Animation uses both euler and quaternion tracks for rotations. Quaternion rotation is applied. Make sure that this is what you wanted!
Animation uses both euler and quaternion tracks for rotations. Quaternion rotation is applied. Make sure that this is what you wanted!
Loading model's textures.
Loading model's textures.
Loaded asset Eve
File Eve.blend saved successfully
Notified about change in AssetData properties for Eve
Eve listening for external changes on C:\Users\Robert\Documents\JMonkey\Tutorial\Experiment\assets\Textures\Eve\Eve.blend@6b86e00e:734d7014
Set original path for Eve to Textures/Eve/Eve.blend
Removing asset Textures/Eve/Eve.blend, from cache via main asset Eve.
Removing asset Common/MatDefs/Light/Lighting.j3md, from cache via main asset Eve.

Same animation with name changed to Idle Upper. The phantom animation name stays the same but the actual animation name does change.

Other erros are still there.

Loading animations that will be later applied to scene features.
Found animation: Armature|Armature|Idle Lower|Armature|Idle Lower.
Found animation: Armature|Idle Upper|Idle Upper.
Animation uses both euler and quaternion tracks for rotations. Quaternion rotation is applied. Make sure that this is what you wanted!
Animation uses both euler and quaternion tracks for rotations. Quaternion rotation is applied. Make sure that this is what you wanted!
Loading model's textures.
Loading model's textures.
Loaded asset Eve
File Eve.blend saved successfully
Notified about change in AssetData properties for Eve
Eve listening for external changes on C:\Users\Robert\Documents\JMonkey\Tutorial\Experiment\assets\Textures\Eve\Eve.blend@6b86e00e:4bcfed41
Set original path for Eve to Textures/Eve/Eve.blend
Removing asset Textures/Eve/Eve.blend, from cache via main asset Eve.
Removing asset Common/MatDefs/Light/Lighting.j3md, from cache via main asset Eve.

After restarting the SDK if the error appears the j3o will load into scene composer and the phantom animation is there along with the real animation, but neither will play. After deleting the phantom animation and renaming still doesn’t play.

If I open the converted blend file the Quaternions are set to Euler, the root Bone is freaking massive in scale, the models mesh is smaller than it should be and doesn’t match the rig. The NLA tracks are now dope sheet actions with keyframes and there’s a extra default material.

Edit: forgot to mention the phantom animation also shows up in the converted blend.

And here we are.

And success. Importing the model using the jme3 blend importer finally worked. All animations now play. Everything is named correctly, no error,

No freaking idea why.

Im sure this isn’t over yet.

Glad, you found a solution for your problem. I also have no idea what the problem might be here though, sorry.

I don’t know that it has anything at all to do with importing since any file opened in scene composer caused the same thing to happen. Even unrigged models. Restarting SDK temporarily fixed things. Wondering if its my drivers but they cant be updated.

I can’t understand what you all tried to do but basically the above is wrong. Have you tried 3.1-alpha2 vs 3.1-alpha4? Because Before 3.1-beta2 there were issues with animations, around ~alpha4 there was a bug which even broke all .j3os upon saving.

Apart from that you must not confuse the SDK itself with the blender importer. If you are uncertain about the sdk, you can always import blend files from your code. That being said, I can only recommend xbuf over ogre and possibly the blend importer (which has issues with animation).

One of these issues is that you have multiple AnimControls for each object even though they share the Armature in blender. That means the model will only animate if you press play for all of those animcontrols at the same time.

I thought 3.1 stable SDK used 3.1.4 beta as the jme3 version, is that correct?

I had no problems with 3.1.2 snapshot version.

There is no 3.1.4 beta engine version, we are currently on 3.1.0 and even there we stopped at 3.1.0-beta2.
The SDK 3.1.0-stable uses v3.1.0-stable (or v3.1.0-beta2) as engine version.
Specifically there is no 3.1.2 Snapshot Version

Ok let me put it this way.

Is 3.1-beta2-b001-SNAPSHOT SDK using a earlier version of the engine than jMonkeyEngine SDK 3.1.0 Stable?

This is what’s confusing me. In my mind, 3.1.beta2-b001 would be a later version than 3.1.0.

Yes it would, because 3.1-beta2-b001-SNAPSHOT actually means: 3.1-beta2 engine version (v3.1.0-beta2) and then build 1 for the sdk (since we sometimes have multiple sdk releases until there is a new engine version).

And as stated in the release notes for beta3 of the engine:
Cloning bug fixes, especially BitmapText-related and animation-related, so when you have no problems with stable but with beta2 that means that is “expected”.

Ok I see how it works.

In short, SDK stable will not work since it uses beta-2.

Thanks for clarification.

SDK stable uses JME 3.1 stable.

SDK 3.1 beta2 uses JME 3.1 beta2.

That’s kind of silly. 3.1.0 alpha, beta, etc… are working up to 3.1.0. There is no 3.1.0 until it goes through that process.

Well I have finally figured it out.

It was the Ogre script that came with the 3.1-beta2-b001-Snapshot SDK. It does not work with blender 2.78. I found an updated version and now everything works perfectly with no errors. All animations play. Beautiful error free exports.

The SDK blend importer works fine except for the fact the node naming isn’t the greatest. I think it was failing because the Ogre script was messing things up in the SDK.

The FBX converter is total shit. Worst of them all. Doesn’t properly convert 2.78b blend files and adds a lot of ghost objects as well as other things I mentioned above.

Glad this nightmare is over.

3 Likes

This will answer the next question.
https://jmonkeyengine.github.io/wiki/jme3/advanced/ogrecompatibility.html