Dear all, I had a R segmentation fault, and then invoked debug mode and ran step by step. When I reached "terms(Y~X1*X2*...*X16)", I would then have "segmentation" fault. However, if I just ran this under regular "R interactive" mode, it would be fine though taking long time. My questions are: 1. Is there a known limit of terms for a formula? 2. Why does the same function behave differently under debug and regular mode? Thank you! Best, Peng ********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues
On Aug 9, 2012, at 4:56 PM, Zhang, Peng wrote:> Dear all, > > I had a R segmentation fault, and then invoked debug mode and ran step > by step. > > When I reached "terms(Y~X1*X2*...*X16)", I would then have > "segmentation" fault. However, if I just ran this under regular "R > interactive" mode, it would be fine though taking long time. > > My questions are: > 1. Is there a known limit of terms for a formula?I think so. I seem to remember it was something around 500 characters, but was raised a couple of years ago. This is a 2010 extract of a posting by the indomitable Prof Ripley: "R-devel: ? The previously almost undocumented limit of 256 bytes on a symbol name has been raised to 10,000 bytes (a sanity check). Long symbol names can sometimes occur when deparsing expressions (for example, in model.frame). " Found with a MarkMail search with this strategy: list:org.r-project.r-devel maximum length of formula Subject:Re: [Rd] model.frame problem From:Prof Brian Ripley (rip... at stats.ox.ac.uk) Date:Nov 3, 2010 1:37:50 pm List:org.r-project.r-devel> 2. Why does the same function behave differently under debug and > regular > mode?I cannot help you there. -- David Winsemius, MD Alameda, CA, USA
R. Michael Weylandt <michael.weylandt@gmail.com>
2012-Aug-10 02:25 UTC
[R] debug vs regular mode
On Aug 9, 2012, at 9:14 PM, David Winsemius <dwinsemius at comcast.net> wrote:> > On Aug 9, 2012, at 4:56 PM, Zhang, Peng wrote: > >> Dear all, >> >> I had a R segmentation fault, and then invoked debug mode and ran step >> by step. > > >> 2. Why does the same function behave differently under debug and regular >> mode? > > I cannot help you there. >Though a reproducible segfault is certainly worth a bug report if you can do so, in debug or regular modes. You may wish to search stackoverflow for tips on how to make a great reproducible example in R. Michael
Thanks to both for your reply. library(glmulti) testdata = cbind(Y=rnorm(100), data.frame(matrix(rnorm(100*50), ncol = 50))) glmulti(Y~(X1+X2+X3+X4+X5+X6+X7+X8+X9+X10+X11+X12+X13+X14+X15)*X16, data = testdata, level = 2) This is reproducible to get a segmentation fault. But I have troubles to extract the exact information from this S4 class to make a simpler example because of my limited knowledge on S4 class. The author of the package is busy at the moment, and does not have time to look into it. Peng On 08/09/2012 10:25 PM, R. Michael Weylandt <michael.weylandt at gmail.com> wrote:> > On Aug 9, 2012, at 9:14 PM, David Winsemius <dwinsemius at comcast.net> wrote: > >> On Aug 9, 2012, at 4:56 PM, Zhang, Peng wrote: >> >>> Dear all, >>> >>> I had a R segmentation fault, and then invoked debug mode and ran step >>> by step. >> >>> 2. Why does the same function behave differently under debug and regular >>> mode? >> I cannot help you there. >> > Though a reproducible segfault is certainly worth a bug report if you can do so, in debug or regular modes. > > You may wish to search stackoverflow for tips on how to make a great reproducible example in R. > > Michael********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues
If you read my bug report, I just ran the same thing on both regular mode and debug mode. That is why I think it is related with R base, though there might be some other bugs related with glmulti or rJava. Peng On 08/10/2012 04:03 PM, peter dalgaard wrote:> On Aug 10, 2012, at 21:23 , Zhang, Peng wrote: > >> Ok. I will stop here. I have just created a bug report. >> >> https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=15013 > ...which is exactly what you should NOT do, if the bug is likely to live in a contributed package!! > > -pd > >> If anyone is interested, please see if you can reproduce it. >> >> Thanks, >> Peng >> >> On 08/10/2012 03:04 PM, peter dalgaard wrote: >>> Not to spoil your fun, but this is getting a bit off-topic for R-help. If you wish to continue the debugging process in public, I think you should move to R-devel. >>> >>> Also, it sounds like the problem is in the glmulti package, so you might want to involve its maintainer at some point. >>> >>> -pd > [much snipped] >********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues