[Solved] Framebuffer error

=== OpenGL FBO State ===
Context doublebuffered? false
FBO ID: 225
Is proper? true
Is bound to draw? true
Is bound to read? true
Draw buffer: GL_COLOR_ATTACHMENT0
Read buffer: GL_COLOR_ATTACHMENT0
== Renderbuffer Depth ==
RB ID: -1
Nov 14, 2016 10:18:13 PM com.jme3.renderer.lwjgl.LwjglRenderer setFrameBuffer
SEVERE: === jMonkeyEngine FBO State ===
FrameBuffer[format=1024x1024x1, drawBuf=0]
Depth => TextureTarget[format=Depth16]
Color(0) => TextureTarget[format=RGBA8]

Is proper? false
Type: Texture
== Renderbuffer Color0 ==
RB ID: -1
Is proper? false
Type: Texture

It occurs when I ‘rebuild’ the scene several times.
Last thing I can see on my call stack is
_renderManager.getRenderer().setFrameBuffer(_shadowFB[shadowMapIndex]);

Any idea where to dig? I use JME 3.0.

EDIT:

Exception:
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.IllegalStateException: Framebuffer has erronous attachment.
at com.jme3.renderer.lwjgl.LwjglRenderer.checkFrameBufferError(LwjglRenderer.java:1323)
at com.jme3.renderer.lwjgl.LwjglRenderer.setFrameBuffer(LwjglRenderer.java:1602)

Solved, close.

Solved in a way that might help someone else if they run into the same issue?

That error was caused by insufficient native memory…
…which was caused by: vertex’s buffers not freed after destroying the gamescene
…which was caused by: geometries2 of GeometryList wasn’t cleared by clear()

And there was about 60 shadow renderers, everyone with its own list, plus RenderQueue containing few more lists.
Solved it by creating my own GeometryList, which derives from JME’s list, got access to geometries2 using reflections. I replaced RenderQueue’s lists with them using reflection too.

Now, tracing the native buffers I see that everything is ok, Switching between game levels (every time level needs to be destroyed and new one is created) does not increase native memory usage anymore.

I’m aware that the latest version of JME does not have geometries2 inside GeometryList.

1 Like