Running examples in ‘buildmer-Ex.R’ failed
The error most likely occurred in:

> ### Name: buildglmmTMB
> ### Title: Use 'buildmer' to perform stepwise elimination on 'glmmTMB'
> ###   models
> ### Aliases: buildglmmTMB
> 
> ### ** Examples
> 
> library(buildmer)
> if (requireNamespace('glmmTMB')) {
+ 	model <- buildglmmTMB(Reaction ~ Days + (Days|Subject),data=lme4::sleepstudy)
+ }
Loading required namespace: glmmTMB
Determining predictor order
Fitting via glmmTMB, with ML: Reaction ~ 1

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

Traceback:
 1: f(x, order = 0)
 2: objective(.par, ...)
 3: (function (start, objective, gradient = NULL, hessian = NULL,     ..., scale = 1, control = list(), lower = -Inf, upper = Inf) {    par <- setNames(as.double(start), names(start))    n <- length(par)    iv <- integer(78 + 3 * n)    v <- double(130 + (n * (n + 27))/2)    .Call(C_port_ivset, 2, iv, v)    if (length(control)) {        nms <- names(control)        if (!is.list(control) || is.null(nms))             stop("'control' argument must be a named list")        pos <- pmatch(nms, names(port_cpos))        if (any(nap <- is.na(pos))) {            warning(sprintf(ngettext(length(nap), "unrecognized control element named %s ignored",                 "unrecognized control elements named %s ignored"),                 paste(sQuote(nms[nap]), collapse = ", ")), domain = NA)            pos <- pos[!nap]            control <- control[!nap]        }        ivpars <- pos <= 4        vpars <- !ivpars        if (any(ivpars))             iv[port_cpos[pos[ivpars]]] <- as.integer(unlist(control[ivpars]))        if (any(vpars))             v[port_cpos[pos[vpars]]] <- as.double(unlist(control[vpars]))    }    obj <- quote(objective(.par, ...))    rho <- new.env(parent = environment())    assign(".par", par, envir = rho)    grad <- hess <- low <- upp <- NULL    if (!is.null(gradient)) {        grad <- quote(gradient(.par, ...))        if (!is.null(hessian)) {            if (is.logical(hessian))                 stop("logical 'hessian' argument not allowed.  See documentation.")            hess <- quote(hessian(.par, ...))        }    }    if (any(lower != -Inf) || any(upper != Inf)) {        low <- rep_len(as.double(lower), length(par))        upp <- rep_len(as.double(upper), length(par))    }    else low <- upp <- numeric()    .Call(C_port_nlminb, obj, grad, hess, rho, low, upp, d = rep_len(as.double(scale),         length(par)), iv, v)    iv1 <- iv[1L]    list(par = get(".par", envir = rho), objective = v[10L],         convergence = (if (iv1 %in% 3L:6L) 0L else 1L), iterations = iv[31L],         evaluations = c(`function` = iv[6L], gradient = iv[30L]),         message = if (19 <= iv1 && iv1 <= 43) {            if (any(B <- iv1 == port_cpos)) sprintf("'control' component '%s' = %g, is out of range",                 names(port_cpos)[B], v[iv1]) else sprintf("V[IV[1]] = V[%d] = %g is out of range (see PORT docu.)",                 iv1, v[iv1])        } else port_msg(iv1))})(c(beta = 1, betad = 0), function (x = last.par, ...) {    if (tracepar) {        cat("par:\n")        print(x)    }    if (!validpar(x))         return(NaN)    res <- f(x, order = 0)    if (!ADreport) {        if (is.finite(res) && res < value.best) {            last.par.best <<- x            value.best <<- res        }    }    res}, function (x = last.par, ...) {    ans <- f(x, order = 1)    if (tracemgc)         cat("outer mgc: ", max(abs(ans)), "\n")    ans}, control = list(iter.max = 300, eval.max = 400))
 4: do.call(control$optimizer, c(list(par, fn, gr, control = control$optCtrl),     control$optArgs))
 5: eval(substitute(expr), data, enclos = parent.frame())
 6: eval(substitute(expr), data, enclos = parent.frame())
 7: with.default(obj, if (length(par)) {    do.call(control$optimizer, c(list(par, fn, gr, control = control$optCtrl),         control$optArgs))} else {    list(par = par, objective = fn(par))})
 8: with(obj, if (length(par)) {    do.call(control$optimizer, c(list(par, fn, gr, control = control$optCtrl),         control$optArgs))} else {    list(par = par, objective = fn(par))})
 9: optfun()
10: system.time(fit <- optfun())
11: fitTMB(TMBStruc)
12: (function (formula, data = NULL, family = gaussian(), ziformula = ~0,     dispformula = ~1, weights = NULL, offset = NULL, contrasts = NULL,     na.action = na.fail, se = TRUE, verbose = FALSE, doFit = TRUE,     control = glmmTMBControl(), REML = FALSE, start = NULL, map = NULL,     sparseX = NULL) {    call <- mf <- mc <- match.call()    if (is.character(family)) {        if (family == "beta") {            family <- "beta_family"            warning("please use ", sQuote("beta_family()"), " rather than ",                 sQuote("\"beta\""), " to specify a Beta-distributed response")        }        family <- get(family, mode = "function", envir = parent.frame())    }    if (is.function(family)) {        family <- family()    }    if (is.null(family$family)) {        print(family)        stop("'family' not recognized")    }    fnames <- names(family)    if (!all(c("family", "link") %in% fnames))         stop("'family' must contain at least 'family' and 'link' components")    if (length(miss_comp <- setdiff(c("linkfun", "variance"),         fnames)) > 0) {        warning("some components missing from ", sQuote("family"),             ": downstream methods may fail")    }    if (grepl("^quasi", family$family))         stop("\"quasi\" families cannot be used in glmmTMB")    link <- family$link    environment(formula) <- parent.frame()    call$formula <- mc$formula <- formula    offsub <- substitute(offset)    if (is.numeric(offsub)) {        data[["..offset"]] <- offset        offsub <- quote(..offset)    }    if (!is.null(eval(offsub, data, enclos = environment(formula)))) {        formula <- addForm0(formula, makeOp(offsub, op = quote(offset)))    }    environment(ziformula) <- environment(formula)    call$ziformula <- ziformula    environment(dispformula) <- environment(formula)    call$dispformula <- dispformula    m <- match(c("data", "subset", "weights", "na.action", "offset"),         names(mf), 0L)    mf <- mf[c(1L, m)]    mf$drop.unused.levels <- TRUE    mf[[1]] <- as.name("model.frame")    mf$data <- data    if (inForm(ziformula, quote(.))) {        ziformula <- update(RHSForm(drop.special2(formula), as.form = TRUE),             ziformula)    }    formList <- list(formula, ziformula, dispformula)    for (i in seq_along(formList)) {        f <- formList[[i]]        f <- noSpecials(subbars(f), delete = FALSE)        formList[[i]] <- f    }    combForm <- do.call(addForm, formList)    environment(combForm) <- environment(formula)    for (i in c("weights", "offset")) {        if (!eval(bquote(missing(x = .(i)))))             assign(i, get(i, parent.frame()), environment(combForm))    }    mf$formula <- combForm    fr <- eval(mf, envir = environment(formula), enclos = parent.frame())    nobs <- nrow(fr)    weights <- as.vector(model.weights(fr))    if (!is.null(weights) & !okWeights(family$family)) {        stop("'weights' are not available for this family.")    }    if (is.null(weights))         weights <- rep(1, nobs)    respCol <- attr(terms(fr), "response")    names(respCol) <- names(fr)[respCol]    y <- fr[, respCol]    if (is.matrix(y)) {        if (!binomialType(family$family)) {            stop("matrix-valued responses are not allowed")        }    }    etastart <- mustart <- NULL    if (!is.null(family$initialize)) {        local(eval(family$initialize))    }    if (grepl("^truncated", family$family) && (!is.factor(y) &&         any(y < 0.001)) && (ziformula == ~0)) {        stop(paste0("'", names(respCol), "'", " contains zeros (or values close to zero). ",             "Zeros are compatible with a truncated distribution only when zero-inflation is added"))    }    if (grepl("(nbinom|pois)", family$family)) {        if (any(abs(y - round(y)) > 0.001)) {            warning(sprintf("non-integer counts in a %s model",                 family$family))        }    }    TMBStruc <- mkTMBStruc(formula, ziformula, dispformula, combForm,         mf, fr, yobs = y, respCol, weights, contrasts = contrasts,         family = family, se = se, call = call, verbose = verbose,         REML = REML, start = start, map = map, sparseX = sparseX,         control = control)    TMBStruc$control <- lapply(control, eval, envir = TMBStruc)    if (!doFit)         return(TMBStruc)    res <- fitTMB(TMBStruc)    return(res)})(formula = Reaction ~ 1, data = list(Reaction = c(249.56, 258.7047, 250.8006, 321.4398, 356.8519, 414.6901, 382.2038, 290.1486, 430.5853, 466.3535, 222.7339, 205.2658, 202.9778, 204.707, 207.7161, 215.9618, 213.6303, 217.7272, 224.2957, 237.3142, 199.0539, 194.3322, 234.32, 232.8416, 229.3074, 220.4579, 235.4208, 255.7511, 261.0125, 247.5153, 321.5426, 300.4002, 283.8565, 285.133, 285.7973, 297.5855, 280.2396, 318.2613, 305.3495, 354.0487, 287.6079, 285, 301.8206, 320.1153, 316.2773, 293.3187, 290.075, 334.8177, 293.7469, 371.5811, 234.8606, 242.8118, 272.9613, 309.7688, 317.4629, 309.9976, 454.1619, 346.8311, 330.3003, 253.8644, 283.8424, 289.555, 276.7693, 299.8097, 297.171, 338.1665, 332.0265, 348.8399, 333.36, 362.0428, 265.4731, 276.2012, 243.3647, 254.6723, 279.0244, 284.1912, 305.5248, 331.5229, 335.7469, 377.299, 241.6083, 273.9472, 254.4907, 270.8021, 251.4519, 254.6362, 245.4523, 235.311, 235.7541, 237.2466, 312.3666, 313.8058, 291.6112, 346.1222, 365.7324, 391.8385, 404.2601, 416.6923, 455.8643, 458.9167, 236.1032, 230.3167, 238.9256, 254.922, 250.7103, 269.7744, 281.5648, 308.102, 336.2806, 351.6451, 256.2968, 243.4543, 256.2046, 255.5271, 268.9165, 329.7247, 379.4445, 362.9184, 394.4872, 389.0527, 250.5265, 300.0576, 269.8939, 280.5891, 271.8274, 304.6336, 287.7466, 266.5955, 321.5418, 347.5655, 221.6771, 298.1939, 326.8785, 346.8555, 348.7402, 352.8287, 354.4266, 360.4326, 375.6406, 388.5417, 271.9235, 268.4369, 257.2424, 277.6566, 314.8222, 317.2135, 298.1353, 348.1229, 340.28, 366.5131, 225.264, 234.5235, 238.9008, 240.473, 267.5373, 344.1937, 281.1481, 347.5855, 365.163, 372.2288, 269.8804, 272.4428, 277.8989, 281.7895, 279.1705, 284.512, 259.2658, 304.6306, 350.7807, 369.4692, 269.4117, 273.474, 297.5968, 310.6316, 287.1726, 329.6076, 334.4818, 343.2199, 369.1417, 364.1236), Days = c(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9), Subject = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L)), family = list(family = "gaussian", link = "identity", linkfun = function (mu) mu, linkinv = function (eta) eta, variance = function (mu) rep.int(1, length(mu)), dev.resids = function (y, mu, wt) wt * ((y - mu)^2), aic = function (y, n, mu, wt, dev) {    nobs <- length(y)    nobs * (log(dev/nobs * 2 * pi) + 1) + 2 - sum(log(wt))}, mu.eta = function (eta) rep.int(1, length(eta)), initialize = expression({    n <- rep.int(1, nobs)    if (is.null(etastart) && is.null(start) && is.null(mustart) &&         ((family$link == "inverse" && any(y == 0)) || (family$link ==             "log" && any(y <= 0))))         stop("cannot find valid starting values: please specify some")    mustart <- y}), validmu = function (mu) TRUE, valideta = function (eta) TRUE), REML = FALSE)
13: do.call(fun, args)
14: doTryCatch(return(expr), name, parentenv, handler)
15: tryCatchOne(expr, names, parentenv, handlers[[1L]])
16: tryCatchList(expr, classes, parentenv, handlers)
17: 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        sm <- strsplit(conditionMessage(e), "\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 && isTRUE(getOption("show.error.messages"))) {        cat(msg, file = outFile)        .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = "try-error", condition = e))})
18: try(do.call(fun, args))
19: withCallingHandlers(expr, warning = function(w) if (inherits(w,     classes)) tryInvokeRestart("muffleWarning"))
20: suppressWarnings(try(do.call(fun, args)))
21: run(fun, args, p$quiet)
22: patch.lm(p, fun, c(list(formula = formula, data = p$data, family = p$family,     REML = p$reml), p$dots))
23: p$fit(p, build.formula(p$dep, have, p$env))
24: reorder(p, tab[fxd, ])
25: order(p = list(formula = Reaction ~ Days + (Days | Subject),     data = list(Reaction = c(249.56, 258.7047, 250.8006, 321.4398,     356.8519, 414.6901, 382.2038, 290.1486, 430.5853, 466.3535,     222.7339, 205.2658, 202.9778, 204.707, 207.7161, 215.9618,     213.6303, 217.7272, 224.2957, 237.3142, 199.0539, 194.3322,     234.32, 232.8416, 229.3074, 220.4579, 235.4208, 255.7511,     261.0125, 247.5153, 321.5426, 300.4002, 283.8565, 285.133,     285.7973, 297.5855, 280.2396, 318.2613, 305.3495, 354.0487,     287.6079, 285, 301.8206, 320.1153, 316.2773, 293.3187, 290.075,     334.8177, 293.7469, 371.5811, 234.8606, 242.8118, 272.9613,     309.7688, 317.4629, 309.9976, 454.1619, 346.8311, 330.3003,     253.8644, 283.8424, 289.555, 276.7693, 299.8097, 297.171,     338.1665, 332.0265, 348.8399, 333.36, 362.0428, 265.4731,     276.2012, 243.3647, 254.6723, 279.0244, 284.1912, 305.5248,     331.5229, 335.7469, 377.299, 241.6083, 273.9472, 254.4907,     270.8021, 251.4519, 254.6362, 245.4523, 235.311, 235.7541,     237.2466, 312.3666, 313.8058, 291.6112, 346.1222, 365.7324,     391.8385, 404.2601, 416.6923, 455.8643, 458.9167, 236.1032,     230.3167, 238.9256, 254.922, 250.7103, 269.7744, 281.5648,     308.102, 336.2806, 351.6451, 256.2968, 243.4543, 256.2046,     255.5271, 268.9165, 329.7247, 379.4445, 362.9184, 394.4872,     389.0527, 250.5265, 300.0576, 269.8939, 280.5891, 271.8274,     304.6336, 287.7466, 266.5955, 321.5418, 347.5655, 221.6771,     298.1939, 326.8785, 346.8555, 348.7402, 352.8287, 354.4266,     360.4326, 375.6406, 388.5417, 271.9235, 268.4369, 257.2424,     277.6566, 314.8222, 317.2135, 298.1353, 348.1229, 340.28,     366.5131, 225.264, 234.5235, 238.9008, 240.473, 267.5373,     344.1937, 281.1481, 347.5855, 365.163, 372.2288, 269.8804,     272.4428, 277.8989, 281.7895, 279.1705, 284.512, 259.2658,     304.6306, 350.7807, 369.4692, 269.4117, 273.474, 297.5968,     310.6316, 287.1726, 329.6076, 334.4818, 343.2199, 369.1417,     364.1236), Days = c(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2,     3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1,     2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0,     1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,     0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8,     9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7,     8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6,     7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5,     6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4,     5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9), Subject = c(1L,     1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L,     2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L,     4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L, 5L, 5L,     5L, 5L, 5L, 5L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 7L,     7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 8L, 8L, 8L, 8L, 8L, 8L,     8L, 8L, 8L, 8L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 10L,     10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 11L, 11L, 11L,     11L, 11L, 11L, 11L, 11L, 11L, 11L, 12L, 12L, 12L, 12L, 12L,     12L, 12L, 12L, 12L, 12L, 13L, 13L, 13L, 13L, 13L, 13L, 13L,     13L, 13L, 13L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L,     14L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 16L,     16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 17L, 17L, 17L,     17L, 17L, 17L, 17L, 17L, 17L, 17L, 18L, 18L, 18L, 18L, 18L,     18L, 18L, 18L, 18L, 18L)), fit = function (p, formula)     {        if (p$reml && is.null(lme4::findbars(formula))) {            family <- p$family            if (is.character(family))                 family <- get(family)            if (is.function(family))                 family <- family()            if (family$family %in% c("poisson", "binomial")) {                p$dots$control <- NULL                p$quickstart <- 0                return(fit.gam(p, formula))            }        }        if ("offset" %in% names(p$dots)) {            buildmer_offset <- p$dots$offset            p$dots$offset <- NULL            fun <- function(...) glmmTMB::glmmTMB(..., offset = buildmer_offset)        }        else {            fun <- glmmTMB::glmmTMB        }        progress(p, "Fitting via glmmTMB, with ", ifelse(p$reml,             "REML", "ML"), ": ", formula)        patch.lm(p, fun, c(list(formula = formula, data = p$data,             family = p$family, REML = p$reml), p$dots))    }, family = list(family = "gaussian", link = "identity",         linkfun = function (mu)         mu, linkinv = function (eta)         eta, variance = function (mu)         rep.int(1, length(mu)), dev.resids = function (y, mu,             wt)         wt * ((y - mu)^2), aic = function (y, n, mu, wt, dev)         {            nobs <- length(y)            nobs * (log(dev/nobs * 2 * pi) + 1) + 2 - sum(log(wt))        }, mu.eta = function (eta)         rep.int(1, length(eta)), initialize = expression({            n <- rep.int(1, nobs)            if (is.null(etastart) && is.null(start) && is.null(mustart) &&                 ((family$link == "inverse" && any(y == 0)) ||                   (family$link == "log" && any(y <= 0))))                 stop("cannot find valid starting values: please specify some")            mustart <- y        }), validmu = function (mu)         TRUE, valideta = function (eta)         TRUE), direction = c("order", "backward"), cl = NULL,     crit = function (p, ref, alt)     {        if (is.null(ref)) {            chLL <- get2LL(alt)            chdf <- getdf(alt)            f1 <- ~0        }        else {            chLL <- get2LL(ref) - get2LL(alt)            chdf <- getdf(alt) - getdf(ref)            f1 <- formula(ref)        }        if (chdf <= 0) {            return(0)        }        f2 <- formula(alt)        tab1 <- tabulate.formula(f1)        tab2 <- tabulate.formula(f2)        fe.same <- isTRUE(all.equal(tab1[is.na(tab1$grouping),             ], tab2[is.na(tab2$grouping), ]))        re.same <- isTRUE(all.equal(tab1[!is.na(tab1$grouping),             ], tab2[!is.na(tab2$grouping), ]))        if (fe.same && !re.same) {            p1 <- stats::pchisq(chLL, chdf, lower.tail = FALSE,                 log.p = TRUE) - log(2)            p2 <- stats::pchisq(chLL, chdf - 1, lower.tail = FALSE,                 log.p = TRUE) - log(2)            log(exp(p1) + exp(p2))        }        else {            stats::pchisq(chLL, chdf, lower.tail = FALSE, log.p = TRUE)        }    }, elim = function (logp)     exp(logp) >= 0.05, include = NULL, quiet = FALSE, calc.anova = FALSE,     calc.summary = TRUE, ddf = "Wald", quickstart = 0, dep = "Reaction",     REML = NA, can.use.reml = TRUE, force.reml = FALSE, singular.ok = FALSE,     grad.tol = 0.04, hess.tol = 0.002, I_KNOW_WHAT_I_AM_DOING = FALSE,     dots = list(), call = (Reaction ~ Days + (Days | Subject))(data = lme4::sleepstudy,         fit = function (p, formula)         {            if (p$reml && is.null(lme4::findbars(formula))) {                family <- p$family                if (is.character(family))                   family <- get(family)                if (is.function(family))                   family <- family()                if (family$family %in% c("poisson", "binomial")) {                  p$dots$control <- NULL                  p$quickstart <- 0                  return(fit.gam(p, formula))                }            }            if ("offset" %in% names(p$dots)) {                buildmer_offset <- p$dots$offset                p$dots$offset <- NULL                fun <- function(...) glmmTMB::glmmTMB(..., offset = buildmer_offset)            }            else {                fun <- glmmTMB::glmmTMB            }            progress(p, "Fitting via glmmTMB, with ", ifelse(p$reml,                 "REML", "ML"), ": ", formula)            patch.lm(p, fun, c(list(formula = formula, data = p$data,                 family = p$family, REML = p$reml), p$dots))        }, dots = (Reaction ~ Days + (Days | Subject))(data = lme4::sleepstudy,             fit = function (p, formula)             {                if (p$reml && is.null(lme4::findbars(formula))) {                  family <- p$family                  if (is.character(family))                     family <- get(family)                  if (is.function(family))                     family <- family()                  if (family$family %in% c("poisson", "binomial")) {                    p$dots$control <- NULL                    p$quickstart <- 0                    return(fit.gam(p, formula))                  }                }                if ("offset" %in% names(p$dots)) {                  buildmer_offset <- p$dots$offset                  p$dots$offset <- NULL                  fun <- function(...) glmmTMB::glmmTMB(...,                     offset = buildmer_offset)                }                else {                  fun <- glmmTMB::glmmTMB                }                progress(p, "Fitting via glmmTMB, with ", ifelse(p$reml,                   "REML", "ML"), ": ", formula)                patch.lm(p, fun, c(list(formula = formula, data = p$data,                   family = p$family, REML = p$reml), p$dots))            })), family = list(family = "gaussian", link = "identity",         linkfun = function (mu)         mu, linkinv = function (eta)         eta, variance = function (mu)         rep.int(1, length(mu)), dev.resids = function (y, mu,             wt)         wt * ((y - mu)^2), aic = function (y, n, mu, wt, dev)         {            nobs <- length(y)            nobs * (log(dev/nobs * 2 * pi) + 1) + 2 - sum(log(wt))        }, mu.eta = function (eta)         rep.int(1, length(eta)), initialize = expression({            n <- rep.int(1, nobs)            if (is.null(etastart) && is.null(start) && is.null(mustart) &&                 ((family$link == "inverse" && any(y == 0)) ||                   (family$link == "log" && any(y <= 0))))                 stop("cannot find valid starting values: please specify some")            mustart <- y        }), validmu = function (mu)         TRUE, valideta = function (eta)         TRUE), is.gaussian = TRUE, crit.name = "LRT", elim.name = "LRT",     env = <environment>, tab = list(index = c(NA, NA, "3 1",     "3 1"), grouping = c(NA, NA, "Subject", "Subject"), term = c("1",     "Days", "1", "Days"), code = c("1", "Days", "3 1 Subject 1",     "3 1 Subject Days"), block = c("NA NA 1", "NA NA Days", "NA Subject 1",     "NA Subject Days")), parallel = FALSE, parply = function (X,         FUN, ...)     {        FUN <- match.fun(FUN)        if (!is.vector(X) || is.object(X))             X <- as.list(X)        .Internal(lapply(X, FUN))    }, reml = TRUE, ordered = ""))
26: do.call(p$direction[[i]], list(p = within.list(p, {    crit <- crits[[i]]})))
27: buildmer.fit(p)
28: buildglmmTMB(Reaction ~ Days + (Days | Subject), data = lme4::sleepstudy)
An irrecoverable exception occurred. R is aborting now ...