[Insight-users] python: Segmentation fault when import InsightToolkit on Mac/G5/10.3(Phanter)

Frank Lindseth Frank . Lindseth at sintef . no
Thu, 27 Nov 2003 15:07:44 +0100


Hi,

I have just build a fresh cvs of Insight with python wrapping (the src 
was downloaded after
Charl P. Botha  last mail concerning  python-wrapping) on a 
Mac/G5/OSX.3(Phanter)/gcc3.3.
When I try to import InsightToolkit I get a segmentation fault, and 
running it trough gdb there
seems to be a problem with  itkSigmoidImageFilterSC2SC2_swigregister 
(see below)
Any ideas regarding the problem or how I should proceed  ?

Best regards,
Frank

[sule:cvs/Build-ITK-cvs/bin] frankl% gdb python
GNU gdb 5.3-20030128 (Apple version gdb-292) (Sat Sep 20 03:22:27 GMT 
2003)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and 
you are
welcome to change it and/or distribute copies of it under certain 
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for 
details.
This GDB was configured as "powerpc-apple-darwin".
Reading symbols for shared libraries ..... done

warning: Pre-compiled symbol file 
"/usr/libexec/gdb/symfiles/python.syms" is out of date (Fri Sep 26 
08:40:51 2003 vs. Fri Sep 26 08:40:47 2003); ignoring
(gdb) run
Starting program: /usr/local/bin/python
Reading symbols for shared libraries .................. done
Python 2.3 (#1, Sep 13 2003, 00:49:11)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
 >>> from InsightToolkit import *
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done

Program received signal EXC_BAD_ACCESS, Could not access memory.
0x07b7be50 in itkSigmoidImageFilterSC2SC2_swigregister(_object*, 
_object*) ()
(gdb) bt
#0  0x07b7be50 in itkSigmoidImageFilterSC2SC2_swigregister(_object*, 
_object*) ()
#1  0x95fa6c64 in PyEval_EvalCode ()
#2  0x95fa7e30 in PyEval_EvalCodeEx ()
#3  0x95fa4734 in PyEval_EvalCode ()
#4  0x95fbe100 in PyImport_ExecCodeModuleEx ()
#5  0x95fbe808 in PyImport_ExecCodeModuleEx ()
#6  0x95fbf784 in PyImport_ExecCodeModuleEx ()
#7  0x95fc08c4 in PyImport_ImportModuleEx ()
#8  0x95fc02e0 in PyImport_ImportModuleEx ()
#9  0x95fbfe00 in PyImport_ImportModule ()
#10 0x95fbffd4 in PyImport_ImportModuleEx ()
#11 0x95f9cbf0 in _PyUnicodeUCS2_IsAlpha ()
#12 0x95f4a8d0 in PyObject_Call ()
#13 0x95fa91ec in PyEval_CallObjectWithKeywords ()
#14 0x95fa6984 in PyEval_EvalCode ()
#15 0x95fa7e30 in PyEval_EvalCodeEx ()
#16 0x95fa4734 in PyEval_EvalCode ()
#17 0x95fbe100 in PyImport_ExecCodeModuleEx ()
#18 0x95fbe808 in PyImport_ExecCodeModuleEx ()
#19 0x95fbf784 in PyImport_ExecCodeModuleEx ()
#20 0x95fc08c4 in PyImport_ImportModuleEx ()
#21 0x95fc02e0 in PyImport_ImportModuleEx ()
#22 0x95fbfe00 in PyImport_ImportModule ()
#23 0x95fbffd4 in PyImport_ImportModuleEx ()
#24 0x95f9cbf0 in _PyUnicodeUCS2_IsAlpha ()
#25 0x95f4a8d0 in PyObject_Call ()
#26 0x95fa91ec in PyEval_CallObjectWithKeywords ()
#27 0x95fa6984 in PyEval_EvalCode ()
#28 0x95fa7e30 in PyEval_EvalCodeEx ()
#29 0x95fa4734 in PyEval_EvalCode ()
#30 0x95fbe100 in PyImport_ExecCodeModuleEx ()
#31 0x95fbe808 in PyImport_ExecCodeModuleEx ()
#32 0x95fbf784 in PyImport_ExecCodeModuleEx ()
#33 0x95fc08c4 in PyImport_ImportModuleEx ()
#34 0x95fc02e0 in PyImport_ImportModuleEx ()
#35 0x95fbfe00 in PyImport_ImportModule ()
#36 0x95fbffd4 in PyImport_ImportModuleEx ()
#37 0x95f9cbf0 in _PyUnicodeUCS2_IsAlpha ()
#38 0x95f4a8d0 in PyObject_Call ()
#39 0x95fa91ec in PyEval_CallObjectWithKeywords ()
#40 0x95fa6984 in PyEval_EvalCode ()
#41 0x95fa7e30 in PyEval_EvalCodeEx ()
#42 0x95fa4734 in PyEval_EvalCode ()
#43 0x95fbe100 in PyImport_ExecCodeModuleEx ()
#44 0x95fbe808 in PyImport_ExecCodeModuleEx ()
#45 0x95fbf784 in PyImport_ExecCodeModuleEx ()
#46 0x95fc08c4 in PyImport_ImportModuleEx ()
#47 0x95fc02e0 in PyImport_ImportModuleEx ()
#48 0x95fbfe00 in PyImport_ImportModule ()
#49 0x95fbffd4 in PyImport_ImportModuleEx ()
#50 0x95f9cbf0 in _PyUnicodeUCS2_IsAlpha ()
#51 0x95f4a8d0 in PyObject_Call ()
#52 0x95fa91ec in PyEval_CallObjectWithKeywords ()
#53 0x95fa6984 in PyEval_EvalCode ()
#54 0x95fa7e30 in PyEval_EvalCodeEx ()
#55 0x95fa4734 in PyEval_EvalCode ()
#56 0x95fbe100 in PyImport_ExecCodeModuleEx ()
#57 0x95fbe808 in PyImport_ExecCodeModuleEx ()
#58 0x95fbf784 in PyImport_ExecCodeModuleEx ()
#59 0x95fc08c4 in PyImport_ImportModuleEx ()
#60 0x95fc02e0 in PyImport_ImportModuleEx ()
#61 0x95fbfe00 in PyImport_ImportModule ()
#62 0x95fbffd4 in PyImport_ImportModuleEx ()
#63 0x95f9cbf0 in _PyUnicodeUCS2_IsAlpha ()
#64 0x95f4a8d0 in PyObject_Call ()
#65 0x95fa91ec in PyEval_CallObjectWithKeywords ()
#66 0x95fa6984 in PyEval_EvalCode ()
#67 0x95fa7e30 in PyEval_EvalCodeEx ()
#68 0x95fa4734 in PyEval_EvalCode ()
#69 0x95fc85f0 in PyRun_FileExFlags ()
#70 0x95fc7354 in PyRun_InteractiveOneFlags ()
#71 0x95fc713c in PyRun_InteractiveLoopFlags ()
#72 0x95fc6fd4 in PyRun_AnyFileExFlags ()
#73 0x95fd1ec0 in Py_Main ()
#74 0x00003c78 in start ()
#75 0x00003aec in start ()
(gdb)