[R] R for Windows crash on new laptop

Karen Martien Karen.Martien at noaa.gov
Wed Mar 29 21:06:32 CEST 2006


I'm trying to use a contributed package (rmetasim) to generate simulated 
genetic datasets.  My scripts work fine when I run them on a Sun 
workstation running Solaris 7 and when I run them on a ~4 year old 
laptop PC that I have.  However, when I run them on my new laptop (Dell 
Latitude D410 purchased in August 2005), the simulation will run for a 
short (variable) period of time, then R crashes.  When it crashes, I 
either get an Application Popup that says

'The instruction at "0x5ad71531" referenced memory at "0x00000014".  The 
memory could not be "read".',

or I simply get the popup saying that RGUI has experienced a problem, 
would I like to send a report to Microsoft.  When the latter happens, an 
event log is generated that says

'Fauling application rgui.exe, version 2.30.37590.0, fauling module 
ntdll.dll, version 5.1.2600.2180, fault address 0x0001888f.'

In both types of errors, the memory addresses listed are different every 
time a crash occurs.

I experience this problem primarily when attempting to simulate large 
datasets.  My script saves the 'landscape' (the object being simulated) 
every 100 time steps.  When R crashes, I can start it back up, reload 
the last landscape saved before the crash, and continue simulating from 
there.  Thus, there appears to be nothing wrong with the landscapes I'm 
simulating.

I've been in contact with the author of the contributed package I'm 
using, and he has been unable to find any bugs in the package or 
reproduce the error.  The bug seems to be platform specific since, as I 
mentioned, I'm able to run my scripts crash-free on other computers.  
However, I've tried running my scripts on another computer that is 
nearly identical to mine (a Dell D610 purchased in August 2005), and 
experience the same problems on that computer.  I've tried running my 
scripts from a command window using 'R --vanilla', and experience the 
same problems.  I've tried using the development version of R 
(R-2.3.0alpha) and experience the same problems.

In reading other bug reports I found that some people have had crashes 
caused by buggy video drivers.  I've updated my video drivers, but it 
didn't help.  However, I was only able to upgrade to the newest version 
of the video driver; I haven't been able to find an alternative driver 
to work with my display adapter.  The display adapter used by my 
computer is the mobile Intel 915GM/GMS,910GML Express Chipset.

I'm running R 2.2.1 (though I've tried R 2.0.1 and 2.3.0alpha and had 
the same problem).  The machine on which I've had problems is a Dell 
Latitude D410 laptop running Windows XP Pro SP2, 2GHz Pentium processor 
with 1GB of RAM.  The output of the R command 'version' is;

platform i386-pc-mingw32
arch     i386          
os       mingw32       
system   i386, mingw32 
status                 
major    2             
minor    2.1           
year     2005          
month    12            
day      20            
svn rev  36812         
language R  

The exact sequence of commands I type, after launching the Rgui, is as 
follows:

 >library(rmetasim)
 >source("ArchI_burnin_NOdensdep-mod.R")

The script I'm running (which obviously requires that the package 
'rmetasim' be installed) follows.  Beware that the script takes about 15 
minutes to run on my old computer (the one on which it doesn't crash.  
For what it's worth, that computer is a Dell Latitude C400 running 
Windows XP Pro SP2, 866 MHz Pentium III processor, 512 MB of RAM).  Any 
suggestions would be greatly appreciated.

############################################################################
#ArchI_burnin_NOdensdep-mod.R#

habitats <- 1
carrycap <- 7500
stages <- 5
rland <- NULL
numreps <-  2
numsteps <- 50
stepsize <- 100
runlength <- numsteps*stepsize

rland <- new.landscape.empty()
rland <- new.intparam.land(rland, h = habitats, s = stages, totgen = 
runlength)
rland <- new.switchparam.land(rland, mp = 1)
rland <- new.floatparam.land(rland)

#life history matrices at zero population density
SZ <- matrix (c(0.730, 0, 0, 0, 0,
           0.210, 0, 0, 0, 0,
           0, 0.470, 0, 0.946, 0,                   
           0, 0, 0.946, 0, 0,
           0, 0.470, 0, 0, 0.954), nrow=5, byrow = T)

RZ <- matrix (c(0, 0, 0, .94, 0,
           0, 0, 0, 0, 0,
           0, 0, 0, 0, 0,
           0, 0, 0, 0, 0,
           0, 0, 0, 0, 0), nrow = 5, byrow = T)

M <- matrix (c(0, 0, 0, 0, 0,
           0, 0, 0, 0, 0,
           0, 0, 0, 0, 0,
           0, 0, 0, 0, 1,
           0, 0, 0, 0, 0), nrow = 5, byrow = T)

rland <- new.local.demo(rland,SZ,RZ,M)

rland <- 
new.epoch.island(rland,0,c(0,0,0,0,0),c(0,0,0,0,0),0,c(0,0,0,0,0),c(0,0,0,0,0),
0,c(0,0,0,0,0),c(0,0,0,0,0), carry = rep(carrycap,habitats))

rland <- new.locus(rland, type = 1, ploidy = 2, transmission = 0, 
numalleles = 1, mutationrate = 0.001)
rland <- new.locus(rland, type = 1, ploidy = 2, transmission = 0, 
numalleles = 1, mutationrate = 0.001)
rland <- new.locus(rland, type = 1, ploidy = 2, transmission = 0, 
numalleles = 1, mutationrate = 0.001)
rland <- new.locus(rland, type = 1, ploidy = 2, transmission = 0, 
numalleles = 1, mutationrate = 0.002)
rland <- new.locus(rland, type = 1, ploidy = 2, transmission = 0, 
numalleles = 1, mutationrate = 0.002)
rland <- new.locus(rland, type = 1, ploidy = 2, transmission = 0, 
numalleles = 1, mutationrate = 0.002)
rland <- new.locus(rland, type = 1, ploidy = 2, transmission = 0, 
numalleles = 1, mutationrate = 0.003)
rland <- new.locus(rland, type = 1, ploidy = 2, transmission = 0, 
numalleles = 1, mutationrate = 0.003)
rland <- new.locus(rland, type = 1, ploidy = 2, transmission = 0, 
numalleles = 1, mutationrate = 0.003)
rland <- new.locus(rland, type = 2, ploidy = 1, transmission = 1, 
numalleles = 1, allelesize = 500, mutationrate = 0.005)
                                           
rland <- new.individuals(rland, as.integer(c(2775,525,1050,975,2175)))

rland.start <- rland
for (j in 1:numreps) {
  rland <- rland.start
  for (i in 1:numsteps) {
      rland <- simulate.landscape(rland, stepsize)
     save(rland, file=paste("ArchI_test_",j,"_",i,".rda",sep=""))
  }
}


-- 
***********************************
Dr. Karen Martien
Southwest Fisheries Science Center
8604 La Jolla Shores Drive
La Jolla, CA 92037
USA
Ph: 858-546-7058
Fax: 858-546-7003




More information about the R-help mailing list