I am having some trouble reproducing this (an example of 3000 rows and 7 columns worked for me, and one of 18000 rows stresses the window manager so it works slowly if at all).

But AFAICS you are trying to give your window manager too much data, and the XGetWindowProperty call to determine the size is failing. R had no code to catch that possibility, and now I've added some I can no longer provoke a crash: but as expected you get the result

dat <- read.delim('clipboard')
Error in file(file, "r") : cannot open the connection
In addition: Warning message:
In file(file, "r") : clipboard cannot be opened or contains no text

(sometimes after a wait of more than a minute).

So even if it were somehow possible to pass 1Mb of data via an X11 clipboard, it looks as if it would be too slow to be useful.

On Fri, 18 Sep 2009, liam.gret...@leicester.ac.uk wrote:

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.

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


--
Brian D. Ripley,                  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to