I've got a fairly simple VPython application that uses Tk Scale
widgets to control the layout of a simple array of VPython spheres.
It works OK, except that the whole application hangs in some cases.
I'm looking for clues as to how I can fix that.
The program works such that there are Tk scale/slider widgets that
control the width and height of a displayed array of VPython spheres.
The program reuses a pool of sphere objects, setting spheres to
invisible when they're not needed. The display responds to manual
changes to the sliders for a while, but eventually hangs when I move a
slider to decrease the array width or height. It looks as though it
gets stuck at the point where X.visible is set to zero for some sphere
X. By hanging, I mean that both the Tk and VPython windows stop
responding to any mouse actions, and the main loop in the VPython
thread stops cycling. If I comment-out the line that sets .visible,
the program never seems to hang (but also doesn't display the objects
correctly).
Although my program uses a separate thread for the VPython animation,
it looks like that might be unnecessary for this case. If I
comment-out the line that start the thread, everything works the same.
I'm using the 2001-02-27 release of VPython on WinNT. My program is
temporarily available at <http://ontosys.com/src/residue.py>.
--
Fred Yankowski fr...@On... tel: +1.630.879.1312
Principal Consultant www.OntoSys.com fax: +1.630.879.1370
OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA
|