readr - write_csv - gives Fatal Error in R studio

Hi Everyone,

This is my first post here. I've been using tidyverse package from quite some time and I've never encountered this error. When I try to write +500 mb csv files using the Readr package and write_csv I'm getting an R studio Fatal Error and need to restart the session. I've run this code maybe more than 200 times right now and never got this issue before. Right now I can't manage to write any big csv files even in other codes.
image

Can you please give me a hint on where the problem could be?

thank you very much

If you are writing to the same filename you originally read from try passing lazy = FALSE when reading the file.

If that doesn't fix your problem you will need to provide more information and data on exactly what you are doing and what your environment is.

2 Likes

Thank you for your quick reply. I'm not overwriting any file. I'm importing a raw database and then doing some actuarial calculations and then exporting to a csv file. I've done this process thousands of times, but until last week I've never received this type of fatal error. I've tried it with 2 different computers and both return me this message.

What information should i share with you?

File Size: 785.7 MB
Type: Data.Table ot data.frame
Variables: 53
Observations: 1,868,414

It is worth noting that I managed to write the csv using base R . (h= name of file and modelo= directory to which i save some outputs)

write.csv(h,file=paste0(modelo,"h.csv"),na = '',fileEncoding = 'UTF-8')

thanks

If you are able to reproduce the crash with a small subset of the total file it would be helpful if you could open an issue with the example at Issues · tidyverse/readr · GitHub.

1 Like

Perfect, thank you very much.

I have a similar problem. When I try to overwrite a csv file, I get a fatal error. But if I save the file in another folder, or in the same folder with another name, the error doesn't happen.

1 Like

*** caught bus error ***
address 0x11dd7501b, cause 'non-existent physical address'

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.