Skip to content

error: external pointer is not valid is not a particularly user actionable message #258

@twest820

Description

@twest820

I've got a future_map() function which runs fine with plan(multisession, workers = 1) and fails with

Error in (function (.x, .f, ..., .progress = FALSE)  :In index: 1.
Caused by error:
! external pointer is not valid

for 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 to terra::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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions