[Papervision3D] Extra models being created? Unexplained memory behavior.
Leroy743
bspero at gmail.com
Tue Jan 6 08:53:24 PST 2009
I have been doing some more work on this, and narrowed down the issue a bit
more. This anomaly seems to occur when I create a sphere or cylinder. If I
load in all my stuff, the material, create a viewport, etc, but never create
an object, then the amount of memory use is consistent. I can watch it
continue to rise when I load, and drop when I unload the ViewPort, etc.
However, if I create a Sphere or Cylinder (the two I am using for my project
- it may be the same on others) then the memory use will sometimes rise by
twice as much as it should. I can't find any pattern here. So - if my
application is using 25MB of memory, and I load my scene, it will do one of
two things.
1. Rise to 35MB while the scene is being loaded and then drop to 30MB. When
I unload the scene, I will watch it drop back to it's pre-scene level of
25MB.
2. Rise to 40MB while the scene is being loaded, and then drop to 35MB. When
I unload the scene, it only drops back to 30MB.
This is suggesting that occasionally, something else is eating the memory,
and this thing does not get destroyed when I remove my scene. If I create my
cylinder, and never add it to the scene, then the memory seems to work ok.
But, if I add it, how much memory it takes up seems to be the variable. I
created a small application with all the extra things I do stripped out, and
this still occurs - even if I load the same MovieMaterial graphic, it will
respond differently...
Leroy743 wrote:
>
> Here is my situation,
> I have a program which allows people to enter rooms of a building.
> When you enter, a cylinder is created and a panorama of the room is mapped
> onto it, giving it a VR feel. The camera is in the middle of these
> cylinders, and you can drag the shape around, so it appears as if you are
> looking around the room. There are some hotspots that you can click on as
> well, but they do not seem to affect the issue that I am having. I removed
> them and there was no change in the behavior. Watching the memory on my
> system, when you go into a room, sometimes the room will take up 10 MB,
> and sometimes it will take up 15MB. When it takes up 10, and you leave the
> room, then the memory usage drops by 10MBs, no problem. When the room
> takes up 15MB, leaving also makes the usage drop by 10MB, leaving an extra
> 5MB - which builds up over time. The memory usage is extremely
> inconsistent, as sometimes entering the same room will cause this issue,
> and other times not. I am trying to determine if perhaps the MovieMaterial
> is being loaded twice or something, but my cleanup script should do the
> job in this case anyways, as it cycles through and removes all children,
> etc. Also, this is not consistent, so I can't seem to duplicate it
> reliably in any way, which really has me stumped.
> The whole program runs on a local system, so there is no loading time,
> etc. I am wondering if my script moves on before something is completely
> finished loading into the papervision object, but no matter what I change,
> the program responds the same. What bothers me most is that this seems
> random - with no repeatable actions to trigger the larger memory usage.
> What would cause sometime to only work sometimes? Just looking for any
> ideas. I can post some code, but the project is pretty large, so it might
> not make total sense without all the classes, etc. Thanks for any
> thoughts...
>
> - B
>
--
View this message in context: http://www.nabble.com/Extra-models-being-created--Unexplained-memory-behavior.-tp21301008p21314232.html
Sent from the Papervision3D mailing list archive at Nabble.com.
More information about the Papervision3D
mailing list