-
Notifications
You must be signed in to change notification settings - Fork 1k
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
fread crashes R #5041
Comments
I don't seem to be able to reproduce on Windows (although a slightly newer version than yours). Maybe something else? Output
SessionInfo()
|
Hi avimallu. Please try the next row. Row 183130 is the last one before the crash. Thanks |
Gotcha. I am able to reproduce. Verbose until crash (on cmd on Windows): Show output
Interestingly, Show output without fill specified
Session Info is the same as before - first command run on R on Command Prompt, second on RStudio. |
Hmm, I had not tried it without The issue seems to be related to the quoting I highlighted here (row 183132): I removed all quotes in the original file and successfully tried:
I also tried with the original file: it works with warning (as you mentioned)
it works fine
It seems that you have to consciously disable quoting (to suppress any warnings) to enable Any thoughts? |
For now, in order to read the file, disable quoting as you did in your last line of code. The default value of Best practice is to escape all literal quote characters in your input file. Failing that, turn off quoting. Otherwise you may end up with unexpected results even if it doesn't crash. Simpler reprex: fread(paste0(paste(rep(c('a; b'), 100), collapse = '\n'), c('\n"a" 2;b')), fill = TRUE, quote = '\"') (I've located the bug but will need another day or two to push a fix, depending on when I find the time.) |
Vaclav FYI if you've found a fix, please search the issue tracker for
related issues -- I have a sense that there's another bug related to fread
segfaulting with fill=TRUE. Would be great if multiple bugs are fixed
together!
…On Mon, Jun 14, 2021, 2:43 PM Václav Tlapák ***@***.***> wrote:
Reopened #5041 <#5041>.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#5041 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB2BA5OCDEXKFHHYRYPPSNDTSZZYXANCNFSM46ROL3FQ>
.
|
Could someone dumb the issue and probable bug down a little? I am running into the same problem (a crash on using fill=TRUE). The reprex above still crashes the instance.
|
@trashbirdecology Example is working in current dev. You can update to dev version using |
Benjamin -- okay thanks, I will try that! apologies if i totally missed
that above
*______________________________________________________*
Jessica L. Burnett (she/her)
Github <http://github.com/trashbirdecology>
ORCID: 0000-0002-0896-5099
<https://orcid.org/0000-0002-0896-5099>
*______________________________________________________*
Join the Community for Data Integration <https://www.usgs.gov/centers/cdi>! All
welcome. It's cool.
…On Tue, Jan 10, 2023 at 1:54 PM Benjamin Schwendinger < ***@***.***> wrote:
fread(paste0(paste(rep(c('1; 2'), 100), collapse = '\n'), c('\n"a";2\n1;
2\n'), paste(rep(c('1; 2'), 100), collapse = '\n')),
fill = TRUE, verbose = TRUE, header = FALSE)
@trashbirdecology <https://github.com/trashbirdecology> Example is
working in current dev. You can update to dev version using
data.table:::update.dev.pkg() (or data.table:::update_dev_pkg() depending
on which data.table version you have installed locally)
—
Reply to this email directly, view it on GitHub
<#5041 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACL2TNMWAG6DKWWIU5JFNV3WRWV47ANCNFSM46ROL3FQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hello,
I am facing the same issue as described on #2228
I could isolate the issue.
RStudio crashes if you try to read row 183131
DT <- fread(file = "file.csv", sep = ";", fill = T, verbose = T, nrows = 183130)
file.zip
The text was updated successfully, but these errors were encountered: