From p.dalgaard@biostat.ku.dk  Fri Jan  5 16:56:53 2001
From: p.dalgaard@biostat.ku.dk (Peter Dalgaard BSA)
Date: 05 Jan 2001 17:56:53 +0100
Subject: [Rd] crash with scan(..., what=list(,,)) (PR#802)
In-Reply-To: paradis@isem.univ-montp2.fr's message of "Fri, 5 Jan 2001 17:11:13 +0100 (MET)"
References: <200101051611.RAA27177@pubhealth.ku.dk>
Message-ID: <x2elyidjjd.fsf@blueberry.kubism.ku.dk>

paradis@isem.univ-montp2.fr writes:

> When reading a file with scan(), the following crashes R under Solaris and
> WinNT 4.0 (versions below):
> 
> > ads <- scan("Bltiadu.dat", what=list(,,))

Happens on Linux too. And you don't need a big file to provoke it:

$ cat > /tmp/junk
1 2 3
3 4 5
2 3 4
^D

...

Starting program: /usr/local/src/misc/r-release/BUILD/bin/R.bin --quiet
> scan('/tmp/junk', what=list(,,))

Program received signal SIGSEGV, Segmentation fault.
0x80d5160 in scanFrame (what=0x89e8260, maxitems=0, maxlines=0, flush=0, 
    fill=0, stripwhite=0x878b0f0, blskip=1) at ../../../R/src/main/scan.c:491
491     bch = fillBuffer(buffer, TYPEOF(VECTOR_ELT(ans, ii)), strip);


-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] crash with scan(..., what=list(,,)) (PR#802)
Peter Dalgaard BSA