{"action":"closed","issue":{"url":"https://api.github.com/repos/mpicbg-scicomp/tissue_miner/issues/15","repository_url":"https://api.github.com/repos/mpicbg-scicomp/tissue_miner","labels_url":"https://api.github.com/repos/mpicbg-scicomp/tissue_miner/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/mpicbg-scicomp/tissue_miner/issues/15/comments","events_url":"https://api.github.com/repos/mpicbg-scicomp/tissue_miner/issues/15/events","html_url":"https://github.com/mpicbg-scicomp/tissue_miner/issues/15","id":143825319,"number":15,"title":"render_movie() crashes on OSX when .parallel=T, but runs fine if .parallel=F","user":{"login":"etournay","id":13570726,"avatar_url":"https://avatars1.githubusercontent.com/u/13570726?v=3","gravatar_id":"","url":"https://api.github.com/users/etournay","html_url":"https://github.com/etournay","followers_url":"https://api.github.com/users/etournay/followers","following_url":"https://api.github.com/users/etournay/following{/other_user}","gists_url":"https://api.github.com/users/etournay/gists{/gist_id}","starred_url":"https://api.github.com/users/etournay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etournay/subscriptions","organizations_url":"https://api.github.com/users/etournay/orgs","repos_url":"https://api.github.com/users/etournay/repos","events_url":"https://api.github.com/users/etournay/events{/privacy}","received_events_url":"https://api.github.com/users/etournay/received_events","type":"User","site_admin":false},"labels":[{"id":242307587,"url":"https://api.github.com/repos/mpicbg-scicomp/tissue_miner/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":242307590,"url":"https://api.github.com/repos/mpicbg-scicomp/tissue_miner/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-03-27T16:31:18Z","updated_at":"2017-04-25T15:48:13Z","closed_at":"2017-04-25T15:48:13Z","body":"On an up-to-date tissue_miner installation on OSX, including a fresh run of Setup.R, the `render_movier()` function crashes only if parallelization is enabled. \n\n> [1] \"Creating cell_area_pattern.mp4...\"\n> using temporary directory /var/folders/30/q9h8zhpd3ts23ql_d38jm9480000gp/T//RtmpqPzUfM/file23bf566682a3/\n> Progress disabled when using parallel plyr\n> processing  0 ...\n> processing  1 ...\n> processing  2 ...\n> \n>  **\\* caught segfault ***\n> address 0x110, cause 'memory not mapped'\n> \n> Traceback:\n>  1: grDevices::png(..., res = dpi, units = \"in\")\n>  2: dev(file = filename, width = dim[1], height = dim[2], ...)\n>  3: ggsave(outputFile, gg, width = 12, height = 5)\n>  4: .fun(piece, ...)\n>  5: do.ply(i)\n>  6: eval(expr, envir, enclos)\n>  7: eval(c.expr, envir = args, enclos = envir)\n>  8: doTryCatch(return(expr), name, parentenv, handler)\n>  9: tryCatchOne(expr, names, parentenv, handlers[[1L]])\n> 10: tryCatchList(expr, classes, parentenv, handlers)\n> 11: tryCatch(eval(c.expr, envir = args, enclos = envir), error = function(e) e)\n> 12: FUN(X[[i]], ...)\n> 13: lapply(X = S, FUN = FUN, ...)\n> 14: doTryCatch(return(expr), name, parentenv, handler)\n> 15: tryCatchOne(expr, names, parentenv, handlers[[1L]])\n> 16: tryCatchList(expr, classes, parentenv, handlers)\n> 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        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 = stderr())        .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = \"try-error\", condition = e))})\n> 18: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)\n> 19: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))\n> 20: FUN(X[[i]], ...)\n> 21: lapply(seq_len(cores), inner.do)\n> 22: mclapply(argsList, FUN, mc.preschedule = preschedule, mc.set.seed = set.seed,     mc.silent = silent, mc.cores = cores)\n> 23: e$fun(obj, substitute(ex), parent.frame(), e$data)\n> 24: foreach::`%dopar%`(fe, do.ply(i))\n> 25: llply(.data = pieces, .fun = .fun, ..., .progress = .progress,     .inform = .inform, .parallel = .parallel, .paropts = .paropts)\n> 26: dlply(subset(celldata, frame%%sampleRate == 0), .(frame), function(csFrame) {    curFrame <<- unique(csFrame$frame)[1]    echo(\"processing \", curFrame, \"...\")    gg <- render_source_image(curFrame, ...) %+% csFrame    if (is.list(cellLayers)) {        for (i in 1:length(cellLayers)) {            gg <- gg + cellLayers[i]        }    }    else {        gg <- gg + cellLayers    }    outputFile = paste0(filePrefix, sprintf(\"%03d.png\", curFrame))    ggsave(outputFile, gg, width = 12, height = 5)    if (createSvgZip) {        svgFile = paste0(filePrefix, sprintf(\"%03d.svg\", curFrame))        ggsave(svgFile, gg, width = 12, height = 5)    }}, .progress = \"text\", .parallel = T, .drop = F)\n> 27: render_movie(cellArea, \"cell_area_pattern.mp4\", list(geom_polygon(aes(x_pos,     y_pos, group = cell_id, fill = area)), scale_fill_gradientn(name = \"area (px)\",     colours = c(\"black\", \"blue\", \"green\", \"yellow\", \"red\"), limits = c(0,         quantile(cellArea$area, probs = 99.9/100)), na.value = \"red\")))\n> aborting ...\n"}}
{"actor":{"display_login":"etournay"}}