Skip to main content

Evolver Avatar OutOfMemoryError

2 replies [Last post]
tom01278
Offline
Joined: 2009-08-28

If we dragndrop an evolver avatar when there are already about 8 in-world, we get an OutOfMemoryError exception, and the avatar does not load.
(This is with old evolver avatars, haven't tried with multiple new ones yet)
Is there a reason for this? Or does memory actually limit us to only having less than ten different avatars in-world?

12-Feb-2010 17:01:06 org.jdesktop.wonderland.modules.evolver.client.jme.importer.EvolverContentImporter importFile<br />
WARNING: Importing Evolver avatar file studentnurse.eva<br />
12-Feb-2010 17:01:06 org.jdesktop.wonderland.modules.evolver.client.jme.importer.EvolverContentImporter importFile<br />
WARNING: Found avatar with named nursewu5<br />
12-Feb-2010 17:01:06 org.jdesktop.wonderland.modules.webdav.common.WebdavContentCollection getChild<br />
WARNING: In path /evolver/nursewu5 element evolver not found<br />
12-Feb-2010 17:01:06 org.jdesktop.wonderland.modules.evolver.client.jme.importer.EvolverContentImporter importFile<br />
WARNING: Adding avatar named nursewu5 into the system.<br />
Exception in thread "Thread-81" java.lang.OutOfMemoryError: Direct buffer memory<br />
	at java.nio.Bits.reserveMemory(Unknown Source)<br />
	at java.nio.DirectByteBuffer.(Unknown Source)<br />
	at java.nio.ByteBuffer.allocateDirect(Unknown Source)<br />
	at com.jme.util.geom.BufferUtils.createByteBuffer(BufferUtils.java:888)<br />
	at com.jme.util.TextureManager.loadImage(TextureManager.java:686)<br />
	at com.jme.util.TextureManager.loadImage(TextureManager.java:535)<br />
	at com.jme.util.TextureManager.loadImage(TextureManager.java:493)<br />
	at com.jme.util.TextureManager.loadImage(TextureManager.java:467)<br />
	at com.jme.util.TextureManager.loadTexture(TextureManager.java:355)<br />
	at com.jme.util.TextureManager.loadTexture(TextureManager.java:316)<br />
	at com.jme.util.TextureManager.loadTexture(TextureManager.java:237)<br />
	at com.jme.util.TextureManager.loadTexture(TextureManager.java:222)<br />
	at org.jdesktop.wonderland.modules.avatarbase.client.jme.cellrenderer.WonderlandAvatarCache.loadTexture(WonderlandAvatarCache.java:245)<br />
	at imi.repository.Repository.loadTexture(Repository.java:367)<br />
	at imi.scene.polygonmodel.TextureMaterialProperties.loadTexture(TextureMaterialProperties.java:114)<br />
	at imi.scene.polygonmodel.PPolygonMeshInstance.applyMaterial(PPolygonMeshInstance.java:255)<br />
	at imi.character.Character.finalizeInitialization(Character.java:1520)<br />
	at imi.character.avatar.Avatar.finalizeInitialization(Avatar.java:297)<br />
	at imi.character.Character.commonConstructionCode(Character.java:1406)<br />
	at imi.character.Character.(Character.java:2445)<br />
	at imi.character.avatar.Avatar.(Avatar.java:63)<br />
	at imi.character.avatar.Avatar$AvatarBuilder.build(Avatar.java:119)<br />
	at org.jdesktop.wonderland.modules.evolver.client.evolver.EvolverAvatarConfigManager.createAvatar(EvolverAvatarConfigManager.java:460)<br />
	at org.jdesktop.wonderland.modules.evolver.client.jme.importer.EvolverContentImporter.importFile(EvolverContentImporter.java:142)<br />
	at org.jdesktop.wonderland.client.jme.dnd.FileListDataFlavorHandler$1.run(FileListDataFlavorHandler.java:115)<br />

Thanks,
Tom

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
shawnkendall
Offline
Joined: 2003-06-10

The exception is happening on texture loading, so I'd imagine that this is due to the Evolver models using their own unique textures. A scalable system needs to share as much assets (meshes, textures and animation data) as possible to keep memory use low as possible.

You can either shrink the textures, or bump up the memory barrier for the JVM to get more free memory.

tom01278
Offline
Joined: 2009-08-28

Thought it might have something to do with the huge textures :) I'll knock them down to 512 for our next test.
You're right that assets should be shared, at the moment if 5 people have the same evolver avatar, it seems to be kept 5 times, rather than 1.
Is there a way around that, do you know?
Thanks,
Tom