[Rd] segfault in browseURL()

Jeff Gentry jgentry at jimmy.harvard.edu
Wed Mar 31 23:17:39 CEST 2004

> > Well, the toy example I was using to first verify that it was coming from
> > browseURL in general was just to do this:
> > z <- rep("z", 300)
> > z <- paste(z, collapse="")
> > browseURL(z)
> That's not a URL at all, and I get nothing (as I should). If I put http:// 
> in front it works (as a search item).

That's not the point.  When it is repped to length 300, it causes a
segfault for me.  When it is repped to a length of say, 250 - it simply
doesn't work properly (as one would expect, because as you so correctly
pointed out 'aaaaaaa....' isn't a URL.  My point here was to demonstrate
the segfaulting due to excessively long strings, which at least for me,
does not seem to be tied to a URL being valid or not.


z <- paste("http://www.r-project.org/", paste(rep("a", 200),

This gives an error that the URL does not exist.

z <- paste("http://www.r-project.org/", paste(rep("a", 300),

This causes a segfault.

> > This builds up a URL query and then calls 'browseURL(query)'.
> And you could extract `query' and tell us what that is ....


More information about the R-devel mailing list