After installing R 4.2.0, XQuartz, and all my packages, I got the following error message when I restarted RStudio:
R encountered a fatal error.
The session was terminated.
When I started the R.app, I got the following error message:
*** caught segfault ***
address 0x2e9e8, cause 'memory not mapped'Traceback:
1: initMethodDispatch(where)
2: fun(libname, pkgname)
3: doTryCatch(return(expr), name, parentenv, handler)
4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
5: tryCatchList(expr, classes, parentenv, handlers)
6: tryCatch(fun(libname, pkgname), error = identity)
7: runHook(".onLoad", env, package.lib, package)
8: loadNamespace(package, lib.loc)
9: doTryCatch(return(expr), name, parentenv, handler)
10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
11: tryCatchList(expr, classes, parentenv, handlers)
12: tryCatch({ attr(package, "LibPath") <- which.lib.loc pos = pos, deps, exclude, include.only)}, error = function(e) { deparse(cc)[1L]) else "" msg <- gettextf("package or namespace load failed for %s%s:\n %s", sQuote(package), P, ns <- loadNamespace(package, lib.loc) P <- if (!is.null(cc <- conditionCall(e))) paste(" in", conditionMessage(e)) = FALSE, domain = NA)})
13: library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, warn.conflicts = warn.conflicts, quietly = quietly, mask.ok = mask.ok, exclude = exclude, include.only = include.only, attach.required = attach.required)
14: doTryCatch(return(expr), name, parentenv, handler)
15: tryCatchOne(expr, names, parentenv, handlers[[1L]])
16: tryCatchList(expr, classes, parentenv, handlers)
17: tryCatch(library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, warn.conflicts = warn.conflicts, quietly = quietly, mask.ok = mask.ok, exclude = exclude, include.only = include.only, attach.required = attach.required), error = function(e) e)
18: require(pkg, quietly = TRUE, warn.conflicts = FALSE, character.only = TRUE)
19: .OptRequireMethods()
I got no error message when I just started with the base and recommended packages included in the installation of a 'clean' R 4.2.0. It turned out that the packages tibbles
and rmarkdown
were generating my error messages. Copying these packages from my R 4.1.3 version did not work.
Could it be that there is something wrong with my version of XCode (13.3.1) or gfortran (GNU Fortran (GCC) 11.2.0)? The CRAN page says that R 4.2.0 "uses Xcode 12.4 and GNU Fortran 8.2".
Returning via RSwitch to my R version 4.1.3 works smoothly with RStudio and all packages. Starting the standalone R.app results in the reported error. Starting RStudio with R version 4.2.0 without tibbles
and rmarkdown
is also working.
Any idea what's wrong with my installation?
macOS Monterey 12.3.1, on an Intel MacBook Pro (13-inch, 2020)