[R] strange R GUI crash

Johan Sandblom jsandblom at gmail.com
Tue Nov 21 16:45:39 CET 2006


R-2.4.0 on Debian does roughly the same thing, but the seg fault is
caught somehow.

johans at smoke:~$ R --vanilla

R version 2.4.0 Patched (2006-11-03 r39777)
Copyright (C) 2006 The R Foundation for Statistical Computing
ISBN 3-900051-07-0

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> sessionInfo()
R version 2.4.0 Patched (2006-11-03 r39777)
i486-pc-linux-gnu

locale:
LC_CTYPE=sv_SE;LC_NUMERIC=C;LC_TIME=sv_SE;LC_COLLATE=sv_SE;LC_MONETARY=sv_SE;LC_
MESSAGES=sv_SE;LC_PAPER=sv_SE;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=sv_SE;LC_IDENTIFICATION=C

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

> R.Version()
$platform
[1] "i486-pc-linux-gnu"

$arch
[1] "i486"

$os
[1] "linux-gnu"

$system
[1] "i486, linux-gnu"

$status
[1] "Patched"

$major
[1] "2"

$minor
[1] "4.0"

$year
[1] "2006"

$month
[1] "11"

$day
[1] "03"

$`svn rev`
[1] "39777"

$language
[1] "R"

$version.string
[1] "R version 2.4.0 Patched (2006-11-03 r39777)"

> test<-function(bla,foo){ bla+foo}
> options(error=recover)
> test(5)
Error in test(5) : argument "foo" is missing, with no default

Enter a frame number, or 0 to exit

1: test(5)

Selection: 1
Called from: eval(expr, envir, enclos)
Browse[1]> Recall()

 *** caught segfault ***
address 0x18f, cause 'memory not mapped'

Traceback:
 1: eval(expr, envir, enclos)
 2: Recall()
 3: eval(expr, envir, enclos)
 4: eval(quote(browser()), envir = sys.frame(which))
 5: function () {    if (.isMethodsDispatchOn()) {        tState <-
tracingState(FALSE)        on.exit(tracingState(tState))    }    calls
<- sys.calls()    from <- 0    n <- length(calls)    if
(identical(sys.function(n), recover))         n <- n - 1    for (i in
rev(seq_len(n))) {        calli <- calls[[i]]        fname <-
calli[[1]]        if (!is.na(match(deparse(fname)[1],
c("methods::.doTrace",             ".doTrace")))) {            from <-
i - 1            break        }    }    if (from == 0)         for (i
in rev(seq_len(n))) {            calli <- calls[[i]]            fname
<- calli[[1]]            if (!is.name(fname) ||
is.na(match(as.character(fname),                 c("recover", "stop",
"Stop")))) {                from <- i                break
}        }    if (from > 0) {        if (!interactive()) {
try(dump.frames())            cat(gettext("recover called
non-interactively; frames dumped, use debugger() to view\n"))
  return(NULL)        }        else if
(identical(options()$show.error.messages, FALSE)) {
return(NULL)        }        calls <- limitedLabels(calls[1:from])
   repeat {            which <- menu(calls, title = "\nEnter a frame
number, or 0 to exit  ")            if (which > 0)
eval(quote(browser()), envir = sys.frame(which))            else break
       }    }    else cat(gettext("No suitable frames for
recover()\n"))}()
 6: test(5)

Possible actions:
1: abort (with core dump)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace


Regards, Johan

2006/11/21, Gustaf Rydevik <gustaf.rydevik at gmail.com>:
> Hi all,
> I know I shouldn't really expect the following to work, but it
> provokes a crash of the GUI on my computer (Win xp professional).
>
> ---
> >sessionInfo()
> Version 2.3.1 (2006-06-01)
> i386-pc-mingw32
>
> attached base packages:
> [1] "methods"   "stats"     "graphics"  "grDevices" "utils"     "datasets"
> [7] "base"
> >test<-function(bla,foo){ bla+foo}
> >options(error=recover)
> > test(5)
> Error in test(5) : argument "foo" is missing, with no default
>
> Enter a frame number, or 0 to exit
>
> 1: test(5)
>
> Selection: 1
> Called from: eval(expr, envir, enclos)
> Browse[1]> Recall()
> ---
>
> And here the  R GUI crashes, i.e a dialog pops up saying that R has
> encountered an error and must close.
> I'm not sure what I was thinking when calling Recall(), but I
> shouldn't be punished this harshly for being stupid, methinks.
>
> best,
>
> Gustaf
>
>
>
> --
> email:gustaf.rydevik at gmail.com
> tel: +46(0)703051451
> address: Kantorsgatan 50:190 75424 Uppsala Sweden
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
>


-- 
Johan Sandblom  N8, MRC, Karolinska sjh
t +46851776108  17176 Stockholm
m +46735521477  Sweden
"What is wanted is not the will to believe, but the
will to find out, which is the exact opposite"
- Bertrand Russell



More information about the R-help mailing list