Skip to content
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

selecting non exsisting colum in tbl_df causes segfault in distinct #1245

Closed
ringprince opened this issue Jul 2, 2015 · 0 comments
Closed

selecting non exsisting colum in tbl_df causes segfault in distinct #1245

ringprince opened this issue Jul 2, 2015 · 0 comments
Assignees
Milestone

Comments

@ringprince
Copy link

@ringprince ringprince commented Jul 2, 2015

I am on

  • os x 10.9.5
  • R 3.2.0
  • dplyr 0.4.2

Here is a reproducible segfault:

 library("dplyr")
 foo = data.frame(x = 1:10, y = 1:10)
 foo[, c("z", "x", "y")] %>% distinct  ## all 'fine'
 ## Error in `[.data.frame`(foo, , c("z", "x", "y")) : 
 ##   undefined columns selected

 tbl_df(foo)[, c("z", "x", "y")] %>% distinct

 ##  *** caught segfault ***
 ## address 0x0, cause 'memory not mapped'
 ## 
 ## Traceback:
 ##  1: .Call("dplyr_distinct_impl", PACKAGE = "dplyr", df, vars)
 ##  2: distinct_impl(dist$data, dist$vars)
 ##  3: distinct_.data.frame(.data, .dots = lazyeval::lazy_dots(...))
 ##  4: NextMethod()
 ##  5: is.data.frame(data)
 ##  6: eval(expr, envir, enclos)
 ##  7: eval(assertion, env)
 ##  8: doTryCatch(return(expr), name, parentenv, handler)
 ##  9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 ## 10: tryCatchList(expr, classes, parentenv, handlers)
 ## 11: tryCatch({    eval(assertion, env)}, assertError = function(e) {    structure(FALSE, msg = e$message)})
 ## 12: see_if(..., env = env)
 ## 13: assert_that(is.data.frame(data))
 ## 14: tbl_df(NextMethod())
 ## 15: distinct_.tbl_df(.data, .dots = lazyeval::lazy_dots(...))
 ## 16: distinct_(.data, .dots = lazyeval::lazy_dots(...))
 ## 17: distinct(.)
 ## 18: function_list[[k]](value)
 ## 19: withVisible(function_list[[k]](value))
 ## 20: freduce(value, `_function_list`)
 ## 21: `_fseq`(`_lhs`)
 ## 22: eval(expr, envir, enclos)
 ## 23: eval(quote(`_fseq`(`_lhs`)), env, env)
 ## 24: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
 ## 25: tbl_df(foo)[, c("z", "x", "y")] %>% distinct
 ## 
 ## 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: 2
@romainfrancois romainfrancois self-assigned this Jul 8, 2015
@romainfrancois romainfrancois added this to the 0.5 milestone Jul 8, 2015
krlmlr pushed a commit to krlmlr/dplyr that referenced this issue Mar 2, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jun 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants