[R-SIG-Mac] Local source pkg interacts strangely with sessionInfo, causing R to crash

Bryan Hanson hanson at depauw.edu
Fri Mar 29 15:30:22 CET 2013

I'm not sure if this is an Rgui issue or Mac only issue, or an R 3.0.0 RC problem, or a problem with the pkg.   I'll start here.

I am updating my package ChemoSpec to work with R 3.0.0  With the following sessionInfo I can install the old version of ChemoSpec from a CRAN repos and it works fine:

[R.app GUI 1.60 (6457) x86_64-apple-darwin10.8.0]

> sessionInfo()
R version 3.0.0 RC (2013-03-27 r62426)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

Now I have an updated local source package of ChemoSpec which builds and checks fine.  If I install it via the gui or command line, I can do library("ChemoSpec") just fine.  But if I do ?ChemoSpec, R or Rgui just wanders off with the pinwheel of death and must be force quitted.  That's not the best clue.  If I do sessionInfo() before library("ChemoSpec") sessionInfo() works fine.  If I do sessionInfo() after library("ChemoSpec"), R or Rgui crashes.  I suspect it might be Rgui as because the crash occurs the moment I type the first '(' so it seems to occur when the gui is adding the ')' - notice that the crash info is printed before my sessionInfo command is echoed to the gui.  The crash report is below.  Suggestions most appreciated.  Bryan

> library("ChemoSpec")
Package SparseM (0.97) loaded.
	   To cite, see citation("SparseM")

Loading required namespace: tcltk

 *** caught segfault ***
address 0x0, cause 'unknown'

 1: sys.parent()
 2: sys.function(sys.parent())
 3: formals(sys.function(sys.parent()))
 4: match.arg(encoding)
 5: match(match.arg(encoding), c("", "bytes", "UTF-8"))
 6: textConnection("rval", "w", local = TRUE)
 7: capture.output(print(args(sessionInfo)))
 8: paste(capture.output(print(args(sessionInfo))), collapse = "")
 9: gsub("\\s+", " ", paste(capture.output(print(args(sessionInfo))),     collapse = ""))
10: doTryCatch(return(expr), name, parentenv, handler)
11: tryCatchOne(expr, names, parentenv, handlers[[1L]])
12: tryCatchList(expr, classes, parentenv, handlers)
13: tryCatch(expr, error = function(e) {    call <- conditionCall(e)    if (!is.null(call)) {        if (identical(call[[1L]], quote(doTryCatch)))             call <- sys.call(-4L)        dcall <- deparse(call)[1L]        prefix <- paste("Error in", dcall, ": ")        LONG <- 75L        msg <- conditionMessage(e)        sm <- strsplit(msg, "\n")[[1L]]        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")        if (is.na(w))             w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],                 type = "b")        if (w > LONG)             prefix <- paste0(prefix, "\n  ")    }    else prefix <- "Error : "    msg <- paste0(prefix, conditionMessage(e), "\n")    .Internal(seterrmessage(msg[1L]))    if (!silent && identical(getOption("show.error.messages"),         TRUE)) {        cat(msg, file = stderr())        .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = "try-error", condition = e))})
14: try(gsub("\\s+", " ", paste(capture.output(print(args(sessionInfo))),     collapse = "")), silent = TRUE)

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
> sessionInfo()

More information about the R-SIG-Mac mailing list