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

Travis Oliphant oliphant at ee.byu.edu
Wed Oct 5 02:01:43 CDT 2005


Robert Kern wrote:

>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:
>  
>
Got it and squashed it.

This was a nasty typo in PyArray_Put

It should have been self->descr->type_num in the values.

Basically, while PyArray_New works with typecharacters instead of type 
numbers, it did not
set Object arrays created that way to NULL.

So, the code was trying to DECREF unitialized OBJECT pointer.  Python 
was having a great time with it I'm sure...

-Travis




More information about the Scipy-dev mailing list