Hi, I am working with the package nlme, and I tried creating a new correlation class (which, according to the help pages, is possible if you write a few new method functions). Anyways, I think I am 99% of the way there, but I have a recurring problem with R crashing on seemingly innocuous statements (I have set debug() on nearly every function, so I can see where it is failing). For instance, sometime the code fails on the simple statement: object[[i]] Two things are odd about this: 1. It's not the first time I call object[[i]] 2. If I run save() on the object just before the crash, open the object in a new workspace and run object[[i]], then no crash or error occurs. "[[" is not the only function that has been giving me grief. Certain C routines that get called multiple time have displayed very similar behavior (ie. they work fine several times before they crash, and if the object is exported just before the crash and the routine is called in a new workspace there is no error). The behavior kind of reminds me of the craziness that occur with an uninitialized pointer (thinking back to coding in C in college). The other thing that points me in that direction is that Windows returns an error code ending ...00005, which I believe indicates a segmentation fault. I was also wondering whether there might be some rogue global variable, but I have no idea what. I have struggling with this for a week. Does anyone have any insights on what might be wrong or what I might try? Thanks so much, Mike [[alternative HTML version deleted]]
The R version is 2.9.2. nlme version is 3.1-93 The OS is Windows XP. This is for my work computer but I get the same behavior at home using Vista. ---------- Forwarded message ---------- From: Sarah Goslee <sarah.goslee@gmail.com> Date: Wed, Apr 21, 2010 at 11:50 AM Subject: Re: [R] R crashing oddly To: Michael Steven Rooney <michael.s.rooney@gmail.com> You definitely need to provide the information requested in the posting guide, specifically OS, R version, package version (and update to the newest if you haven't yet). Sarah On Wed, Apr 21, 2010 at 11:41 AM, Michael Steven Rooney <michael.s.rooney@gmail.com> wrote:> Hi, > > I am working with the package nlme, and I tried creating a new correlation > class (which, according to the help pages, is possible if you write a few > new method functions). Anyways, I think I am 99% of the way there, but I > have a recurring problem with R crashing on seemingly innocuous statements > (I have set debug() on nearly every function, so I can see where it is > failing). >-- Sarah Goslee http://www.functionaldiversity.org [[alternative HTML version deleted]]
A similar problem was mentioned before: https://stat.ethz.ch/pipermail/r-sig-mixed-models/2008q3/001425.html There appears to be a bug in the C code leading to memory corruption. Best, -- Wolfgang Viechtbauer http://www.wvbauer.com/ Department of Methodology and Statistics Tel: +31 (0)43 388-2277 School for Public Health and Primary Care Office Location: Maastricht University, P.O. Box 616 Room B2.01 (second floor) 6200 MD Maastricht, The Netherlands Debyeplein 1 (Randwyck) ----Original Message---- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Michael Steven Rooney Sent: Wednesday, April 21, 2010 17:41 To: r-help at r-project.org Subject: [R] R crashing oddly> Hi, > > I am working with the package nlme, and I tried creating a new > correlation class (which, according to the help pages, is possible if > you write a few new method functions). Anyways, I think I am 99% of > the way there, but I have a recurring problem with R crashing on > seemingly innocuous statements (I have set debug() on nearly every > function, so I can see where it is failing). > > For instance, sometime the code fails on the simple statement: > object[[i]] Two things are odd about this: 1. It's not the first time > I call object[[i]] 2. If I run save() on the object just before the > crash, open the object in a new workspace and run object[[i]], then > no crash or error occurs. > > "[[" is not the only function that has been giving me grief. Certain > C routines that get called multiple time have displayed very similar > behavior (ie. they work fine several times before they crash, and if > the object is exported just before the crash and the routine is > called in a new workspace there is no error). > > The behavior kind of reminds me of the craziness that occur with an > uninitialized pointer (thinking back to coding in C in college). The > other thing that points me in that direction is that Windows returns > an error code ending ...00005, which I believe indicates a > segmentation fault. I was also wondering whether there might be some > rogue global variable, but I have no idea what. > > I have struggling with this for a week. Does anyone have any insights > on what might be wrong or what I might try? > > Thanks so much, > Mike > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.