Hi, I'm writing my own package to look at some real estate pricing (e.g. predict pricing for an apartment based on historical sales data). In my package, I have written functions that make use of some readr
functions e.g. readr::read_csv()
, readr::parse_number()
.
The issue I'm having is that RStudio is throwing a R encountered a fatal error
message when I run one of my functions that makes a call to a readr
function. (I've isolated it to readr
calls by commenting/uncommenting code). I am able to repeat the error on a new RStudio session when I Install and Restart
my package. If I do a Load All
call, then the error does not occur.
I've outlined the steps I have taken so far below and have included the last few lines of my C:\Users\Tom\AppData\Local\RStudio-Desktop\log\rsession-Tom.log log file.
I have also gone through the same steps on my Macbook, and using only the R GUI on Windows, and the error does not occur. Hence, it looks to me like it is a Windos RStudio issue?
Any suggestions on where to look / try next to diagnose the issue?
Steps taken:
-
install.packages("readr")
(completes successfully) -
Document
from the RStudio Build\More menu window (completes all ok) -
Check
from the RStudio Build window (completes 0 errors, 0 warnings and 1 note on no visible binding for global variables '.' and the package internal data sources) -
Install and Restart
from the RStudio Build window - Run my custom package with a function that makes a call to readr::function
- RStudio notification of R fatal error
- Repeat
Install and Restart
from the RStudio Build window -
Load All
from the RStudio Build\More menu window - Run my custom package with a function that makes a call to readr::function
- No fatal error
Windows system config:
RStudio v1.3.1093 (have done uninstall, download, install)
R x86_64 v4.0.3 (have done uninstall, download, install)
Windows 10 Home v2004 build 19041.572
Mac system config:
RStudio v1.3.1093
R v4.0.3 x86_64 v4.0.3
MacOS High Sierra v10.13.6
Log file:
04 Nov 2020 18:40:32 [rsession-Tom] WARNING Invalid values found in C:/Users/Tom/AppData/Local/RStudio/rstudio-desktop.json: /export_viewer_options/format, /export_viewer_options/viewAfterSave, /export_viewer_options/copyAsMetafile; LOGGED FROM: class rstudio::core::Error __cdecl rstudio::session::prefs::PrefLayer::loadPrefsFromFile(const class rstudio::core::FilePath &,const class rstudio::core::FilePath &) src/cpp/session/prefs/PrefLayer.cpp:165
04 Nov 2020 18:40:41 [rsession-Tom] ERROR system error 10053 (An established connection was aborted by the software in your host machine) [request-uri: /events/get_events]; OCCURRED AT void __cdecl rstudio::session::HttpConnectionImpl<class rstudio_boost::asio::ip::tcp>::sendResponse(const class rstudio::core::http::Response &) src/cpp/session/http/SessionWin32HttpConnectionListener.cpp:113; LOGGED FROM: void __cdecl rstudio::session::HttpConnectionImpl<class rstudio_boost::asio::ip::tcp>::sendResponse(const class rstudio::core::http::Response &) src/cpp/session/http/SessionWin32HttpConnectionListener.cpp:118
04 Nov 2020 18:40:46 [rsession-Tom] WARNING Invalid values found in C:/Users/Tom/AppData/Local/RStudio/rstudio-desktop.json: /export_viewer_options/format, /export_viewer_options/viewAfterSave, /export_viewer_options/copyAsMetafile; LOGGED FROM: class rstudio::core::Error __cdecl rstudio::session::prefs::PrefLayer::loadPrefsFromFile(const class rstudio::core::FilePath &,const class rstudio::core::FilePath &) src/cpp/session/prefs/PrefLayer.cpp:165
04 Nov 2020 18:40:57 [rsession-Tom] WARNING Invalid values found in C:/Users/Tom/AppData/Local/RStudio/rstudio-desktop.json: /export_viewer_options/format, /export_viewer_options/viewAfterSave, /export_viewer_options/copyAsMetafile; LOGGED FROM: class rstudio::core::Error __cdecl rstudio::session::prefs::PrefLayer::loadPrefsFromFile(const class rstudio::core::FilePath &,const class rstudio::core::FilePath &) src/cpp/session/prefs/PrefLayer.cpp:165