R crashing when used with fst package

Hi

I have a similar issue as mentioned here about R crashing.

Old question

The above question did not get any reply.

Here's my working setup

library(fst)
sessionInfo()
#> R version 4.2.0 (2022-04-22)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: Pop!_OS 22.04 LTS
#> 
#> Matrix products: default
#> BLAS:   /usr/local/lib/R/lib/libRblas.so
#> LAPACK: /usr/local/lib/R/lib/libRlapack.so
#> 
#> locale:
#>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
#>  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
#>  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
#>  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
#>  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
#> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> other attached packages:
#> [1] fst_0.9.4
#> 
#> loaded via a namespace (and not attached):
#>  [1] Rcpp_1.0.9        rstudioapi_0.13   knitr_1.39        magrittr_2.0.3   
#>  [5] R.cache_0.15.0    rlang_1.0.4       fastmap_1.1.0     fansi_1.0.3      
#>  [9] stringr_1.4.0     styler_1.7.0      highr_0.9         tools_4.2.0      
#> [13] parallel_4.2.0    xfun_0.32         R.oo_1.24.0       utf8_1.2.2       
#> [17] cli_3.3.0         withr_2.5.0       htmltools_0.5.3   yaml_2.3.5       
#> [21] digest_0.6.29     tibble_3.1.8      lifecycle_1.0.1   purrr_0.3.4      
#> [25] R.utils_2.10.1    vctrs_0.4.1       fs_1.5.2          glue_1.6.2       
#> [29] evaluate_0.16     rmarkdown_2.15    reprex_2.0.1      stringi_1.7.8    
#> [33] compiler_4.2.0    pillar_1.8.0      R.methodsS3_1.8.1 pkgconfig_2.0.3
# Generate some random data frame with 10 million rows and various column types
nr_of_rows <- 1e7

df <- data.frame(
  Logical = sample(c(TRUE, FALSE, NA), prob = c(0.85, 0.1, 0.05), nr_of_rows, replace = TRUE),
  Integer = sample(1L:100L, nr_of_rows, replace = TRUE),
  Real = sample(sample(1:10000, 20) / 100, nr_of_rows, replace = TRUE),
  Factor = as.factor(sample(labels(UScitiesD), nr_of_rows, replace = TRUE))
)

# Store the data frame to disk
write.fst(df, "dataset.fst")

# Retrieve the data frame again
df <- read.fst("dataset.fst")

Created on 2022-11-07 by the reprex package (v2.0.1)

Are you sure this is specific to RStudio? I mean, have you tried with just the R console and your code works normally?
Also, can you provide a reproducible example for your issue or a detailed step list to reproduce the problem?

Raised an issue with the package author.

Seems there are other people complaining about the same issue.

One work around that seems to work is, donot load fst using library and instead call each function with the fst:: prefix eg. fst::read.fst(..)

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.