MD2 Animations Out of memory error?

I tried to switch the md2 loader test app from dr. freak to the standard q2 players ( …/baseq2/players/male/tris.md2 ) + convertet the pcx textures to jpg and it worked partially.

After playing back some animations the app dies with an out of memory error like this:


at java.nio.Bits.reserveMemory(

at java.nio.DirectByteBuffer.<init>(

at java.nio.ByteBuffer.allocateDirect(

at com.jme.scene.Geometry.updateVertexBuffer(Unknown Source)

at com.jme.animation.VertexKeyframeController.update(Unknown Source)

at com.jme.scene.Spatial.updateWorldData(Unknown Source)

at com.jme.scene.Node.updateWorldData(Unknown Source)

at myJmeTest.MyTestMd2.simpleUpdate(

at Source)

at Source)

at myJmeTest.MyTestMd2.main(

30.05.2004 23:17:53 cleanup

but the md2 is smaller than dr. freak ??

i gave the vm 64-128 megs but as this is nio i suspect this problem should not be in the vm at all ?

i’m running on linux btw



Uh oh, not good. I’ll look into it.

just to mention, i get the same error with dr. freak

i’m using up to date CVS

MD2 models are eating up quite a bit of memory right now (a seperate model is being built for each keyframe). So, while we look into possible changes, I would suggest giving your jvm as much memory as possible. (I was getting out of memorys to until I gave 256Meg to the JVM).

-Xms256m -Xmx256m