Skip to content

R 4.3.1 fails to load

5 messages · David Winsemius, Carl Witthoft, Duncan Murdoch

#
Neither R.app Gui nor R from command line will work.
This is 4.3.1 ,  MacOS 13.4  on an x86 (and yes, that's the version I 
installed).

  Heres the error traceback from the command line:

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

Traceback:
  1: as.bigz(NA)
  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(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = 
vI[[j]])
  9: asNamespace(ns)
10: namespaceImportFrom(ns, loadNamespace(j <- i[[1L]], c(lib.loc, 
.libPaths()), versionCheck = vI[[j]]), i[[2L]], from = package)
11: loadNamespace(package, lib.loc)
12: doTryCatch(return(expr), name, parentenv, handler)
13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
14: tryCatchList(expr, classes, parentenv, handlers)
15: tryCatch({    attr(package, "LibPath") <- which.lib.loc    ns <- 
loadNamespace(package, lib.loc)    env <- attachNamespace(ns, pos = pos, 
deps, exclude, include.only)}, error = function(e) {    P <- if 
(!is.null(cc <- conditionCall(e)))         paste(" in", deparse(cc)[1L]) 
    else ""    msg <- gettextf("package or namespace load failed for 
%s%s:\n %s",         sQuote(package), P, conditionMessage(e))    if 
(logical.return && !quietly)         message(paste("Error:", msg), 
domain = NA)    else stop(msg, call. = FALSE, domain = NA)})
16: library(cgwtools)

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
#
On 7/22/23 13:29, Carl Witthoft wrote:
Seems you are executing a non-base function call when this cascade of 
calls leading to the segfault begins. Perhaps this is something being 
done by an out-of-date .Rdata file load? Did you remove all `.Rdata` 
files from the potential sites of auto-loading? Did you run 
`update.packages(checkBuilt=TRUE)` after the R installation.


Best of luck---

David.
#
And I forgot to ask .... what's in your .Rprofile file?
On 7/22/23 13:29, Carl Witthoft wrote:
#
On 7/22/23 4:42 PM, David Winsemius wrote:
Nothing that ever caused trouble in the past, but FWIW, here it is:

setwd('~/Rgames')
#print('diagnostic: ~/.Rprofile ran')
#doubt this'l work... 'quartz' not recognized by startup sequence
#quartz(family='Times',points=24)
#I think fontsize is OK on the iMac -- needed par() on 10.4
#library(graphics)
#par(cex=0.7)
#I don't know what mechanism "stuffed" a value inside the 'function()" 
inside
# the definition of 'prev' , but putting in ellipsis cleaned it up
invisible(makeActiveBinding("prev", function(...) .Last.value, .GlobalEnv))

#change this list if other items desired
srclist<-c( 'mytoys.R')
for (dafile in srclist) {
source(dafile)
}
rm(dafile)
rm(srclist)
# load things I always want
if (length(find.package('cgwtools'))) library(cgwtools)


# will this fix history
#.Last <- function() if(interactive()) 
try(savehistory("~/Rgames/.Rhistory"))
# change prompt
options(prompt=paste(basename(getwd()),'> ',sep=""))

cat("Gosh, boss, it's great to see you again.\n\n")
print(fortunes::fortune())

  
    
#
Do you know where the `library(cgwtools)` call came from?  It appears to 
be the culprit.

I'd try (command line)

   R --vanilla

for a minimal load, then update packages, etc.  Then try the regular 
load.  If it still fails, go back to vanilla, and source your .Rprofile 
with echo = TRUE to see which line in it is causing this (if it is 
actually .Rprofile that is the problem).

Duncan Murdoch
On 22/07/2023 4:29 p.m., Carl Witthoft wrote: