Skip to content

fread crash when using fill=TRUE option in a file with bad quotes #5610

@AndeolEvain

Description

@AndeolEvain

fread crashes when trying to call:

data.table::fread("testDoc.csv",
                         sep = ";",
                         quote = "\"",
                         header = TRUE,
                         fill = TRUE)

on this file, that I reduced to a minimal example: testDoc.csv

It seems to be due to the bad quotes in the last line, combined with fill = TRUE.
If the file is shorter, fread just returns an error without crashing, which is expected and not a problem.

The crash is consistently reproduced for me. I'm on windows 11, and tried it with data.table 1.14.0, as well as the latest 1.14.8, both on R.3.6.3 and R.4.2.2

I think it might be related to the bug report: #5110

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions