Skip to content
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

segfault with read_fwf() and fwf_positions() #1544

Open
MatthieuStigler opened this issue Jun 11, 2024 · 0 comments
Open

segfault with read_fwf() and fwf_positions() #1544

MatthieuStigler opened this issue Jun 11, 2024 · 0 comments

Comments

@MatthieuStigler
Copy link

MatthieuStigler commented Jun 11, 2024

I get a segfault error when running the code below, tested on two different Ubuntu machines. vroom (1.6.5) and readr (2.1.5) seem to be at the latest version currently available.

library(readr)
packageVersion("readr")
packageVersion("vroom")
starts <- c(0, 13, 19, 26)
ends <- c(11, 17, 24, NA)


txt <- "ID           Arch  Saved  What
C014KLCJSHY  -     -      #string
C014QHAKJHY  -     -      #somethin"
cat(txt)

channel_ids <- read_fwf(
  file=  txt,
  col_positions = fwf_positions(starts, ends))

Will give:

*** caught segfault ***
address 0x7f6c910fbfff, cause 'memory not mapped'
Traceback:
1: vroom_fwf_(file, as.integer(col_positions$begin), as.integer(col_positions$end), trim_ws = trim_ws, col_names = col_positions$col_names, col_types = col_types, col_select = col_select, name_repair = .name_repair, id = id, na = na, guess_max = guess_max, skip = skip, comment = comment, skip_empty_rows = skip_empty_rows, n_max = n_max, num_threads = num_threads, altrep = vroom_altrep(altrep), locale = locale, progress = progress)
2: vroom::vroom_fwf(file, col_positions = col_positions, col_types = col_types, col_select = { { col_select } }, id = id, .name_repair = name_repair, locale = locale, na = na, comment = comment, skip_empty_rows = skip_empty_rows, trim_ws = trim_ws, skip = skip, n_max = n_max, guess_max = guess_max, show_col_types = show_col_types, progress = progress, altrep = lazy, num_threads = num_threads)
3: read_fwf(file = txt, col_positions = fwf_positions(starts, ends))
Possible actions:
1: abort (with core dump, if enabled)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant