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

> ### Name: check_overdispersion
> ### Title: Check overdispersion of GL(M)M's
> ### Aliases: check_overdispersion
> 
> ### ** Examples
> 
> if (require("glmmTMB")) {
+   data(Salamanders)
+   m <- glm(count ~ spp + mined, family = poisson, data = Salamanders)
+   check_overdispersion(m)
+ 
+   m <- glmmTMB(
+     count ~ mined + spp + (1 | site),
+     family = poisson,
+     data = Salamanders
+   )
+   check_overdispersion(m)
+ }
Loading required package: glmmTMB

 *** caught segfault ***
address 17890d94, cause 'memory not mapped'

Traceback:
 1: f(par, order = order, ...)
 2: f0(x, order = 1)
 3: gr(par)
 4: as.vector(gr(par))
 5: iterate(par)
 6: newton(par = c(b = 0.945961551381571, b = 1.04860622985199, b = 0.595855019311564, b = 1.1639550608442, b = 1.14190204612943, b = 1.14190204612943, b = 0.432146607630904, b = 0.972600827165378, b = 0.339551592934481, b = 0.769784604378046, b = -0.0688275141763419, b = 0.386870879132411, b = -0.869318757457726, b = -0.0688275141763418, b = -1.96404911324948, b = -1.41181339289545, b = -1.66053143803994, b = -1.66053143803994, b = -0.499097364204352, b = -0.221248188923543, b = -1.66053143803994, b = -1.66053143803994, b = -1.02469297670077), fn = function (par.random,     order = 0, ...) {    par[random] <- par.random    par[-random] <- par.fixed    res <- f(par, order = order, ...)    switch(order + 1, res, res[random], res[random, random])}, gr = function (x) f0(x, order = 1), he = function (par.random) {    par[random] <- par.random    par[-random] <- par.fixed    spHess(par, random = TRUE)}, env = <environment>, maxit = 1000, trace = FALSE)
 7: do.call("newton", c(list(par = eval(random.start), fn = f0, gr = function(x) f0(x,     order = 1), he = H0, env = env), inner.control))
 8: doTryCatch(return(expr), name, parentenv, handler)
 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
10: tryCatchList(expr, classes, parentenv, handlers)
11: 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))})
12: try(do.call("newton", c(list(par = eval(random.start), fn = f0,     gr = function(x) f0(x, order = 1), he = H0, env = env), inner.control)),     silent = silent)
13: ff(x, order = 0)
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({    if (MCcontrol$doMC) {        ff(x, order = 0)        MC(last.par, n = MCcontrol$n, seed = MCcontrol$seed,             order = 0)    }    else ff(x, order = 0)}, silent = silent)
19: objective(.par, ...)
20: (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 = 0, beta = 0, beta = 0, beta = 0, beta = 0, beta = 0, beta = 0, beta = 0, theta = 0), function (x = last.par[-random],     ...) {    if (tracepar) {        cat("par:\n")        print(x)    }    if (!validpar(x))         return(NaN)    ans <- try({        if (MCcontrol$doMC) {            ff(x, order = 0)            MC(last.par, n = MCcontrol$n, seed = MCcontrol$seed,                 order = 0)        }        else ff(x, order = 0)    }, silent = silent)    if (is.character(ans))         NaN    else ans}, function (x = last.par[-random], ...) {    ans <- try({        if (MCcontrol$doMC) {            ff(x, order = 0)            MC(last.par, n = MCcontrol$n, seed = MCcontrol$seed,                 order = 1)        }        else ff(x, order = 1)    }, silent = silent)    if (is.character(ans))         ans <- rep(NaN, length(x))    if (tracemgc)         cat("outer mgc: ", max(abs(ans)), "\n")    ans}, control = list(iter.max = 300, eval.max = 400))
21: do.call(control$optimizer, c(list(par, fn, gr, control = control$optCtrl),     control$optArgs))
22: eval(substitute(expr), data, enclos = parent.frame())
23: eval(substitute(expr), data, enclos = parent.frame())
24: 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))})
25: 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))})
26: optfun()
27: system.time(fit <- optfun())
28: fitTMB(TMBStruc)
29: glmmTMB(count ~ mined + spp + (1 | site), family = poisson, data = Salamanders)
An irrecoverable exception occurred. R is aborting now ...

 *** caught segfault ***
address 17a90d94, cause 'memory not mapped'

Traceback:
 1: f(par, order = order, ...)
 2: f0(x, order = 1)
 3: gr(par)
 4: as.vector(gr(par))
 5: iterate(par)
 6: newton(par = c(b = 0.945961551381571, b = 1.04860622985199, b = 0.595855019311564, b = 1.1639550608442, b = 1.14190204612943, b = 1.14190204612943, b = 0.432146607630904, b = 0.972600827165378, b = 0.339551592934481, b = 0.769784604378046, b = -0.0688275141763419, b = 0.386870879132411, b = -0.869318757457726, b = -0.0688275141763418, b = -1.96404911324948, b = -1.41181339289545, b = -1.66053143803994, b = -1.66053143803994, b = -0.499097364204352, b = -0.221248188923543, b = -1.66053143803994, b = -1.66053143803994, b = -1.02469297670077), fn = function (par.random,     order = 0, ...) {    par[random] <- par.random    par[-random] <- par.fixed    res <- f(par, order = order, ...)    switch(order + 1, res, res[random], res[random, random])}, gr = function (x) f0(x, order = 1), he = function (par.random) {    par[random] <- par.random    par[-random] <- par.fixed    spHess(par, random = TRUE)}, env = <environment>, maxit = 1000, trace = FALSE)
 7: do.call("newton", c(list(par = eval(random.start), fn = f0, gr = function(x) f0(x,     order = 1), he = H0, env = env), inner.control))
 8: doTryCatch(return(expr), name, parentenv, handler)
 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
10: tryCatchList(expr, classes, parentenv, handlers)
11: 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))})
12: try(do.call("newton", c(list(par = eval(random.start), fn = f0,     gr = function(x) f0(x, order = 1), he = H0, env = env), inner.control)),     silent = silent)
13: ff(x, order = 0)
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({    if (MCcontrol$doMC) {        ff(x, order = 0)        MC(last.par, n = MCcontrol$n, seed = MCcontrol$seed,             order = 0)    }    else ff(x, order = 0)}, silent = silent)
19: objective(.par, ...)
20: (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 = 0, beta = 0, beta = 0, beta = 0, beta = 0, beta = 0, beta = 0, beta = 0, theta = 0), function (x = last.par[-random],     ...) {    if (tracepar) {        cat("par:\n")        print(x)    }    if (!validpar(x))         return(NaN)    ans <- try({        if (MCcontrol$doMC) {            ff(x, order = 0)            MC(last.par, n = MCcontrol$n, seed = MCcontrol$seed,                 order = 0)        }        else ff(x, order = 0)    }, silent = silent)    if (is.character(ans))         NaN    else ans}, function (x = last.par[-random], ...) {    ans <- try({        if (MCcontrol$doMC) {            ff(x, order = 0)            MC(last.par, n = MCcontrol$n, seed = MCcontrol$seed,                 order = 1)        }        else ff(x, order = 1)    }, silent = silent)    if (is.character(ans))         ans <- rep(NaN, length(x))    if (tracemgc)         cat("outer mgc: ", max(abs(ans)), "\n")    ans}, control = list(iter.max = 300, eval.max = 400))
21: do.call(control$optimizer, c(list(par, fn, gr, control = control$optCtrl),     control$optArgs))
22: eval(substitute(expr), data, enclos = parent.frame())
23: eval(substitute(expr), data, enclos = parent.frame())
24: 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))})
25: 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))})
26: optfun()
27: system.time(fit <- optfun())
28: fitTMB(TMBStruc)
29: glmmTMB(count ~ mined + spp + (1 | site), family = poisson, data = Salamanders)
An irrecoverable exception occurred. R is aborting now ...