[Bf-python] Memory bug in Bpy api
Ken Hughes
khughes at pacific.edu
Sun Jan 22 09:08:27 CET 2006
Bobby Parker wrote:
> Hi,
> I'm developing a script using the Python API, and I think I've found a
> nice memory bug.
Ok, I was finally able to get cgkit and aqsis installed, but wasn't able
to follow your instructions for setting up BtoR.py. I did put it in its
own directory, modified BtoR.py to append that dir to sys.path so
subsequent imports would find the other modules, and ran the script. I
got somewhat different results probably because of this.
1) with no reload removed, I get an error on the first script execution
inside the first call to master_gui(), when shader_draw() is called. It
dies in PyObject_Malloc.
2) if I remove all the reloads except reload(btor.ShaderEditorGui), I
can run the script, kill with ESC, about 4 times, then get an error in
PyObject_GC_UnTrack() called from PyDict_Clear() in BPY_clear_script().
This is where the script global dict is cleared.
3) if I remove all the reloads, everything works
4) if I just put a "return" in master_gui(), thing work OK for the
scripts in 1) and 2).
So it is related to the script callbacks executing and the reloads.
BTW, where the heck are the functions in master_gui() defined?
Ken
More information about the Bf-python
mailing list