ryerrabelli / jmonkeyengine

Automatically exported from code.google.com/p/jmonkeyengine
0 stars 0 forks source link

Assertion fails due to BitmapTextPage buffer initialization #387

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
In BitmapTextPage.java, line 78 (for todays nightly), there is the following 
code:

        // initialize buffers
        Mesh m = getMesh();
        m.setBuffer(Type.Position, 3, new float[0]);
        m.setBuffer(Type.TexCoord, 2, new float[0]);
        m.setBuffer(Type.Color, 4, new byte[0]);
        m.setBuffer(Type.Index, 3, new short[0]);

At least on MacOSX with assertions enabled, that new float[0] causes an 
assertion in java.nio.DirectBuffer to throw, because system is trying to create 
a buffer of size 0, and the returned address for that is 0, so the assertion 
will fail.

Original issue reported on code.google.com by arcn...@gmail.com on 17 Aug 2011 at 8:54

GoogleCodeExporter commented 8 years ago

Original comment by normen667 on 26 Aug 2011 at 10:12

GoogleCodeExporter commented 8 years ago

Original comment by normen667 on 26 Aug 2011 at 10:13

GoogleCodeExporter commented 8 years ago

Original comment by ShadowIs...@gmail.com on 6 Sep 2012 at 6:09