[tlocoh-info] segfault /memory not mapped error with lhs.iso.add()

Gina Joue g.joue at uke.de
Thu May 23 16:01:12 CEST 2019


Hi,

I am getting a segfault/memory not mapped error when I try to use
lhs.iso.add() on one of my subjects (I am trying to narrow down what k
nearest neighbors to use and have a rough idea based on one subject
(lhs.iso.add() worked with this other subject) and wanted to see how the
hulls look with this k on a random other subject. By the way, I have
over 130 subjects so didn't think I should try on everyone all at once
but would appreciate any advice on managing such large datasets. Below
is the trace of the call. I had run

sub051.lhs <- lxy.lhs(path.lxy, k=4:10, id=51)

and my s parameter is set to 0.00025 (human subjects running in a
virtual environment with a few seconds per trials for a total of 1 hr).
I get the error in RStudio and also command-line R (R version 3.6.0
(2019-04-26), but I guess it must have something to do with the "not
enough hulls" problem?

Thanks a lot in advance,
Gina

---------------- error message -----------------------------------
> sub051.lhs <- lhs.iso.add(sub051.lhs, id=51)
Merging hulls into isopleths
51.pts27320.k4.s0.kmin0
  Sorting hulls by area...Done.
  Unioning hulls
  Not enough hulls available for isopleth level(s): 0.5, 0.75, 0.95
  |+++++++++++++++++++++++++++++++++++++++++++++++++| 100%
  1 invalid polygon(s) removed
51.pts27320.k5.s0.kmin0
  Sorting hulls by area...Done.
  Unioning hulls
  Not enough hulls available for isopleth level(s): 0.75, 0.95
  |+++++++++++++++++++++++++++++++++++++++++++++++++| 100%

 *** caught segfault ***
address (nil), cause 'memory not mapped'

Traceback:
 1: RGEOSBinTopoFunc(spgeom1, spgeom2, byid, id, drop_lower_td,
unaryUnion_if_byid_false,     "rgeos_union")
 2: rgeos::gUnion(grps.cum.union.lst[[i - 1]], ind.grps.union.lst[[i]],
   id = as.character(i))
 3: doTryCatch(return(expr), name, parentenv, handler)
 4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 5: tryCatchList(expr, classes, parentenv, handlers)
 6: 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))})
 7: try(rgeos::gUnion(grps.cum.union.lst[[i - 1]],
ind.grps.union.lst[[i]],     id = as.character(i)), silent = TRUE)
 8: hulls2iso.rgeos(hulls =
hs[[hs.name]][["hulls"]][hulls2merge.idx.srt,     ], points.lst =
hs[[hs.name]][["enc.pts"]][["idx"]][hulls2merge.idx.srt],     iso.levels
= iso.levels.use, iso.method = iso.method, hm.vals =
hm.vals[hm.vals.ord],     decreasing =
hme[[sort.metric.use]][["iso.dec"]], iso.cap.method = iso.cap.method,
total.num.points = length(hs[[hs.name]][["pts"]]), hs.name = hs.name,
sliver_check = sliver_check, status = status)
 9: lhs.iso.add(sub051.lhs, id = 51)

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection:
Warning messages:
1: In hulls2iso.rgeos(hulls =
hs[[hs.name]][["hulls"]][hulls2merge.idx.srt,  :
  51.pts27320.k4.s0.kmin0: not enough hulls available for iso level(s):
0.5, 0.75, 0.95
2: In hulls2iso.rgeos(hulls =
hs[[hs.name]][["hulls"]][hulls2merge.idx.srt,  :
  51.pts27320.k5.s0.kmin0: not enough hulls available for iso level(s):
0.75, 0.95

----------------------------------------------------------------------

--

_____________________________________________________________________

Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg | www.uke.de
Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. Dr. Uwe Koch-Gromus, Joachim Prölß, Marya Verdel
_____________________________________________________________________

SAVE PAPER - THINK BEFORE PRINTING


More information about the Tlocoh-info mailing list