Bill,
Thanks for digging into this -- I am getting much less information from
valgrind, even running an instrumented R build.
The issue is specific to using textConnection(NULL, open='w'), which
really isn't very useful -- that is what anonymous file() connections are
for, as the help page s
Dear Bill,
Thanks for having had a look on this bug. I am now using an anonymous
file() connection to store my stuffs instead of textConnection(): it is
much faster and doesn't raise any seg faults.
Regards,
Greg
---
Gregoire Pau
EMBL/EBI Cambridge, UK
http://www.ebi.ac.uk/~gpau
Bill Dunlap
If you call gctorture(TRUE) the error happens immediately,
at the same place.
2064PROTECT(tmp = lengthgets(this->data, ++this->len));
Is this a case where PROTECT_WITH_INDEX() and REPROTECT()
need to be used (in connections.c)? Could lengthgets (used
by the SET_LENGTH() macro)
On Tue, 29 Apr 2008, Gregoire Pau wrote:
> Dear all,
>
> It seems that textConnection() can trigger a segmentation fault. The
> following script (using two large loops) makes this bug reproducible:
>
> for (i in 1:1) {
>z=textConnection(NULL,open='w')
>for (j in 1:100) {
> write(r
MAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Tony Chiang
> Sent: 29 April 2008 15:02
> To: Gregoire Pau
> Cc: r-devel@r-project.org
> Subject: Re: [Rd] reproducible segmentation fault caused by
> textConnection()
>
> Hi Greg,
>
> I get a different error on
Hi Greg,
I get a different error on my mac:
> for (i in 1:1) {
+ try({z=textConnection(NULL,open='w')
+ for (j in 1:100) {
+write(runif(1)*1e6,file=z)
+write('\n',file=z)
+ }
+ close(z)})
+ }
Error : cannot set length of non-vector
In addition: Warning message:
closing unused conn