LWGJL renderer throws an exception when using vm option -ea (enable assertions)

Hey guys, :slight_smile:
it seems like the LWGJL renderer throws the following exception when using the VM option -ea (under Project → Properties → Run → VM Options).

Schwerwiegend: Uncaught exception thrown in Thread[LWJGL Renderer Thread,6,main] java.lang.AssertionError at com.jme3.util.NativeObjectManager.deleteNativeObject(NativeObjectManager.java:136) at com.jme3.util.NativeObjectManager.deleteUnused(NativeObjectManager.java:183) at com.jme3.renderer.lwjgl.LwjglRenderer.onFrame(LwjglRenderer.java:759) at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:187) at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:185) at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:228) at java.lang.Thread.run(Thread.java:722)

I think the jME forum is the wrong place to hint this, but I don’t really know where to tell the lwjgl guys.

Yours, destro :slight_smile:

Yupp, I’ve been hitting this also.

This is usually a sign of invalid deleted objects.
As I run my stuff onyl with -ea I cannot confirm that this happens in normal operations.
Are you by any chance manually disposing native stuff?

@Empire Phoenix said: This is usually a sign of invalid deleted objects. As I run my stuff onyl with -ea I cannot confirm that this happens in normal operations. Are you by any chance manually disposing native stuff?

Err… Only with -ea?? No wonder you had issues with jbullet performance ^^

@destroflyer said: I think the jME forum is the wrong place to hint this, but I don't really know where to tell the lwjgl guys.
No that's the right place this assertion is in our code.

Any updates on this? :slight_smile: Although asserts are not really necessary, they might help a lot in terms of testing and bugfixing.

Nope, as long as you don’t dispose anything yourself it’s not triggerd tho.
Not a good solution :confused: as it might waste tons of ram that way.

in terms of testing and bugfixing.

Which version are you using? In the master branch line 136 doesn’t correspond to any assertion. There were two fixes made to that class since when line 136 was associated with the assertion.

I’m stil using the stable jME3.0 RC2.

Is that over a year old? I forget what version we are on nowadays lol. I reported this a while ago, and momoko_fan fixed it. It was to do with the new dispose() methods or something.