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

Vector memory exhausted #270

Closed
marciz opened this issue Oct 13, 2020 · 1 comment
Closed

Vector memory exhausted #270

marciz opened this issue Oct 13, 2020 · 1 comment
Labels
bug an unexpected problem or unintended behavior

Comments

@marciz
Copy link

marciz commented Oct 13, 2020

library(vroom)
x <- data.frame(a = 1:1e7, b = as.character(1:1e7))
tfile <- tempfile()
vroom_write(x = x, path = tfile)

Error: vector memory exhausted (limit reached?)
Error: vector memory exhausted (limit reached?)
*** recursive gc invocation
Error: cannot get ALTSTRING_ELT during GC

R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)

Matrix products: default

locale:
[1] LC_COLLATE=Latvian_Latvia.1257 LC_CTYPE=Latvian_Latvia.1257
[3] LC_MONETARY=Latvian_Latvia.1257 LC_NUMERIC=C
[5] LC_TIME=Latvian_Latvia.1257

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

other attached packages:
[1] vroom_1.3.1

loaded via a namespace (and not attached):
[1] crayon_1.3.4 dplyr_1.0.2 R6_2.4.1 lifecycle_0.2.0 magrittr_1.5
[6] pillar_1.4.6 httr_1.4.2 rlang_0.4.7 rstudioapi_0.11 ellipsis_0.3.1
[11] generics_0.0.2 vctrs_0.3.4 tools_4.0.2 bit64_4.0.5 glue_1.4.2
[16] purrr_0.3.4 tinytex_0.26 bit_4.0.4 xfun_0.17 compiler_4.0.2
[21] pkgconfig_2.0.3 tidyselect_1.1.0 tibble_3.0.3

No issue with R version 3.6.1 & vroom 1.2.0

@jimhester
Copy link
Collaborator

This isn't due to any changes in vroom, it is because in R 4.0+ as.character(1:1e7) is a ALTREP vector, whereas in R 3.6.1 it is a normal vector. vroom 1.2.0 with R 4.0 exhibits the same behavior.

@jimhester jimhester added the bug an unexpected problem or unintended behavior label Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants