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

Summarise crashes #208

Closed
hadley opened this issue Jan 23, 2014 · 3 comments
Closed

Summarise crashes #208

hadley opened this issue Jan 23, 2014 · 3 comments
Assignees
Labels
Milestone

Comments

@hadley
Copy link
Member

@hadley hadley commented Jan 23, 2014

library(dplyr)
mtcars_cyl_am <- summarise(group_by(mtcars, cyl, gear), m1 = mean(mpg))
summarise(mtcars_cyl_am, m2 = mean(mpg))
@ghost ghost assigned romainfrancois Jan 23, 2014
@romainfrancois
Copy link
Member

@romainfrancois romainfrancois commented Jan 23, 2014

Ouch. Probably a bad use of boost hash maps :/

> summarise(mtcars_cyl_am, m2 = mean(mpg))
Process 20015 stopped
* thread #1: tid = 0xe8903, 0x0000000106ebed60 dplyr.so`dplyr::LazyGroupedSubsets::get_variable(SEXPREC*) const [inlined] boost::unordered::iterator_detail::iterator<boost::unordered::detail::ptr_node<std::__1::pair<SEXPREC* const, dplyr::GroupedSubset*> >*, std::__1::pair<SEXPREC* const, dplyr::GroupedSubset*> >::operator++() + 1 at buckets.hpp:369, queue = 'com.apple.main-thread, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x0000000106ebed60 dplyr.so`dplyr::LazyGroupedSubsets::get_variable(SEXPREC*) const [inlined] boost::unordered::iterator_detail::iterator<boost::unordered::detail::ptr_node<std::__1::pair<SEXPREC* const, dplyr::GroupedSubset*> >*, std::__1::pair<SEXPREC* const, dplyr::GroupedSubset*> >::operator++() + 1 at buckets.hpp:369
   366          }
   367
   368          iterator& operator++() {
-> 369              node_ = static_cast<node_pointer>(node_->next_);
   370              return *this;
   371          }
   372

Loading

@kevinushey
Copy link
Contributor

@kevinushey kevinushey commented Jan 23, 2014

Isn't the problem just that mpg is not defined in mtcars_cyl_am? Can't you check for the existence of symbols passed early on?

Loading

@romainfrancois
Copy link
Member

@romainfrancois romainfrancois commented Jan 23, 2014

That was it. Fixed now.

Loading

@lock lock bot locked as resolved and limited conversation to collaborators Jun 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants