[Numpy-discussion] crashes after switching to 1.3.x

Adrian E. Feiguin afeiguin at uci.edu
Thu May 26 18:19:52 EDT 2005


Hi! I'm the lead developer of scigraphica (SG) 
http://scigraphica.sourceforge.net and I'm using python and numarray to 
parse math. SG is built on top of libscigraphica, and libscigraphica has 
all the python code. I've been using an old version 0.6.1, and 
everything worked fine. After switching to 1.6.2the program crashes. 
I'll give you some info to see if you can tell me what's wrong:

I'm using:
#define PY_ARRAY_UNIQUE_SYMBOL PyArrayXXX
#include <arrayobject.h>

and in the code:
    import_libnumeric();
    import_array();

    object=PyRun_String ("from numarray import *", Py_single_input, 
main_dict, sg_dict);

(I noticed that you have to add import_libnumeric now)

The gdb output is:

Importing python module: sys
Importing python module: pickle
Importing python module: os
Importing python module: numarrayProgram received signal SIGSEGV, 
Segmentation fault.
[Switching to Thread 1083181376 (LWP 11648)]
0x400ab0b5 in PyObject_GetAttrString ()
   from 
/home/afeiguin/cvs/test/libscigraphica-2/scigraphica/.libs/libscigraphica-2.0-2.0.so.0
#0  0x400ab0b5 in PyObject_GetAttrString ()
   from 
/home/afeiguin/cvs/test/libscigraphica-2/scigraphica/.libs/libscigraphica-2.0-2.0.so.0
#1  0x40b1ff66 in deferred_libnumarray_init () at 
Src/libnumarraymodule.c:152
#2  0x40b21f8c in NA_NumArrayCheck (op=0x0) at Src/libnumarraymodule.c:1357
#3  0x40b43c1c in PyArray_Check (op=0x0) at Src/libnumericmodule.c:216
#4  0x4004d903 in python_insert_object (worksheet=0x81ba4e0, row=0, col=0,
    object=0x80bda3c, orient=GTK_ORIENTATION_VERTICAL, link=0, as_is=0)
    at sg_python_worksheet.c:802
#5  0x4004da12 in python_sheet (worksheet=0x81ba4e0, row=0, col=0,
    command=0x8366d68 ".1", orient=GTK_ORIENTATION_VERTICAL)
    at sg_python_worksheet.c:843
#6  0x40061f7c in sg_worksheet_cell_set (worksheet=0x81ba4e0, row=0, col=0,
    text=0x8365520 ".1", formula=1, eval=1) at sg_worksheet.c:508
#7  0x40061d59 in set_cell (sheet=0x81ba4e0, row=0, col=0, data=0x81ba4e0)
    at sg_worksheet.c:439

Look that in #4 object=0x80bda3c, and in #3 op=0x0.
Any hints?
Thanks a lot!
<ADRIAN>





More information about the NumPy-Discussion mailing list