Re: [Rd] core Matrix package segfaulted on R CMD check --use-gct

From: Hin-Tak Leung <htl10_at_users.sourceforge.net>
Date: Thu, 07 Apr 2011 07:51:44 +0100

Douglas Bates wrote:
> I isolated the problem and tested then committed a fix. I am going to
> ask Martin to upload the new release as I have gotten out of sync with
> some of his recent changes and he will, I hope, reconcile the branches
> and trunk. If you need the fixed version immediately, say for
> testing, the changes are in the file Matrix/src/chm_common.c You can
> visit the SVN archive for the project,
> https://r-forge.r-project.org/scm/?group_id=61, click on the link to
> Browse Subversion Repository and go to pkg/Matrix/src/chm_common.c
>
> I made the mistake that I chastised others for making, performing an
> operation on the result of a call to install and another value that
> may have required allocation of memory. The first time install is
> called on a particular string it allocates and SEXPREC, which may
> cause a garbage collection.

Matrix-for-R-2.13_at_2659 (0.999375-49) has the problem at a different place:

 > pkgname <- "Matrix"
 > source(file.path(R.home("share"), "R", "examples-header.R"))
 > gctorture(TRUE)
 > options(warn = 1)
 > options(error=dump.frames)
 > library('Matrix')

Loading required package: lattice
Error in regexpr("package:", envName, fixed = TRUE) :

   unprotected object (0x2fe5818) encountered (was INTSXP) Error: package/namespace load failed for 'Matrix'

That aside - with R 2.13 only about a week to go, which version of Matrix will it ship?

Either way, since this problem causes dependent packages to crash on load, I have made some local changes to load Matrix only on demand and not on library initialization, since only one routine needs it. I thought I'd add a warning as well, but if R crashes, the warning may not come out in time so there is little incentive of emitting a warning which may not be seen.



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Thu 07 Apr 2011 - 08:41:50 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 Thu 07 Apr 2011 - 17:50:42 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