[Rd] R v2.1.0 patched (>2005-05-09) for Windows?

Martin Maechler maechler at stat.math.ethz.ch
Fri Jul 15 11:25:53 CEST 2005

>>>>> "HenrikB" == Henrik Bengtsson <hb at maths.lth.se>
>>>>>     on Fri, 15 Jul 2005 10:01:05 +0200 writes:

    HenrikB> I'm trying to troubleshoot a case where R crashes on Windows.  It does 
    HenrikB> not occur at all with my R v2.1.0 patched (2005-05-09), but happens on R 
    HenrikB> v2.1.1 (patched or non-patched) in many different cases.  The R 
    HenrikB> v2.2.0dev (2005-07-15) also got this problem (although it won't crash on 
    HenrikB> the below example).  I previously reported this 
    HenrikB> (https://stat.ethz.ch/pipermail/r-devel/2005-June/033772.html) and 
    HenrikB> Duncan Murdoch kindly offered to look into the problem, but it is 
    HenrikB> tricky.  Now I would like to track down in what patched R v2.1.0 the 
    HenrikB> problem first occurs and are now looking for reports from newer version, 
    HenrikB> but pre-Rv2.1.1.

    HenrikB> If you've got R v2.1.0 patched for Windows *after 2005-05-09*, could you 
    HenrikB> please try the following in that version of R?

    HenrikB> install.packages("R.oo")
    HenrikB> library(R.oo)
    HenrikB> author <- "dummy"
    HenrikB> rdocFile <- system.file("misc", "Exception.R", package="R.oo")
    HenrikB> cat("# Empty example code\n", file="Exception.Rex")
    HenrikB> Rdoc$compile(rdocFile, destPath=tempdir())
    HenrikB> print("successful!")

    HenrikB> If you see "successful!", that version is "ok", otherwise R will crash 
    HenrikB> (or alternatively incorrectly complain about an invalid regular 
    HenrikB> expression; rerun and it will crash the 2nd time).  I would appreciate a 
    HenrikB> lot if you report to me what you get and what is your version of R? 
    HenrikB> Thanks a lot!

    HenrikB> Note that this is most likely *not* due to R.oo (no
    HenrikB> native code) - my wild guess is that it has to do
    HenrikB> with a memory leak in the code for environments or
    HenrikB> regular expressions.

but why would that only affect Windows ??

I've tried your example code also in Linux, and indeed I do see
quite some memory growth of the R process, particularly if I run

   for(i in 1:40) Rdoc$compile(rdocFile, destPath=tempdir())
   ## which takes a few minutes

my R process size grows considerably (50% - 100% depending on
the measure I use in 'ps').
So I can confirm that your guess about memory leakage {or
something close} seems quite on target.
But please don't ask me to dig further here - not for the time
being, at least.

BTW, I get 10 warnings, both in R 2.1.0 and in 2.1.1 patched
(see below) --- but that's probably something not really
relevant here.


More information about the R-devel mailing list