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/crash with subset on empty tables where zeros are at the end of the non-empty subset #1937

Closed
arunsrinivasan opened this Issue Nov 29, 2016 · 0 comments

Comments

Projects
None yet
2 participants
@arunsrinivasan
Member

arunsrinivasan commented Nov 29, 2016

I've managed to reproduce this on Windows. Here's a MRE.

require(data.table) # v1.9.8, R version 3.3.1, Windows 7
.Call("CsubsetVector", character(0), 1:0)
# Error: attempt to set index 1/1 in SET_STRING_ELT

Running it again hangs up the R session. The actual usage was subsetting of an empty table, but I tracked it down to subsetVector. Note that both .Call("CsubsetVector", character(0), 1L) and .Call("CsubsetVector", character(0), 0L), from a fresh session, work fine.

@arunsrinivasan arunsrinivasan added the bug label Nov 29, 2016

@mattdowle mattdowle added this to the v1.9.10 milestone Nov 29, 2016

@mattdowle mattdowle changed the title from error/crash with subset on empty tables to error/crash with subset on empty tables where zeros are at the end of the subset Nov 29, 2016

@mattdowle mattdowle changed the title from error/crash with subset on empty tables where zeros are at the end of the subset to error/crash with subset on empty tables where zeros are at the end of the non-empty subset Nov 29, 2016

@mattdowle mattdowle closed this in c0f6367 Nov 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment