Fatal error that leads to session being aborted

Hi all

I cannot run any code without getting the error: "Fatal error: Unexpected exception: bad allocation". THen the session disconnects/aborts.

I have looked everywhere for a solution. I tried verifying xfun and the xfun is 0.43.

Any suggestions?

We're missing a lot of details.

  • Is this in RStudio or in all R sessions (including when you run R from a command line)?
  • What is your operating system?
  • What version of R (and, if relevant, RStudio)?
  • Have you tried updating xfun (current version is 0.49)?
  • What makes you think xfun is involved?

Thanks for responding.

  • RStudio
  • Windows
  • Version 4.3.2
  • Did not yet try updating xfun because I thought it was updated. Will try now.
  • Don't know- I saw it as a suggestion to people who had similar errors

I tried updating xfun and even that gives me a fatal error

Can you run code in an R sessions started from a command prompt (not involving RStudio)? If yes, maybe try resetting RStudio's state. If no, the problem is likely with R and not RStudio.

Just so I understand, I just rename the RStudio directory? Then what?
RStudio automatically creates a new one?

R seems to be working okay.
I tried to reset RStudio's state. I'm no longer getting "fatal error" but it is still aborting the session even when I install a package.

Are you on the current version of RStudio (2024.09.1 Build 394)? If no, I would suggest upgrading. If yes, try updating xfun from an R session (install.packages("xfun")) and see if that fixes it.

If I try to update xfun, it crashes. I had already tried un-installing and re-installing so I have the most recent version.

If you update xfun from an R session (outside RStudio), R crashes? Also, when you say most recent version you're referring to RStudio, correct?