RStudio crashed and can't be reopened

Hey everyone,

I am currently using RStudio for Desktops in its latest version 2024.04.2-764 on Windows 11.

Last night I already had some troube with parts of my code not running, which was surprising because it before had worked without isse. After reopening RStudio today, the whole screen just turned black and I could not move the window anymore either. After forcefully closing RStudio with the taskmanager, I can't reopen the programme.

Whenever I try to open RStudio now, the Windows Taskbar just disappears, but nothing else happens. No Rstudio Logo appears and it doesn't open either. Over the Window-key, I can access the windows Taskbar and close R. Here, I get the error message: Quit R Session: Save workshace image to ~/.RData?

I turned my laptop off and on again, de- and reinstalled RStudio and press the Ctrl key while opening, nothing worked.

Do you know what the problem is? I am not the most knowledgable regarding IT, so I am kind of at my wits end.
Thank you!

You might want to try resetting RStudio's state as described here: https://support.posit.co/hc/en-us/articles/200534577-Resetting-RStudio-Desktop-s-State.

If that does not fix things, try running the RStudio executable from a command prompt and see if it works (or, if not, spits up some error message).

If that too fails, try running the RStudio executable from a command prompt with the option "-- run-diagnostics". That will not open RStudio, but it will write a diagnostic report in a text file and tell you where it stored the file. You can open the file in a text editor, redact any information you wouldn't want to share on the internet, and then post the redacted version here.

**Thank you very much! **

I tried everything you described. Resetting the Rstudio's state did not work, running the RStudio exe from the command promt resulted in the following error messages:

[5896:0720/234915.386:ERROR:gpu_process_host.cc(993)] GPU process exited unexpectedly: exit_code=-2147483645
[5896:0720/234917.238:ERROR:gpu_process_host.cc(993)] GPU process exited unexpectedly: exit_code=-2147483645
[5896:0720/234918.458:ERROR:gpu_process_host.cc(993)] GPU process exited unexpectedly: exit_code=34

C:\Program Files\RStudio> rstudio.exe

C:\Program Files\RStudio>
[24784:0720/235221.528:ERROR:gpu_process_host.cc(993)] GPU process exited unexpectedly: exit_code=34
[24784:0720/235223.908:ERROR:gpu_process_host.cc(993)] GPU process exited unexpectedly: exit_code=34
[24784:0720/235225.564:ERROR:gpu_process_host.cc(993)] GPU process exited unexpectedly: exit_code=34

Here is the (redacted) diagnostics report:
(it is quite long...)

RStudio Diagnostics Report

WARNING: This report may contain sensitive security information and / or
personally identifiable information. Please audit the below and redact any
sensitive information before submitting your diagnostics report.

RStudio Version

2024.04.2+764

R Version

platform : x86_64-w64-mingw32
arch : x86_64
os : mingw32
crt : ucrt
system : x86_64, mingw32
status :
major : 4
minor : 3.2
year : 2023
month : 10
day : 31
svn rev : 85441
language : R
version.string : R version 4.3.2 (2023-10-31 ucrt)
nickname : Eye Holes

R Home

C:/PROGRA~1/R/R-43~1.2

R Search Path

.GlobalEnv
tools:rstudio
package:stats
package:graphics
package:grDevices
package:utils
package:datasets
package:methods
Autoloads
package:base

R Library Paths

C:/Users/-/AppData/Local/R/win-library/4.3
C:/Program Files/R/R-4.3.2/library

Loaded Packages

base : C:/PROGRA~1/R/R-43~1.2/library/base
compiler : C:/Program Files/R/R-4.3.2/library/compiler
datasets : C:/Program Files/R/R-4.3.2/library/datasets
graphics : C:/Program Files/R/R-4.3.2/library/graphics
grDevices : C:/Program Files/R/R-4.3.2/library/grDevices
methods : C:/Program Files/R/R-4.3.2/library/methods
stats : C:/Program Files/R/R-4.3.2/library/stats
tools : C:/Program Files/R/R-4.3.2/library/tools
utils : C:/Program Files/R/R-4.3.2/library/utils

Installed Packages

      Package                                       LibPath    Version

1 abind C:/Users/-/AppData/Local/R/win-library/4.3 1.4-5
2 askpass C:/Users/-/AppData/Local/R/win-library/4.3 1.2.0
3 backports C:/Users/-/AppData/Local/R/win-library/4.3 1.4.1
4 base64enc C:/Users/-/AppData/Local/R/win-library/4.3 0.1-3
5 bit C:/Users/-/AppData/Local/R/win-library/4.3 4.0.5
6 bit64 C:/Users/-/AppData/Local/R/win-library/4.3 4.0.5
7 blob C:/Users/-/AppData/Local/R/win-library/4.3 1.2.4
8 broom C:/Users/-/AppData/Local/R/win-library/4.3 1.0.5
9 bslib C:/Users/-/AppData/Local/R/win-library/4.3 0.6.1
10 cachem C:/Users/-/AppData/Local/R/win-library/4.3 1.0.8
11 callr C:/Users/-/AppData/Local/R/win-library/4.3 3.7.5
12 car C:/Users/-/AppData/Local/R/win-library/4.3 3.1-2
13 carData C:/Users/-/AppData/Local/R/win-library/4.3 3.0-5
14 cellranger C:/Users/-/AppData/Local/R/win-library/4.3 1.1.0
15 cli C:/Users/-/AppData/Local/R/win-library/4.3 3.6.2
16 clipr C:/Users/-/AppData/Local/R/win-library/4.3 0.8.0
17 colorspace C:/Users/-/AppData/Local/R/win-library/4.3 2.1-0
18 commonmark C:/Users/-/AppData/Local/R/win-library/4.3 1.9.1
19 conflicted C:/Users/-/AppData/Local/R/win-library/4.3 1.2.0
20 corrplot C:/Users/-/AppData/Local/R/win-library/4.3 0.92
21 cowplot C:/Users/-/AppData/Local/R/win-library/4.3 1.1.3
22 cpp11 C:/Users/-/AppData/Local/R/win-library/4.3 0.4.7
23 crayon C:/Users/-/AppData/Local/R/win-library/4.3 1.5.2
24 crosstalk C:/Users/-/AppData/Local/R/win-library/4.3 1.2.1
25 curl C:/Users/-/AppData/Local/R/win-library/4.3 5.2.0
26 data.table C:/Users/-/AppData/Local/R/win-library/4.3 1.15.0
27 DBI C:/Users/-/AppData/Local/R/win-library/4.3 1.2.2
28 dbplyr C:/Users/-/AppData/Local/R/win-library/4.3 2.4.0
29 digest C:/Users/-/AppData/Local/R/win-library/4.3 0.6.34
30 dplyr C:/Users/-/AppData/Local/R/win-library/4.3 1.1.4
31 dtplyr C:/Users/-/AppData/Local/R/win-library/4.3 1.3.1
32 ellipsis C:/Users/-/AppData/Local/R/win-library/4.3 0.3.2
33 energy C:/Users/-/AppData/Local/R/win-library/4.3 1.7-11
34 evaluate C:/Users/-/AppData/Local/R/win-library/4.3 0.23
35 fansi C:/Users/-/AppData/Local/R/win-library/4.3 1.0.6
36 farver C:/Users/-/AppData/Local/R/win-library/4.3 2.1.1
37 fastmap C:/Users/-/AppData/Local/R/win-library/4.3 1.1.1
38 fontawesome C:/Users/-/AppData/Local/R/win-library/4.3 0.5.2
39 forcats C:/Users/-/AppData/Local/R/win-library/4.3 1.0.0
40 foreign C:/Users/-/AppData/Local/R/win-library/4.3 0.8-86
41 fs C:/Users/-/AppData/Local/R/win-library/4.3 1.6.3
42 gargle C:/Users/-/AppData/Local/R/win-library/4.3 1.5.2
43 generics C:/Users/-/AppData/Local/R/win-library/4.3 0.1.3
44 ggplot2 C:/Users/-/AppData/Local/R/win-library/4.3 3.5.0
45 ggpubr C:/Users/-/AppData/Local/R/win-library/4.3 0.6.0
46 ggrepel C:/Users/-/AppData/Local/R/win-library/4.3 0.9.5
47 ggsci C:/Users/-/AppData/Local/R/win-library/4.3 3.2.0
48 ggsignif C:/Users/-/AppData/Local/R/win-library/4.3 0.6.4
49 glue C:/Users/-/AppData/Local/R/win-library/4.3 1.7.0
50 googledrive C:/Users/-/AppData/Local/R/win-library/4.3 2.1.1
51 googlesheets4 C:/Users/-/AppData/Local/R/win-library/4.3 1.1.1
52 GPArotation C:/Users/-/AppData/Local/R/win-library/4.3 2024.3-1
53 gridExtra C:/Users/-/AppData/Local/R/win-library/4.3 2.3
54 gsl C:/Users/-/AppData/Local/R/win-library/4.3 2.1-8
55 gtable C:/Users/-/AppData/Local/R/win-library/4.3 0.3.4
56 haven C:/Users/-/AppData/Local/R/win-library/4.3 2.5.4
57 highr C:/Users/-/AppData/Local/R/win-library/4.3 0.10
58 hms C:/Users/-/AppData/Local/R/win-library/4.3 1.1.3
59 htmltools C:/Users/-/AppData/Local/R/win-library/4.3 0.5.7
60 htmlwidgets C:/Users/-/AppData/Local/R/win-library/4.3 1.6.4
61 httr C:/Users/-/AppData/Local/R/win-library/4.3 1.4.7
62 ids C:/Users/-/AppData/Local/R/win-library/4.3 1.0.1
63 isoband C:/Users/-/AppData/Local/R/win-library/4.3 0.2.7
64 jquerylib C:/Users/-/AppData/Local/R/win-library/4.3 0.1.4
65 jsonlite C:/Users/-/AppData/Local/R/win-library/4.3 1.8.8
66 knitr C:/Users/-/AppData/Local/R/win-library/4.3 1.45
67 labeling C:/Users/-/AppData/Local/R/win-library/4.3 0.4.3
68 later C:/Users/-/AppData/Local/R/win-library/4.3 1.3.2
69 lazyeval C:/Users/-/AppData/Local/R/win-library/4.3 0.2.2
70 lifecycle C:/Users/-/AppData/Local/R/win-library/4.3 1.0.4
71 lubridate C:/Users/-/AppData/Local/R/win-library/4.3 1.9.3
72 magrittr C:/Users/-/AppData/Local/R/win-library/4.3 2.0.3
73 markdown C:/Users/-/AppData/Local/R/win-library/4.3 1.12
74 MatrixModels C:/Users/-/AppData/Local/R/win-library/4.3 0.5-3
75 memoise C:/Users/-/AppData/Local/R/win-library/4.3 2.0.1
76 mime C:/Users/-/AppData/Local/R/win-library/4.3 0.12
77 minerva C:/Users/-/AppData/Local/R/win-library/4.3 1.5.10
78 minqa C:/Users/-/AppData/Local/R/win-library/4.3 1.2.7
79 mnormt C:/Users/-/AppData/Local/R/win-library/4.3 2.1.1
80 modelr C:/Users/-/AppData/Local/R/win-library/4.3 0.1.11
81 munsell C:/Users/-/AppData/Local/R/win-library/4.3 0.5.0
82 nloptr C:/Users/-/AppData/Local/R/win-library/4.3 2.1.0
83 numDeriv C:/Users/-/AppData/Local/R/win-library/4.3 2016.8-1.1
84 openssl C:/Users/-/AppData/Local/R/win-library/4.3 2.1.1
85 openxlsx C:/Users/-/AppData/Local/R/win-library/4.3 4.2.5.2
86 packrat C:/Users/-/AppData/Local/R/win-library/4.3 0.9.2
87 pbkrtest C:/Users/-/AppData/Local/R/win-library/4.3 0.5.2
88 pillar C:/Users/-/AppData/Local/R/win-library/4.3 1.9.0
89 pkgconfig C:/Users/-/AppData/Local/R/win-library/4.3 2.0.3
90 plotly C:/Users/-/AppData/Local/R/win-library/4.3 4.10.4
91 polynom C:/Users/-/AppData/Local/R/win-library/4.3 1.4-1
92 prettyunits C:/Users/-/AppData/Local/R/win-library/4.3 1.2.0
93 processx C:/Users/-/AppData/Local/R/win-library/4.3 3.8.3
94 progress C:/Users/-/AppData/Local/R/win-library/4.3 1.2.3
95 promises C:/Users/-/AppData/Local/R/win-library/4.3 1.3.0
96 ps C:/Users/-/AppData/Local/R/win-library/4.3 1.7.6
97 psych C:/Users/-/AppData/Local/R/win-library/4.3 2.4.6.26
98 purrr C:/Users/-/AppData/Local/R/win-library/4.3 1.0.2
99 quantreg C:/Users/-/AppData/Local/R/win-library/4.3 5.98
100 R6 C:/Users/-/AppData/Local/R/win-library/4.3 2.5.1
101 ragg C:/Users/-/AppData/Local/R/win-library/4.3 1.2.7
102 rappdirs C:/Users/-/AppData/Local/R/win-library/4.3 0.3.3
103 RColorBrewer C:/Users/-/AppData/Local/R/win-library/4.3 1.1-3
104 Rcpp C:/Users/-/AppData/Local/R/win-library/4.3 1.0.12
105 RcppArmadillo C:/Users/-/AppData/Local/R/win-library/4.3 0.12.8.4.0
106 RcppEigen C:/Users/-/AppData/Local/R/win-library/4.3 0.3.4.0.0
107 readr C:/Users/-/AppData/Local/R/win-library/4.3 2.1.5
108 readxl C:/Users/-/AppData/Local/R/win-library/4.3 1.4.3
109 rematch C:/Users/-/AppData/Local/R/win-library/4.3 2.0.0
110 rematch2 C:/Users/-/AppData/Local/R/win-library/4.3 2.1.2
111 renv C:/Users/-/AppData/Local/R/win-library/4.3 1.0.4
112 reprex C:/Users/-/AppData/Local/R/win-library/4.3 2.1.0
113 rJava C:/Users/-/AppData/Local/R/win-library/4.3 1.0-11
114 rlang C:/Users/-/AppData/Local/R/win-library/4.3 1.1.3
115 rmarkdown C:/Users/-/AppData/Local/R/win-library/4.3 2.25
116 rsconnect C:/Users/-/AppData/Local/R/win-library/4.3 1.2.1
117 rstatix C:/Users/-/AppData/Local/R/win-library/4.3 0.7.2
118 rstudioapi C:/Users/-/AppData/Local/R/win-library/4.3 0.15.0
119 rvest C:/Users/-/AppData/Local/R/win-library/4.3 1.0.4
120 sass C:/Users/-/AppData/Local/R/win-library/4.3 0.4.8
121 scales C:/Users/-/AppData/Local/R/win-library/4.3 1.3.0
122 selectr C:/Users/-/AppData/Local/R/win-library/4.3 0.4-2
123 SparseM C:/Users/-/AppData/Local/R/win-library/4.3 1.83
124 stringi C:/Users/-/AppData/Local/R/win-library/4.3 1.8.3
125 stringr C:/Users/-/AppData/Local/R/win-library/4.3 1.5.1
126 sys C:/Users/-/AppData/Local/R/win-library/4.3 3.4.2
127 systemfonts C:/Users/-/AppData/Local/R/win-library/4.3 1.0.5
128 textshaping C:/Users/-/AppData/Local/R/win-library/4.3 0.3.7
129 tibble C:/Users/-/AppData/Local/R/win-library/4.3 3.2.1
130 tidyr C:/Users/-/AppData/Local/R/win-library/4.3 1.3.1
131 tidyselect C:/Users/-/AppData/Local/R/win-library/4.3 1.2.0
132 tidyverse C:/Users/-/AppData/Local/R/win-library/4.3 2.0.0
133 timechange C:/Users/-/AppData/Local/R/win-library/4.3 0.3.0
134 tinytex C:/Users/-/AppData/Local/R/win-library/4.3 0.49
135 tzdb C:/Users/-/AppData/Local/R/win-library/4.3 0.4.0
136 utf8 C:/Users/-/AppData/Local/R/win-library/4.3 1.2.4
137 uuid C:/Users/-/AppData/Local/R/win-library/4.3 1.2-0
138 vctrs C:/Users/-/AppData/Local/R/win-library/4.3 0.6.5
139 viridisLite C:/Users/-/AppData/Local/R/win-library/4.3 0.4.2
140 vroom C:/Users/-/AppData/Local/R/win-library/4.3 1.6.5
141 withr C:/Users/-/AppData/Local/R/win-library/4.3 3.0.0
142 writexl C:/Users/-/AppData/Local/R/win-library/4.3 1.5.0
143 xfun C:/Users/-/AppData/Local/R/win-library/4.3 0.42
144 xlsx C:/Users/-/AppData/Local/R/win-library/4.3 0.6.5
145 xlsxjars C:/Users/-/AppData/Local/R/win-library/4.3 0.6.1
146 xml2 C:/Users/-/AppData/Local/R/win-library/4.3 1.3.6
147 yaml C:/Users/-/AppData/Local/R/win-library/4.3 2.3.8
148 zip C:/Users/-/AppData/Local/R/win-library/4.3 2.3.1
149 base C:/Program Files/R/R-4.3.2/library 4.3.2
150 boot C:/Program Files/R/R-4.3.2/library 1.3-28.1
151 class C:/Program Files/R/R-4.3.2/library 7.3-22
152 cluster C:/Program Files/R/R-4.3.2/library 2.1.4
153 codetools C:/Program Files/R/R-4.3.2/library 0.2-19
154 compiler C:/Program Files/R/R-4.3.2/library 4.3.2
155 datasets C:/Program Files/R/R-4.3.2/library 4.3.2
156 foreign C:/Program Files/R/R-4.3.2/library 0.8-85
157 graphics C:/Program Files/R/R-4.3.2/library 4.3.2
158 grDevices C:/Program Files/R/R-4.3.2/library 4.3.2
159 grid C:/Program Files/R/R-4.3.2/library 4.3.2
160 KernSmooth C:/Program Files/R/R-4.3.2/library 2.23-22
161 lattice C:/Program Files/R/R-4.3.2/library 0.21-9
162 MASS C:/Program Files/R/R-4.3.2/library 7.3-60
163 Matrix C:/Program Files/R/R-4.3.2/library 1.6-1.1
164 methods C:/Program Files/R/R-4.3.2/library 4.3.2
165 mgcv C:/Program Files/R/R-4.3.2/library 1.9-0
166 nlme C:/Program Files/R/R-4.3.2/library 3.1-163
167 nnet C:/Program Files/R/R-4.3.2/library 7.3-19
168 parallel C:/Program Files/R/R-4.3.2/library 4.3.2
169 rpart C:/Program Files/R/R-4.3.2/library 4.1.21
170 spatial C:/Program Files/R/R-4.3.2/library 7.3-17
171 splines C:/Program Files/R/R-4.3.2/library 4.3.2
172 stats C:/Program Files/R/R-4.3.2/library 4.3.2
173 stats4 C:/Program Files/R/R-4.3.2/library 4.3.2
174 survival C:/Program Files/R/R-4.3.2/library 3.5-7
175 tcltk C:/Program Files/R/R-4.3.2/library 4.3.2
176 tools C:/Program Files/R/R-4.3.2/library 4.3.2
177 translations C:/Program Files/R/R-4.3.2/library 4.3.2
178 utils C:/Program Files/R/R-4.3.2/library 4.3.2

R System Profile: C:/PROGRA~1/R/R-43~1.2/library/base/R/Rprofile

This is the system Rprofile file. It is always run on startup.

Additional commands can be placed in site or user Rprofile files

(see ?Rprofile).

Copyright (C) 1995-2022 The R Core Team

Notice that it is a bad idea to use this file as a template for

personal startup files, since things will be executed twice and in

the wrong environment (user profiles are run in .GlobalEnv).

.GlobalEnv <- globalenv()
attach(NULL, name = "Autoloads")
.AutoloadEnv <- as.environment(2)
assign(".Autoloaded", NULL, envir = .AutoloadEnv)
T <- TRUE
F <- FALSE
R.version <- structure(R.Version(), class = "simple.list")
version <- R.version # for S compatibility

for backwards compatibility only

R.version.string <- R.version$version.string

NOTA BENE: options() for non-base package functionality are in places like

--------- ../utils/R/zzz.R

options(keep.source = interactive())
options(warn = 0)

options(repos = c(CRAN="@CRAN@"))

options(BIOC = "http://www.bioconductor.org")

setting from an env variable added in 4.0.2

local({to <- as.integer(Sys.getenv("R_DEFAULT_INTERNET_TIMEOUT", 60))
if (is.na(to) || to <= 0) to <- 60L
options(timeout = to)
})
options(encoding = "native.enc")
options(show.error.messages = TRUE)

keep in sync with PrintDefaults() in ../../main/print.c :

options(scipen = 0)
options(max.print = 99999)# max. #{entries} in internal printMatrix()
options(add.smooth = TRUE)# currently only used in 'plot.lm'

if(!interactive())
options(showErrorCalls = TRUE)

local({dp <- Sys.getenv("R_DEFAULT_PACKAGES")
if(identical(dp, "")) ## it fact methods is done first
dp <- c("datasets", "utils", "grDevices", "graphics",
"stats", "methods")
else if(identical(dp, "NULL")) dp <- character(0)
else dp <- strsplit(dp, ",")[[1]]
dp <- sub("[[:blank:]]*([[:alnum:]]+)", "\1", dp) # strip whitespace
options(defaultPackages = dp)
})

Expand R_LIBS_* environment variables.

Sys.setenv(R_LIBS_SITE =
.expand_R_libs_env_var(Sys.getenv("R_LIBS_SITE")))
Sys.setenv(R_LIBS_USER =
.expand_R_libs_env_var(Sys.getenv("R_LIBS_USER")))

local({
if(nzchar(tl <- Sys.getenv("R_SESSION_TIME_LIMIT_CPU")))
setSessionTimeLimit(cpu = tl)
if(nzchar(tl <- Sys.getenv("R_SESSION_TIME_LIMIT_ELAPSED")))
setSessionTimeLimit(elapsed = tl)
})

.First.sys <- function()
{
for(pkg in getOption("defaultPackages")) {
res <- require(pkg, quietly = TRUE, warn.conflicts = FALSE,
character.only = TRUE)
if(!res)
warning(gettextf('package %s in options("defaultPackages") was not found', sQuote(pkg)),
call. = FALSE, domain = NA)
}
}

called at C level in the startup process prior to .First.sys

.OptRequireMethods <- function()
{
pkg <- "methods" # done this way to avoid R CMD check warning
if(pkg %in% getOption("defaultPackages"))
if(!require(pkg, quietly = TRUE, warn.conflicts = FALSE,
character.only = TRUE))
warning('package "methods" in options("defaultPackages") was not found',
call. = FALSE)
}

if(nzchar(Sys.getenv("R_BATCH"))) {
.Last.sys <- function()
{
cat("> proc.time()\n")
print(proc.time())
}
## avoid passing on to spawned R processes
## A system has been reported without Sys.unsetenv, so try this
try(Sys.setenv(R_BATCH=""))
}

local({
if(nzchar(rv <- Sys.getenv("R_RNG_VERSION")))
suppressWarnings(RNGversion(rv))
})

.sys.timezone <- NA_character_

local({
## create an active binding for .Library.site, so that it can be
## modified after the base environment is locked

## remove the binding in the lazyload data base 
.Internal(mkUnbound(as.name(".Library.site")))
siteLibrary <- character()
slfun <- function(v) {
    if (!missing(v))
        siteLibrary <<- v
    siteLibrary
}

makeActiveBinding(".Library.site", slfun, baseenv())

## make .Library.site accessible also from global environment to
## preserve functionality of site profiles assigning to it directly
## (originally, site profiles were run in base environment)

makeActiveBinding(".Library.site", slfun, globalenv())

})
###-- R --

this will break if R is on a network share

.Library <- file.path(chartr("\", "/", R.home()), "library")

.Library.site <- Sys.getenv("R_LIBS_SITE")
if (!nzchar(.Library.site)) {
.Library.site <- .expand_R_libs_env_var('%S')
Sys.setenv(R_LIBS_SITE = .Library.site)
}
.Library.site <-
if(.Library.site == "NULL") character() else unlist(strsplit(.Library.site, ";"))
.Library.site <- .Library.site[file.exists(.Library.site)]

local({
libs <- Sys.getenv("R_LIBS_USER")
if (!nzchar(libs)) {
libs <- .expand_R_libs_env_var('%U')
Sys.setenv(R_LIBS_USER = libs)
}
libs <- if(libs == "NULL") character() else unlist(strsplit(libs, ";"))
invisible(.libPaths(c(unlist(strsplit(Sys.getenv("R_LIBS"), ";")),
libs)))
})

local({
popath <- Sys.getenv("R_TRANSLATIONS", "")
if(!nzchar(popath)) {
paths <- file.path(.libPaths(), "translations", "DESCRIPTION")
popath <- dirname(paths[file.exists(paths)][1])
}
bindtextdomain("R", popath)
bindtextdomain("R-base", popath)
bindtextdomain("RGui", popath)
assign(".popath", popath, .BaseNamespaceEnv)
})

if(nzchar(Sys.getenv("R_PAPERSIZE"))) {
options(papersize = Sys.getenv("R_PAPERSIZE"))
} else {
if(grepl("(canada|united.states)", Sys.getlocale("LC_MONETARY"),
ignore.case = TRUE)) options(papersize = "letter")
else options(papersize = "a4")
}

options(pager = if(length(grep("--ess", commandArgs()))) "console" else "internal",
useFancyQuotes = (.Platform$GUI == "Rgui"),
pdfviewer = Sys.getenv("R_PDFVIEWER", file.path(R.home("bin"), "open.exe")))

if(.Platform$GUI == "Rgui")
Sys.setenv(GFORTRAN_STDOUT_UNIT = "-1", GFORTRAN_STDERR_UNIT = "-1")

local({
br <- Sys.getenv("R_BROWSER", NA_character_)
if(!is.na(br)) options(browser = br)
tests_startup <- Sys.getenv("R_TESTS")
if(nzchar(tests_startup)) source(tests_startup)
ca_cert <- Sys.getenv("CURL_CA_BUNDLE", NA_character_)
if(is.na(ca_cert) &&
file.exists(ca_path <- file.path(R.home("etc"), "curl-ca-bundle.crt")))
Sys.setenv(CURL_CA_BUNDLE = ca_path)
})

local({
setRtools43Path <- 0
setRtools43Path <- 1

if (setRtools43Path) {
    rthome <- Sys.getenv("RTOOLS43_HOME", "c:/rtools43")
    rtpath <- paste0(rthome, "/x86_64-w64-mingw32.static.posix/bin;",
                     rthome, "/usr/bin")
    path <- Sys.getenv("R_CUSTOM_TOOLS_PATH", rtpath)
    Sys.setenv(R_RTOOLS43_PATH = rtpath)
    Sys.setenv(PATH = paste0(path, ";", Sys.getenv("PATH")))
}

})

R Site Profile: C:/PROGRA~1/R/R-43~1.2/etc/Rprofile.site

Things you might want to change

options(papersize="a4")

options(editor="notepad")

options(pager="internal")

set the default help type

options(help_type="text")

options(help_type="html")

set a site library

.Library.site <- file.path(chartr("\", "/", R.home()), "site-library")

set a CRAN mirror

local({r <- getOption("repos")

r["CRAN"] <- "http://my.local.cran"

options(repos=r)})

Give a fortune cookie, but only to interactive sessions

(This would need the fortunes package to be installed.)

if (interactive())

fortunes::fortune()

R User Profile: C:/Users/-/Documents/.Rprofile

(File does not exist)

R Site Environ: C:/PROGRA~1/R/R-43~1.2/etc/Renviron.site

(File does not exist)

R User Environ: C:/Users/-/Documents/.Renviron

(File does not exist)

R Temporary Directory

C:\Users-\AppData\Local\Temp\Rtmp4G01Fp

Files in R Temporary Directory

rs-graphics-4b3487e8-4f33-4b25-b499-5671364597d1

Log file: C:/Users/-/AppData/Local/RStudio/log/rdesktop.log

2024-06-20T15:44:18.232Z ERROR Main window closed unexpectedly
2024-06-20T15:44:18.233Z ERROR Main window closed unexpectedly
2024-06-20T16:14:16.357Z ERROR ERR_FAILED (-2) loading 'file://C:\Program Files\RStudio\resources\app.webpack\renderer\splash\index.html'

Log file: C:/Users/-/AppData/Local/RStudio/log/rsession-User.log

2024-07-20T21:52:45.054034Z [rsession-User] WARNING Process supervisor did not terminate within 1 second; LOGGED FROM: void __cdecl anonymous-namespace'::rCleanup(bool) C:\Users\jenkins\workspace\ide-os-windows\rel-chocolate-cosmos\src\cpp\session\SessionMain.cpp:1357 2024-07-20T21:52:45.054034Z [rsession-User] WARNING Process supervisor did not terminate within 1 second; LOGGED FROM: void __cdecl anonymous-namespace'::rCleanup(bool) C:\Users\jenkins\workspace\ide-os-windows\rel-chocolate-cosmos\src\cpp\session\SessionMain.cpp:1357

User prefs: C:/Users/-/AppData/Roaming/RStudio/rstudio-prefs.json

{
"default_project_location": "C:/Users/-/OneDrive/documents/",
"jobs_tab_visibility": "shown"
}

System prefs: C:/ProgramData/RStudio/rstudio-prefs.json

(Not Found)

User state: C:/Users/-/AppData/Local/RStudio/rstudio-desktop.json

{
"context_id": "E735D040",
"export_plot_options": {
"width": 833,
"height": 584,
"format": "png",
"keepRatio": true,
"viewAfterSave": false,
"copyAsMetafile": false
},
"save_plot_as_pdf_options": {
"portrait": false,
"cairo_pdf": false,
"viewAfterSave": false
},
"error_handler_type": "traceback"
}

Take a look at this solution to a related question: Unable to open RStudio after installing RStudio-2023.12.1-402.exe - #17 by Bryan_Schmidt. Does that help?

Dear prubin,

thank you very much!! The solution there actually worked and RStudio opened again! I am ecstatic! :smiley:

This topic was automatically closed 7 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.