How to monitor the number of the textures in real time?

Software: Away3D 4.x

Kicker, Member
Posted: 29 August 2016 05:14 PM   Total Posts: 52

Hello,

I seem to have some memory issues in my game, as this happens after playing for roughly 5 minutes:
https://i.imgur.com/pM7EHy2.png

Now, I don’t really understand why it happens, because pretty much everything in my game comes from a pool, so I almost never dispose anything, and I almost never create anything…

So obviously, I must have forgotten something, but to find out what it is, I’d need to monitor the memory, and most importantly the number of textures stored by Away3D, and the memory occupied by those textures…

I tried AwayStats, but there’s nothing about textures in there… so it’s pretty much useless to me :/
I already use Scout, but it doesn’t provide much detail…

Any idea?

Thanks in advance smile

   

Avatar
Fabrice Closier, Administrator
Posted: 29 August 2016 05:52 PM   Total Posts: 1265   [ # 1 ]

Hard to tell from a pict, and while it breaks when it wants to upload the texture, is it really the textures?
I wonder do you manipulate geometries, like composing/merging, adding vertices or generating subGeometries etc.. into your game?

To be sure about the textures, simply comment the material.texture.bitmapData=some new map; or
use bitmaptexture.dispose, null it, then assign a new one to the material.

   

Kicker, Member
Posted: 29 August 2016 05:58 PM   Total Posts: 52   [ # 2 ]

I load AWD2 files and keep the loaded object as a model.
When the pool is empty, I create a new Mesh like that:
var new_mesh:Mesh = new Mesh(model_mesh.geometry, model_mesh.material);
Then, when I don’t need it anymore, I add it to the pool…

I never do any deep manipulation with geometries and textures. Everything stays high-level.

   

Kicker, Member
Posted: 29 August 2016 06:18 PM   Total Posts: 52   [ # 3 ]

Anyway, the only way for me to be absolutely sure of what’s happening is to monitor the allocations in real time. Is there any way that I can do that?

   

Tempy111, Sr. Member
Posted: 30 August 2016 07:56 AM   Total Posts: 133   [ # 4 ]

from what I can see, there IS a creation line linked up to the onEnterFrame code or something like that.. hard to tell but what is going on inside the enterframe.. I don’t think it’s only a render command but it might be.. as you can see from that error, (work from the bottom up) there is a render command, that is leading to a bunch more which at the top is using to createTexture command.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X