You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fwrite first attempt to compute max line length from a sample. By default, buffer is 8MB. Here line is 30M. In this PR #3288, I use strlen and a message error indicates that buffer is too small and give an advice to increase it.
> library(data.table)
> huge_vector <- paste(rep('x', 30e6), collapse='')
> foo <- data.table::data.table(x=factor(huge_vector))
> tf <- tempfile()
>
> # this reliably crashes my R session
> data.table::fwrite(foo, file=tf)
Error in data.table::fwrite(foo, file = tf) :
Error : max line length is greater than buffer secure limit. Try to increase buffMB option. Example 'buffMB = 58'
# OK
> data.table::fwrite(foo, file=tf, buffMB=58)
Awesome PR @philippechataignon! I made a few minor changes to PR #3288 and now this example works without needing user to increase buffMB. The test is not huge really, but to keep resources to a minimum on CRAN I haven't added it to the test suite.
Bit of an edge case here, but when trying to
fwrite
a table with a very large column R crashes every time.Potentially related to #2612.
Minimal reproducible example:
Output of sessionInfo():
For what it's worth, I have 16GB RAM on the system with ~8GB free before running the above example.
The text was updated successfully, but these errors were encountered: