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

From: Hervé Pagès <hpages_at_fhcrc.org>
Date: Wed, 10 Nov 2010 13:13:17 -0800


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


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 Wed 10 Nov 2010 - 21:19:43 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 - 00:50: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