[Bf-committers] BPY instability in trunk

Benoit Bolsee benoit.bolsee at online.be
Tue Apr 14 21:53:54 CEST 2009


Trunk is unstable at the moment.
 
To get Blender to crash it's really easy: just start it with default
scene, take any button with numeric input (for instance PassIndex in the
object buttons), click on it as to enter a numeric value on the
keyboard, then quick blender. You will get an assert in Py_Finalize()
with the message "gc->gc.gc_refs != 0" in file
"f:\blender\development\python-2.5.2\python-2.5.2\python-2.5.2\modules\g
cmodule.c""
 
The problem is related to recent Campbell fixes about reference count.
More specifically, the assert will occur as soon as the function
BPY_button_eval() function is executed at least once, which is the case
when you enter numeric value on the keyboard.
 
I already identified a bug in the funciton setup_armature_weakrefs() :
 
    if( weakreflink != NULL ) {
        PyDict_DelItemString(maindict,list_name);
        Py_XDECREF( weakreflink );  --> bug, should be removed. cause
immediate crash on the second keyboard numeric input
    }
 
This code is old but became buggy since Campbell decremented (rightly)
the ref count after insertion of the list in the main dictionnary a few
lines further down.
 
I'm not familiar enough with BPY to understand what's going on but at
the moment it is virtually impossible to use Blender.
 
Can someone look into that?
 
/Benoit
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-committers/attachments/20090414/337ce8d2/attachment.htm 


More information about the Bf-committers mailing list