[Bf-python] Metaelem.c clean-up

Gilbert, Joseph jgilbert at tigr.ORG
Tue Aug 30 16:18:35 CEST 2005


Dying during PyFinalize(), IMEAL (in my experience at least!!), usually
means bad reference counting, something wrong with the tp_dealloc
function or an issue with your TypeObject. If your sure this section of
code is at fault go ahead and commit the fix :) However, it sounds like
something else is going on to me (*_*)

-----Original Message-----
From: bf-python-bounces at projects.blender.org
[mailto:bf-python-bounces at projects.blender.org] On Behalf Of Ken Hughes
Sent: Tuesday, August 30, 2005 1:21 AM
To: Blender Foundation Python list
Subject: [Bf-python] Metaelem.c clean-up

Working on tp_getset in Metaball.c today and noticed a bunch of code
like:

     if( !PyList_Check( listargs ) )
         return ( EXPP_ReturnPyObjError
              ( PyExc_TypeError, "expected a list" ) );
     type = PyInt_AsLong( PyList_GetItem( listargs, 0 ) );
     x = (float)PyFloat_AsDouble( PyList_GetItem( listargs, 1 ) );
     y = (float)PyFloat_AsDouble( PyList_GetItem( listargs, 2 ) );
     z = (float)PyFloat_AsDouble( PyList_GetItem( listargs, 3 ) );

which means this code:

    x.setStuff(['a'])

seems to execute fine until you quit Blender, when you get this:

   Exception exceptions.TypeError: 'bad argument type for built-in 
operation' in 'garbage collection' ignored
   Fatal Python error: unexpected exception during garbage collection
   Abort

Should I submit a bug report, or just fix it while I make the other 
changes patches?  I've fixed similar code elsewhere in setter methods as

part of my update, but these are in a function I normally wouldn't
change.

Ken
_______________________________________________
Bf-python mailing list
Bf-python at projects.blender.org
http://projects.blender.org/mailman/listinfo/bf-python



More information about the Bf-python mailing list