[SciPy-user] Install problem - Overwriting message when importing scipy

Nils Wagner nwagner at mecha.uni-stuttgart.de
Wed Dec 21 10:57:16 CST 2005


On Wed, 21 Dec 2005 16:04:11 +0000
  Hugo Gamboa <hgamboa at gmail.com> wrote:
> Has anyone been able to reproduce the segmentation fault 
>caused by fread?

Yes, and here is the backtrace
[Thread debugging using libthread_db enabled]
[New Thread 1076175008 (LWP 12819)]
:ms:580 Generate data
:ms:56 Write

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1076175008 (LWP 12819)]
0x40da902d in numpyio_fromfile (self=0x0, args=0x402b60f4)
     at numpyiomodule.c:154
154       Py_DECREF(indescr);
(gdb) bt
#0  0x40da902d in numpyio_fromfile (self=0x0, 
args=0x402b60f4)
     at numpyiomodule.c:154
#1  0x0811eb56 in PyCFunction_Call (func=0x40dfd2ec, 
arg=0x402b60f4, kw=0x0)
     at methodobject.c:93
#2  0x080c74ed in PyEval_EvalFrame (f=0x816d8f4) at 
ceval.c:1499
#3  0x080c8bb4 in PyEval_EvalCodeEx (co=0x4029a660, 
globals=0x4026c824,
     locals=0x4026c824, args=0x0, argcount=0, kws=0x0, 
kwcount=0, defs=0x0,
     defcount=0, closure=0x0) at ceval.c:2736
#4  0x080c8de5 in PyEval_EvalCode (co=0x4029a660, 
globals=0x4026c824,
     locals=0x4026c824) at ceval.c:484
#5  0x080f77f8 in PyRun_SimpleFileExFlags (fp=0x8160008,
     filename=0xbffff015 "gamboa.py", closeit=1, 
flags=0xbfffecf4)
     at pythonrun.c:1265
#6  0x08055917 in Py_Main (argc=1, argv=0xbfffedc4) at 
main.c:484
#7  0x08054fc8 in main (argc=2, argv=0xbfffedc4) at 
python.c:23

> 
> Hugo Gamboa
> 
> 
> 
> from scipy import *
> import timing
> 
> def tic():
>    timing.start()
> 
> def tac(s=""):
>    timing.finish()
>    print(':ms:'+str(timing.milli())+" "+s)
> 
> tic()
> a=randn(1000,1000)
> tac("Generate data")
> 
> 
> tic()
> f=open("fwrite.mat","w")
> io.fwrite(f,size(a),a,"d",)
> tac("Write")
> 
> tic()
> f=open("fwrite.mat","r")
> b=io.fread(f,size(a),"d")  #FAILS - SEGMENTATION FAULT
> tac("Read")
> 
> 
> 
> Hugo Gamboa

  



More information about the SciPy-user mailing list