Mem Problem, LWJGL related?

http://www.sysinternals.com/ntw2k/freeware/procexp.shtml



This may be helpful.

great, that looks useful

I hardly think this is LWJGL related. It might be NIO related though - hard to see without the source…

Could you share the source so I can debug the stuff?

what version of LWJGL is used?

Ok, more info… the problem IS there in win2k, just that task manager reports memory numbers on the java task that are more in line with what java is reporting. I can tell the problem is there though by watching overall mem and swap file usage grow about 10MB per second until it’s consuming a GB of mem (at which point my system becomes unusable.) So not just a winxp thing.



I went to the far right of the terrain and still had the issue (ie, no particles, no trees and no zombies, just the character and the terrain.) Also, I tried the above suggested tool… It doesn’t seem to list memory usage, but I did notice a ton of attached notification Event references. Dunno if that’s normal.



fyi, we’re using the released .9 version of LWJGL.

renanse, if you keep going to the right, the terrain goes away too, so it would be just the player.



Matzon, nothing special is there, absolutely nothing, nada, zero. Im basically loading via XML (which we have a test of), adding some terrain (which we have a test of too), adding the particle system if needed via the xml level (we have a test for that too).



Matzon, could you please explain it to me what it means for org.lwjgl.OpenGL.OutOfMemory to be thrown before java.lang.OutOfMemory ? im baffeled.



<edit> PS. Im using java 1.4.2_04, i dont think this has NIO issues…does it?

Remove as many things as you can, until the mem leak goes away. If you can post a simple testprogram source that has the memory leak, we could debug it for you.

ok, :// , its my fault. Il just shut up and tell you what to do and what not to do.



DONT:


float health = ((Float) player.getProperty("Health")).floatValue();
boolean update = healthMeter.setValue((int) health);
if (update == true) {
  healthTexture.setTextureId(0);
}



DO:


float health = ((Float) player.getProperty("Health")).floatValue();
boolean update = healthMeter.setValue((int) health);
if (update == true) {
  healthTextureState.delete(0);
}



I was forcing the texture back into the card every update.

Im just gonna go into a room and hang my head in shame.
Soz for making you go on a wild chicken hunt.

DP ://