RStudio Server crash, restart requires project reopen to load packrat libs
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 409
- Forks
- 89
- PR merge metrics
- No merged PRs in 30d
Description
In using RStudio Server with packrat, if the session crashes, a dialog box will pop up mentioning "The previous R session was abnormally terminated due to an unexpected crash. You may have lost workspace data as a result of this crash." ; however when it does restart, the packrat project libraries look like they are available, but they cannot be loaded with library(xyz). They are correctly available if I reopen the project (ie. .Rprofile can run source("packrat/inti.R")), and packrat can access the project libraries.
A reprex would be:
- create an R Project that uses packrat and install a library (say, "xyz") that is not available in the system or user libraries (ie. "xyz" would only be available via packrat)
- crash RStudio Server with
.Call("abort") - view the "The previous R session was abnormally terminated due to an unexpected crash. You may have lost workspace data as a result of this crash." dialog
- attempt to run library("xyz") and confirm that the package can't be loaded
- reopen the project and confirm that the package can be loaded with library("xyz")
It looks like the working directory is also the user's home directory after the crash. I'm not sure if that may be playing a role here.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the crash and restart sequence in an RStudio Server R Project using packrat, then compare the post-crash working directory and .Rprofile behavior with a reopened project. Inspect the packrat project initialization path, including source("packrat/inti.R"). Done means packrat libraries load after recovery without reopening the project, with regression coverage for the scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100