From liam.gretton at leicester.ac.uk  Fri Sep 18 11:10:15 2009
From: liam.gretton at leicester.ac.uk (liam.gretton at leicester.ac.uk)
Date: Fri, 18 Sep 2009 11:10:15 +0200 (CEST)
Subject: [Rd] Reading clipboard with read.delim("clipboard") crash (PR#13957)
Message-ID: <20090918091015.C9EA3282EF2D@mail.pubhealth.ku.dk>

Full_Name: Liam Gretton
Version: 2.9.2
OS: openSUSE 11.1 (x86_64)
Submission from: (NULL) (143.210.13.77)


Reading a large number of rows of delimited data via the clipboard results in a
segfault or double free error. I've tested copying from various applications,
but gedit will do.

This problem exists in the openSUSE-supplied 2.8.1, I've just built 2.9.2 to see
if it's still there, and it is.

I can provide an example delimited file which demonstrates the problem; it
contains about 18000 rows and 7 columns of data. read.delim("clipboard") tends
to fail when only reading ~1500 rows, though I haven't been able to reproduce
the point at which it fails.

Reading exactly the same data from a file using read.csv("file.csv") is
successful.

Problem reproduced as so:

Data copied to the clipboard in Gnome.

> R
R version 2.9.2 (2009-08-24)
[snip]

> data <- read.delim("clipboard")

 *** caught segfault ***
address 0x18, cause 'memory not mapped'

Traceback:
 1: file(file, "r")
 2: read.table(file = file, header = header, sep = sep, quote = quote,     dec =
dec, fill = fill, comment.char = comment.char, ...)
 3: read.delim("clipboard")

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace

On a different (but similar) openSUSE 11.1 system, the command still fails but
reports:

*** glibc detected *** /usr/local/R-2.9.2/lib64/R/bin/exec/R: double free of
corruption (!prev): 0x000000000097cb70 ***

Details of R build:

./configure --prefix=/usr/local/R-2.9.2 --enable-R-shlib --enable-mbcs
--enable-threads=posix  --with-blas  --with-lapack --with-system-zlib
--with-system-bzlib --with-system-pcre --with-gnu-ld

No additional packages installed. 'make check' passed.



[Rd] Reading clipboard with read.delim("clipboard") crash (PR#13957)
liam.gretton at leicester.ac.uk