Skip to content

fread "segfault from C stack overflow" using 1M+ columns #1967

@malbianco

Description

@malbianco

I'm using "fread" function to read a file with 160 rows and columns 1141430.
The function will stop reporting an error "Error: segfault from C stack overflow" and closing the R session.
The file contains letters. Only the first two columns contain names.
This problem occurs only in the Mac system, and works well on Linux and Windows environments.

Mac OSX: 10.12.2
Version: 1.10.0 data.table
Files: http://datadryad.org/bitstream/handle/10255/dryad.104088/Dryad_Submission.7z?sequence=1
Info files: http://datadryad.org/resource/doi:10.5061/dryad.1p7sf/1
R script:
genotype_path='/Users/Gabriele/Desktop/Dryad_Submission-0/4H_160indivs_Final.ped'
pops <- data.table::fread(genotype_path, sep = " ", header = FALSE, verbose=TRUE)

verbose output :

Input contains no \n. Taking this to be a filename to open
File opened, filesize is 0.340174 GB.
Memory mapping ... ok
Detected eol as \r\n (CRLF) in that order, the Windows standard.
Positioned on line 1 after skip or autostart
This line is the autostart and not blank so searching up for the last non-blank ... line 1
Using supplied sep ' ' ... found ok
Detected 1141430 columns. Longest stretch was from line 1 to line 30
Starting data input on line 1 (either column names or first row of data). First 10 characters: Jacobs H70
'header' changed by user from 'auto' to FALSE
Count of eol: 161 (including 1 at the end)
Count of sep: 182628640
nrow = MIN( nsep [182628640] / (ncol [1141430] -1), neol [161] - endblanks [1] ) = 160
Type codes (point 0): 44111144444444444444444444444444444444444444404444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444000044444444440044444444000044444444444444444444444444004444444444444444444444444444444444004400440044444444444444444444444444004444444444444400444444444444444444444444444444444444444444444400444400440044444444444444444444444444444444444444444444444400444400444444444444444444444444444444444444444444004400440044004400444444444444444444444444444444440000004444004400444444444444440044000044444444444444444444444444440044004400444400444444440000444444444444444444444444440044444444444444444444444444444444004444440044004444444400444444444400444444004444444444004444004400444444444444444444004444004444444400444444444444444444440044444444004444444444444444444444000044000044444400440044444444444444444444004444444444444444444444444444444444444444444444444400444444444400444444004444444...

Could you help me with this?

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