WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-25-2009, 10:29 AM
hosier hosier is offline
Member
 
Join Date: Feb 2007
Posts: 31
Change model alpha and memory leak

In the project I'm working on, I change the alpha of a model so that another model can stand out when we want to focus on that. I never noticed it at first, but once I do that, the memory usage of winviz starts growing and I'm not sure if it ever stops. My program grew from 180M to over 800M before I finally quit it.

In trying to figure out the problem, I reduced it down to a simple load model and then change alpha when you hit the a key program, and have tried this with both a lightwave and 3DS model, getting the same results. My simple test program is:
Code:
import viz
viz.go()
viz.window.setSize(1024,768)

# change view position if the lightwave model is used
#viz.MainView.setPosition(4,0,0)
#viz.MainView.setEuler(-90,0,0)

#model = viz.add('test_object.lwo')
model = viz.add('learjet35a.3ds')

def mykeyboard(key):
	global model

	if key == 'a':
		model.alpha(0.5)

viz.callback(viz.KEYBOARD_EVENT,mykeyboard)
It starts out at about 21 to 22 MB, but as soon as you hit the a key to change the alpha, it starts climbing. It grew about 1M every minute.

At first I thought it was my lightwave model, but when I tried a 3DS model I've been playing around with, it did the same thing.

Has anybody seen this before? Should I be doing this differently? It it a bug somewhere?

Any help would be appreciated.

I've attached a zipfile that has the two models I've tried along with the above vizard script.

Thanks.

Aaron
Attached Files
File Type: zip alpha-problem.zip (528.8 KB, 596 views)
Reply With Quote
  #2  
Old 06-25-2009, 10:42 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
I've seen memory leaks like this before. They are usually caused by a bug in the graphics driver. Try updating your drivers to see if it solves the memory leak problem. I ran your sample script on my machine and there was no memory leak.
Reply With Quote
  #3  
Old 06-25-2009, 11:55 AM
hosier hosier is offline
Member
 
Join Date: Feb 2007
Posts: 31
Well, I just downloaded the newest driver which is from last week, but it still does it.

So, I grabbed a laptop I had and tried it out there, and no problems. Then I tried it out on another computer we're in the process of configuring, and again no problems.

I'm chalking this one up to something strange with my computer. I'm running XP with the latest patches and a Quadro 4600. The laptop is running XP, hasn't been patched in a while and has an Intel chipset. The other computer I tried is an up to date patched XP box with 2 Quadro 3700 cards. With this variety of hardware, it has to be something with my PC, so I'm not going to worry too much about it for now.

Thanks.

Aaron
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:03 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC