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

rbindlist segfault when a table includes an 'ordered factor' with NA in its levels #3601

Closed
dbetebenner opened this issue May 26, 2019 · 1 comment · Fixed by #3603
Closed
Milestone

Comments

@dbetebenner
Copy link

We've encountered an issue that didn't appear in 1.12.0 with rbindlist but does appear in 1.12.2 and later. Below is a small example that produces the problem on version 1.12.3 on Amazon Linux.

dt1 <- structure(list(V1 = c("2016", "2016", "2016", "2016", "2016"),
    V46 = structure(c(3L, 1L, 1L, NA, 3L), .Label = c("Low",
    "Typical", "High", NA), class = c("ordered", "factor"))), class = c("data.table", "data.frame"), row.names = c(NA, -5L))

dt2 <- structure(list(V1 = c("2018", "2018", "2018", "2018", "2018")), row.names = c(NA, -5L), class = c("data.table", "data.frame"))

dt3 <- rbindlist(list(dt1, dt2), fill=TRUE)

*** caught segfault ***
address (nil), cause 'unknown'

sessionInfo()
R version 3.5.2 (2018-12-20)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Amazon Linux 2

Matrix products: default
BLAS: /usr/local/lib64/R/lib/libRblas.so
LAPACK: /usr/local/lib64/R/lib/libRlapack.so

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C

[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] data.table_1.12.3

loaded via a namespace (and not attached):
[1] compiler_3.5.2

@mattdowle mattdowle added this to the 1.12.4 milestone May 26, 2019
@mattdowle mattdowle changed the title rbindlist segfault when a table includes an 'ordered factor' rbindlist segfault when a table includes an 'ordered factor' with NA in its levels May 26, 2019
@dbetebenner
Copy link
Author

Thanks Matt!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants