Blender/Python --> Mem-Eater!!!

hello,

since several days i’ve been building a nearly realistic moving tank-track with several functions to animate it.

(it is based on the tank track tutorial found via the blender website.)

but now i have some trouble with a python script, i needed to program, to copy the values of the control points of one “master”-curve to 73 other curves. i did this, because i do not want to modify and key all these 73 curves manually to deform the whole track.

the main code is the following:


####################################
# MAIN DOING                       #
####################################
dst_obj = Blender.link
src_curve = Curve.Get('Kette_Ctrl.L')
dst_curve = dst_obj.getData()
pts = src_curve.getNumPoints()

for p in range(0, pts):
	src_pt = src_curve.getControlPoint(0, p)
	dst_curve.setControlPoint(0, p, src_pt)
		
dst_curve.update()

this code is linked to the 73 curve-objects by each 2 object script links, once of type “FrameChange” and the other of type “Redraw”.

When I now activate the Script links and do some editing, frame changing, or - much more “evil” - some anim-preview with ALT-AKEY, logically the scripts are called again and again and again and…

BUT: now Blender turns into a memory-eating monster!!!
it needs round about 10 to 15 seconds to eat the rest oft 800 MB of my 1 GB of RAM. and if i let it continue, some seconds later my swap-file is full with 1,85 GB of data-garbage!!!
and the baddest thing is, how long ever i wait, the memory is not been freed!!!
(same problem comes up even on rendering the animation, but it is not quite as bad!)

now i think of at least 2 alternatives:

  1. there is a bug in Blender with the Scripting module - or
  2. i’ve made a mistake and perhaps i have to free memory myself. but i do not know how to do in python

now i ask for help!!!
perhaps there is someone here, who is able to give me advice!

Thanks in advance!

FastEddy - Germany

perhaps i should tell my config:
im using Blender 2.37a on AMD Athlon 64 3500+ with 1 GB RAM and Windows XP (SP1) - sorry, i’d like to use Linux, but then my video-editor would not be usable anymore! :-?

the scene-file (please, do not copy or distribute) can be found as zip under:
http://fasteddy.fa.ohost.de/download/Kettenlaufwerk_komplett_PAK.zip

Memory eating is usually linked to a memory leak somewhere in the code. Post this to the mailing list or submit it as a bug report.

also see if you can get a python 2.4 build from cvs for your platform [windows?] to see if it is a bug in python, not blender

i’ve got python 2.4.1 from python.org installed.

just in this moment the download of 2.4.2 (final) finished. I’ll try this out now, but if the error stays, i’ll post it in the developers’ forum and bug-tracker.

minutes ago i’ve tested it with and without installed python 2.4.2 and a newly installed blender on a second computer. it seems to be a bug - i’ll go for bugtracker.