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:



java.lang.OutOfMemoryError

at java.nio.Bits.reserveMemory(Bits.java:618)

at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:95)

at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:285)

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(MyTestMd2.java:72)

at com.jme.app.SimpleGame.update(Unknown Source)

at com.jme.app.BaseGame.start(Unknown Source)

at myJmeTest.MyTestMd2.main(MyTestMd2.java:68)

30.05.2004 23:17:53 com.jme.app.SimpleGame 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



regards

Martin

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