Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up
This issue is similar to several previous issues;
loading a file containing
NULASCII character (in bytesas.raw(0)), except that I have a minimal reproducible example which appears to cause a segfault on line fread.R@146This example is based on simulation software output where very rarely there can be
NULcharacters in the body of the file (issue #2485 has already resolvedNULcharacters at the end of a file). It appearsNULcharacters at the beginning of a file are acceptable as well.The header field is key=value pairs, and the data field is to be read into a data.table. In the example,
NULcharacters has been inserted into the body, you only need one to cause an error which cannot be caught with error handling.Verbose tracelog is provided using a file
test1.R;Running
test1.R;A different error can be achieved by inserting
NULcharacters at the beginning of the data field (after the header field) intest2.R;Running
test2.R;The data.table above loads with a warning, however it is not the correct size (0 rows and 1 cols).
If you change the inserted byte to anything other than 0 [1 - 255],
freadworks fine (by including the byte in one of the data.table elements).