[SciPy-dev] Unusual crash

Robert Kern robert.kern at gmail.com
Thu Mar 22 17:07:13 EDT 2007


Russel Howe wrote:
> I am using today's svn scipy on OS X 10.4 intel with MacPorts python2.4.
> 
> 
> $ pythonw -c "import scipy.signal"
> Floating point exception
> $
> 
> Looking a little more closely, it is the module linalg.iterative that  
> causes the crash.  A gdb backtrace is below, has anybody else run  
> into this before?  Any ideas?  I rebuilt python and scipy with no  
> change.
> 
> $ gdb /opt/local/Library/Frameworks/Python.framework/Versions/2.4/ 
> Resources/Python.app/Contents/MacOS/Python
> 
> <snip gdb banner>
> (gdb) run -c "import scipy.linalg.iterative"
> 
> <snip loading libraries...>
> 
> Program received signal EXC_ARITHMETIC, Arithmetic exception.
> 0x900dfb26 in strtod_l ()
> (gdb) bt
> #0  0x900dfb26 in strtod_l ()
> #1  0x90030a66 in strtod ()
> #2  0x002ac1be in PyOS_ascii_strtod (nptr=0xbfff8680 "1.", '0'  
> <repeats 15 times>, "1e-05", endptr=0x0) at Python/pystrtod.c:159
> #3  0x002ac469 in PyOS_ascii_atof (nptr=0xbfff8680 "1.", '0' <repeats  
> 15 times>, "1e-05") at Python/pystrtod.c:257
> #4  0x002a04c7 in r_object (p=0xbfffcd50) at Python/marshal.c:484
> #5  0x002a0782 in r_object (p=0xbfffcd50) at Python/marshal.c:581
> #6  0x002a053d in r_object (p=0xbfffcd50) at Python/marshal.c:651
> #7  0x002a0da1 in PyMarshal_ReadLastObjectFromFile (fp=0xa000be50) at  
> Python/marshal.c:804
> #8  0x0029d403 in load_source_module (name=0xbfffd6f7  
> "scipy.linalg.iterative", pathname=0xbfffd257 "/opt/local/lib/ 
> python2.4/site-packages/scipy/linalg/iterative.py", fp=0xa000bdf8) at  
> Python/import.c:723

That is indeed very unusual. Try deleting its .pyc file and then importing it.
Then try importing it after the new .pyc is built. That will probably give you
the same result (since you have rebuilt both Python and scipy), but it's the
only thing I can think of.

I do recommend using the official Python binary from python.org instead of
MacPorts' Python. It seems to be the most robust distribution of Python for Macs.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco



More information about the SciPy-Dev mailing list