[solved] glGetBufferSubData only spits out zeroes

This method will only return and print zeroes. The FloatBuffer is filling up though, but with zeroes. What am I doing wrong?

public void getVertices(int offset, int length, float[] container) {
		GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, positionVboID);
		FloatBuffer buffer = BufferUtils.newFloatBuffer(length);
		GL15.glGetBufferSubData(GL15.GL_ARRAY_BUFFER, offset*4, buffer);
		GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, 0);
		System.out.println(buffer.toString());
		for (int i = 0; i < buffer.capacity(); i++) {
			System.out.println(i+":"+buffer.get(i));
		}	
		buffer.get(container, 0, length);
}

After some debugging I found out that OpenGL throws an invalid value error. According to the OpenGL docs, this happens when [quote]GL_INVALID_VALUE is generated if offset or size is negative, or if offset+size is greater than the value of GL_BUFFER_SIZE for the buffer object
[/quote]
I can’t see how this is possible…

It appears I specified a length greater than the buffer. Oops. My bad.