[R] debug vs regular mode

Henric (Nilsson) Winell nilsson.henric at gmail.com
Fri Aug 10 15:25:56 CEST 2012


On 2012-08-10 06:10, Zhang, Peng wrote:

> 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.

There's some information missing here, notably the output from 
'sessionInfo()', but I guess this is under GNU/Linux.  I can confirm a 
seg. fault under Fedora FC17 x86_64.

Under Windows 7 64-bit, however, we get some further info:

 > library("glmulti")
Loading required package: rJava
 > 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)
Initialization...
Error in .jnew("glmulti/ModelGenerator", y, .jarray(xc), .jarray(xq),  :
   java.lang.ArrayIndexOutOfBoundsException: 15
 >
 > sessionInfo()
R version 2.15.1 Patched (2012-08-06 r60178)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=Swedish_Sweden.1252  LC_CTYPE=Swedish_Sweden.1252
[3] LC_MONETARY=Swedish_Sweden.1252 LC_NUMERIC=C
[5] LC_TIME=Swedish_Sweden.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] glmulti_1.0.4 rJava_0.9-3
 >

So, this doesn't seem to be a bug in R and is thus likely to need the 
attention of the 'glmulti' package's maintainer.


HTH,
Henric



> 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
>
> ______________________________________________
> 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.
>



More information about the R-help mailing list