[SciPy-dev] Bus error when calling put() method on object arrays

Robert Kern rkern at ucsd.edu
Tue Oct 4 08:01:51 CDT 2005


I've tracked it down to the first line of OBJECT_setitem() in
arraytypes.inc.src, but that's where my debug-fu fails me:

static int
OBJECT_setitem(PyObject *op, char *ov, PyArrayObject *ap)
{
	Py_XDECREF(*(PyObject **)ov);
	Py_INCREF(op);
	*(PyObject **)ov = op;
	return PyErr_Occurred() ? -1:0;
}

Changing the Py_XDECREF to Py_DECREF doesn't help. The chain of function
calls that leads to this is

PyArray_Put -> PyArray_ContiguousFromObject (values, not indices) ->
PyArray_ContiguousFromObject -> PyArray_FromAny -> array_fromobject ->
Array_FromSequence -> Assign_Array -> PySequence_SetItem ->
array_ass_item -> OBJECT_setitem

-- 
Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter




More information about the Scipy-dev mailing list