-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error: external pointer is not valid is not a particularly user actionable message #258
Comments
That error comes from base R, not from furrr. This vignette explains in more detail You could try setting |
Thanks! Unfortunately, Error in (function (.x, .f, ..., .progress = FALSE) : ℹ In index: 1.
Caused by error:
! Detected a non-exportable reference (‘externalptr’) in the value (of class ‘LAS’) of the resolved future This appears to be triggered by the LAS object returned from a call to |
I'd have to see a minimal example. furrr and future seem to be trying to export that object to your workers |
I think you can set |
Only a one line difference from #259. library(dplyr)
library(furrr)
library(sf)
library(terra)
plan(multisession, workers = 16)
simpleFeatureCollection = st_read("simpleFeatureCollection.gpkg")
mediumSizeRaster = rast("twoGBraster.tif") # global in this case
with_progress({
progressBar = progressor(steps = nrow(simpleFeatureCollection))
future_map(simpleFeatureCollection$ID, function(polygonID)
{
regionOfInterestPolygon = (simpleFeatureCollection %>% filter(ID == polygonID))[1]
rasterRegionOfInterest = crop(mediumSizeRaster, regionOfInterestPolygon)
<do computationally intensive things>
progressBar(<update message>)
})
})
Indeed! Unfortunately I'm not spotting anything illuminating. Or seeing anything in the other future options which would write out the failed
|
I've got a
future_map()
function which runs fine withplan(multisession, workers = 1)
and fails withfor
workers
> 1.From the point at which the error's thrown I know it's a problem somewhere in 158 lines of code which use 10 different packages. While I've narrowed that down by deleting code from the function passed to
future_map()
(the first problematic line of code encountered is a call toterra::crop()
but there may be others) it'd be nice if furrr could be more specific, for example by indicating which R workspace variable the problematic pointer goes with, saying why the pointer isn't valid, and what to do to make it valid.I suspect this error might be raised from somewhere under package globals but, as there's no stack trace available, have no way of confirming. (I get no hits for the error text in either furrr or globals but it looks like github search might be having a hard time because the string contains the word not.)
The text was updated successfully, but these errors were encountered: