[Bf-python] Mathutils
models at paposo.com
models at paposo.com
Thu Nov 20 06:58:19 CET 2003
Well Im at it again with this math module. As a side note I figured out why
I couldn't get newMatrixObject() to return correctly. This function runs
correctly but after the new object is created and returned Matrix_dealloc()
is called (i have no idea why but this seems to be a theme among all the
modules) Maybe this is to clean up for garbage collection - i don't know.
However, I was getting weird crashing until I figured out what the problem
was:
static void Matrix_dealloc (MatrixObject *self)
{
//Py_DECREF (self->rows[0]); <----
//Py_DECREF (self->rows[1]); <----
//Py_DECREF (self->rows[2]); <----
//Py_DECREF (self->rows[3]); <----
if (self->mem)
PyMem_Free (self->mem);
PyMem_DEL (self);
}
When only 1 of the above DECREF's is called everything is o.k. however, when
more than 1 is called blender crashes with:
HEAP[blender.exe]: Invalid Address specified to RtlFreeHeap( 01110000,
01363198 )
Anyway Ive just commented these out and everything seems nice and dandy.
More information about the Bf-python
mailing list