Skip to content

flowClust segfault on a given hardcoded prior  #17

@mikejiang

Description

@mikejiang

here is the reproducible data

library(flowClust)
load("flowClust_debug.rda")#see the attached file
tmix_results <- flowClust(fr, varNames = channels, K = 5, trans = 0, usePrior = "yes", prior = prior)
Using the serial version of flowClust

 *** caught segfault ***
address (nil), cause 'unknown'

Traceback:
 1: .C("flowClust", as.double(t(y)), as.integer(ly), as.integer(py),     as.integer(K[i]), w = rep(0, K[i]), mu = rep(0, K[i] * py),     precision = initprec, lambda = as.double(rep(lambda, length.out = (if (trans >         1) K[i] else 1))), nu = as.double(rep(nu, K[i])), z = rep(0,         ly * K[i]), u = rep(0, ly * K[i]), as.integer(if (M ==         0) label else maxLabel[[M]]), uncertainty = double(ly),     as.double(rep(u.cutoff, K[i])), as.double(z.cutoff), flagOutliers = integer(ly),     as.integer(B), as.double(tol), as.integer(trans), as.integer(nu.est),     logLike = as.double(0), as.integer(control$B.lambda), as.integer(control$B.brent),     as.double(control$tol.brent), as.double(control$xLow), as.double(control$xUp),     as.double(control$nuLow), as.double(control$nuUp), mu0 = as.double(t(Mu0)),     as.double(kappa0), nu0 = as.double(nu0), lambda0 = as.double(Lambda0),     omega0 = as.double(Omega0), w0 = as.double(w0), as.integer(.model),     oorder = as.integer(oorder), PACKAGE = "flowClust")
 2: doTryCatch(return(expr), name, parentenv, handler)
 3: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 4: tryCatchList(expr, classes, parentenv, handlers)
 5: 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 = outFile)        .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = "try-error", condition = e))})
 6: try(.C("flowClust", as.double(t(y)), as.integer(ly), as.integer(py),     as.integer(K[i]), w = rep(0, K[i]), mu = rep(0, K[i] * py),     precision = initprec, lambda = as.double(rep(lambda, length.out = (if (trans >         1) K[i] else 1))), nu = as.double(rep(nu, K[i])), z = rep(0,         ly * K[i]), u = rep(0, ly * K[i]), as.integer(if (M ==         0) label else maxLabel[[M]]), uncertainty = double(ly),     as.double(rep(u.cutoff, K[i])), as.double(z.cutoff), flagOutliers = integer(ly),     as.integer(B), as.double(tol), as.integer(trans), as.integer(nu.est),     logLike = as.double(0), as.integer(control$B.lambda), as.integer(control$B.brent),     as.double(control$tol.brent), as.double(control$xLow), as.double(control$xUp),     as.double(control$nuLow), as.double(control$nuUp), mu0 = as.double(t(Mu0)),     as.double(kappa0), nu0 = as.double(nu0), lambda0 = as.double(Lambda0),     omega0 = as.double(Omega0), w0 = as.double(w0), as.integer(.model),     oorder = as.integer(oorder), PACKAGE = "flowClust"))
 7: FUN(X[[i]], ...)
 8: lapply(as.list(1:length(K)), .flowClustK, y, expName = expName,     varNames = varNames, K = K, criterion = criterion, nu = nu,     lambda = lambda, trans = trans, min.count = min.count, max.count = max.count,     min = min, max = max, randomStart = randomStart, include = include,     rm.max, rm.min, prior, usePrior, ...)
 9: flowClust(fr, varNames = channels, K = 5, trans = 0, usePrior = "yes",     prior = prior)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions