From jgentry at jimmy.harvard.edu  Wed Mar 31 23:17:39 2004
From: jgentry at jimmy.harvard.edu (Jeff Gentry)
Date: Wed Mar 31 23:17:37 2004
Subject: [Rd] segfault in browseURL()
In-Reply-To: <Pine.LNX.4.44.0403312204550.28113-100000@gannet.stats>
Message-ID: <Pine.SOL.4.20.0403311612250.14754-100000@santiam.dfci.harvard.edu>

> > 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.

Here:

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

This gives an error that the URL does not exist.

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

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 ....

[1]
"http://www.ncbi.nih.gov/entrez/query.fcgi?tool=bioconductor&cmd=Retrieve&db=PubMed&list_uids=12730033%2c12691826%2c12544996%2c12490434%2c12477932%2c12411538%2c12391142%2c12207910%2c11971973%2c11864979%2c10859165%2c10216320%2c10205060%2c3931075%2c3470951%2c3019832%2c2880793%2c2858050%2c2538825%2c1700760%2c1478667"


[Rd] segfault in browseURL()
Jeff Gentry