[Bf-python] Re: Python script code crashes Blender 2.36 && CVS/HEAD (Linux; self-compiled gcc (GCC) 3.3.4)

Willian Padovani Germano wgermano at ig.com.br
Wed Feb 16 06:06:04 CET 2005


Hi,

Melchior FRANZ wrote:

>* Melchior FRANZ -- Sunday 13 February 2005 18:14:
>  
>
>>A run of the valgrind debugger (http://valgrind.kde.org/) shows a lot of potentially dangerous bugs in Blender/Python.
>>    
>>
>FWIW: I went through the long list of reported problems (only the reports, not the source code), and almost all of them are caused in the Python lib. The few "problems" in Blender don't look dramatic.
>
There are many places where initializing vars is not necessary, because 
they are required to be initialized by the PyArg_Parse*() functions or 
else the function returns with an error.  But there can be real problems 
still left there somewhere, of course.

And anyway, giving initial values might be worth to keep the valgrind 
report cleaner, so we should take a look there.  Thanks for the suggestion.

About the script problem, please update your cvs copy and try again, I 
guess it is fixed now.  It was related to another one intrr reported 
some months ago that ended up being this: if two scripts have the same 
name, it is not garanteed that the last executed one is the last in the 
linked list of running scripts, so that doesn't serve as a check to know 
which one to free when it ends.

Knowing when to free a script in Blender was a little tricky, some run 
and finish, gui ones leave callbacks, file selector ones leave a 
callback to the file selector but may also have left gui callbacks.  
Hopefully this was the last error to be found, thanks for catching it 
and for the nice sample script : ) and please tell us if the troubles 
are not gone yet.  I assume you forced an error in the file selector 
callback of  newacexporter.py, because I couldn't reproduce the problem 
with it.

-- 
Willian




More information about the Bf-python mailing list