Re: [Rd] installed.packages Error: subscript out of bounds

From: Hervé Pagès <hpages_at_fhcrc.org>
Date: Thu, 11 Nov 2010 16:15:51 -0800

I can see this has been addressed, thanks!

I found a couple more issues with installed.packages().

The values returned in the Archs column don't seem to really make sense on Unix:

   > installed.packages()[1:5, c("Version", "Archs", "Built")]

              Version Archs Built

   affxparser "1.22.0"  "affxparser.so" "2.12.0"
   affy       "1.28.0"  "affy.so"       "2.12.0"
   affydata   "1.11.10" NA              "2.12.0"
   affyILM    "1.2.0"   "affyILM.so"    "2.12.0"
   affyio     "1.18.0"  "affyio.so"     "2.12.0"

Also the man page for installed.packages would need to be updated to list this new Archs column (Value section).

Thanks,
H.

On 11/10/2010 01:13 PM, Hervé Pagès wrote:
> Hi,
>
> Today we've seen the following problem with the R-2.12 that we use
> for our Windows builds:
>
> > installed.packages()
> Error: subscript out of bounds
>
> After some investigation we discovered that the cause of this failure
> was that 1 of the 890 packages currently installed on the machine
> (Windows Server 2003 R2) had its DESCRIPTION file empty:
>
> E:\biocbld\bbs-2.7-bioc\R\library>ls -al DLBCL
> total 1
> drwxr-xr-x+ 1 biocbuild2 root 0 2010-11-08 14:11 .
> drwxr-xr-x+ 1 biocbuild2 root 0 2010-11-10 00:14 ..
> -rwxr-xr-x+ 1 biocbuild2 root 0 2010-11-08 14:11 DESCRIPTION
> -rwxr-xr-x+ 1 biocbuild2 root 357 2010-11-08 14:11 INDEX
> drwxr-xr-x+ 1 biocbuild2 root 0 2010-11-08 14:11 data
> drwxr-xr-x+ 1 biocbuild2 root 0 2010-11-08 14:11 help
> drwxr-xr-x+ 1 biocbuild2 root 0 2010-11-08 14:11 html
>
> Then from R:
>
> > library(DLBCL)
> Error in library(DLBCL) : there is no package called 'DLBCL'
> > packageDescription("DLBCL")
> Error in packageDescription("DLBCL") :
> DESCRIPTION file of package 'DLBCL' is corrupt
> > installed.packages()
> Error: subscript out of bounds
>
> I have no idea how this DESCRIPTION file ended up empty. I've never
> seen this before. Probably a very rare race condition that would be
> very hard to reproduce.
>
> Anyway would it be possible to have installed.packages() give
> a more informative error message when this happens? That would
> make it behave more consistently with packageDescription().
>
> Does something like this sound reasonable?
>
> hpages_at_latitude:~/svn/R-trunk$ svn diff src/library/utils/R/packages.R
> Index: src/library/utils/R/packages.R
> ===================================================================
> --- src/library/utils/R/packages.R (revision 53546)
> +++ src/library/utils/R/packages.R (working copy)
> @@ -453,6 +453,11 @@
> domain = NA, call. = FALSE)
> next
> }
> + if (NROW(desc) < 1L) {
> + warning(gettextf("file '%s' is corrupt", pkgpath),
> + domain = NA, call. = FALSE)
> + next
> + }
> desc <- desc[1,]
> Rver <- strsplit(strsplit(desc["Built"], ";")[[1L]][1L],
> "[ \t]+")[[1L]][2L]
>
> Thanks,
>
> H.
>

-- 
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M2-B876
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpages_at_fhcrc.org
Phone:  (206) 667-5791
Fax:    (206) 667-1319

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Fri 12 Nov 2010 - 00:20:48 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 12 Nov 2010 - 05:00:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive