New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rJava::.jinit() terminates R session of RStudio when using R 4.2.0 #11076
Comments
|
Thanks for the bug report -- I can reproduce this as well. The crash is happening in a call to For whatever reason, this is crashing RStudio: As a temporary workaround, you could use the following: We'll need to investigate further. |
|
It looks like this happens because the RStudio R session is compiled with MSVC, rather than gcc. For MSVC, an invalid parameter handler is registered as described in: It seems like this handler is not registered by default for applications built using MinGW / gcc, so crashes are not triggered in such a case. If we wanted to match the behavior of R, we would likely want to disable this by registering a no-op handler via |
|
There is now a fix available in R 4.2.0-patched, as available from: https://cran.r-project.org/bin/windows/base/rpatched.html Thanks to Tomas Kalibera for taking a look so quickly. |
|
Leaving this in SW for now, hoping this is fixed in R and we can just re-test it. |
|
Tested in Windows 10 running R version 4.2.0 Patched (2022-05-06 r82327 ucrt) with RStudio Desktop 2022.6.0.374 and rJava 1.0.6.
|
|
I meet the issue again for R4.2.1 patch. |
|
Hi, is this issue been fixed in the latest R (R 4.2.1 - June, 2022) & RStudio (2022.07.0+548) versions?? |
|
Hi, is there a patched version for Mac or just windows? |
|
This issue specifically tracks the issue of using rJava with R 4.2.0 on Windows; if you're having trouble with rJava with a different platform (e.g. macOS) then please file a new issue with more details. |

When calling rJava::.jinit() in the RStudio console then RStudio shows the dialog "R Session Aborted" (R encountered a fatal error).
This happens with R 4.2.0, but not with previous R versions.
In plain R or when sourcing the command as local job in RStudio there is no error.
System details
Steps to reproduce the problem
Start RStudio
execute in the console:
Alternatives:
checkJava.Rthat containsrJava::.jinit()source("checkJava.R")Describe the problem in detail
When executing the code or sourcing it, RStudio reports that the R session aborted.
Describe the behavior you expected
R session should not crash.
diagnostics-report.txt
The text was updated successfully, but these errors were encountered: