Keep getting "The previous R session was abnormally terminated due to an unexpected crash"

Hi everyone,

I am sure that there is a simple solution to this but I haven't been able to make it work. I am using rstudio server on my acer chromebook. While running code I keep getting "The previous R session was abnormally terminated due to an unexpected crash".
I have read that this can be due to a corrupted ~/.rstudio file and that if I delete the file a fresh one will be reinstalled when I open a new browser. The only catch is that I need root access to delete the file and being on a chromebook I never set up a UNIX password that the terminal is looking for. I have tried all of my other passwords associated with my account and it doesn't want to accept them.

I'm not sure where I could have created the password that it is looking for or if there is another solution all together.

Thanks for the help

Hi @boisteroussninja! Welcome!

This was posted in the #rstudio-cloud category, but from reading your question I’m not 100% sure if you’re using RStudio Cloud? (https://rstudio.cloud/)

Can you confirm the details of your setup? If this is not a question about RStudio Cloud, then I’d recommend moving it to #rstudio-ide with an #rstudioserver tag.

1 Like

This is what I copied from my web browser: https://rstudio.cloud/project/161940
so I would think that it is on rstudio cloud?
Is it correct for me to think that?
I probably shouldn't have said server in my original post.

1 Like

Most probably this message has nothing to do with any file in your system but your code in that particular rstudio project.

Hi @boisteroussninja! I think what @jcblum is trying to establish is whether:

a. you're using RStudio.cloud—in other words, RStudio Server running on RStudio's machines somewhere else and you're just logging into them with your browser; or
b. You've used some tricks to install RStudio Server on your Chromebook yourself and you log in to that through the web browser.

Both options look the same in your browser, but option (a) means that all the number crunching happens on RStudio's machines and you just see the results, whereas option (b) means that it's happening on your laptop.

It seems like it's probably the former if you've no memory of installing Linux tools or RStudio Server, but if you're logged into RStudio Server and the address bar starts with https://rstudio.cloud/, it's definitely the former—if you were doing option (b), the address bar would be more like localhost:8787.

The reason we want to establish this is that in option (a), you wouldn't know the user password (RStudio takes care of it, although bugs can crop up), whereas in option (b) you'd typically manage that stuff yourself :slight_smile:

1 Like

It sounds like I have the cloud version as I installed nothing on my computer.

1 Like

If you don't have sensitive data in that rstudio cloud project, you can change your project access setting to "Everyone", that way we can take a look and search for possible problems that may trigger that error message.

ok access should be opened up.

I moved part of the code to a different tab to try and isolate the problem.
When I run the tab histogram, that is where the program crashes.
I am also unable to save either tab because I get the error "no such file or directory"

This is what is causing the error binwidth = 0.5 because your x aesthetic is a POSIXct class object, although it should trow an error in console instead of crashing the session, this is pretty wheird.

This should work

png(filename = "test_hist.png",
    width = 1200,
    height = 800)
ggplot(data_plot,
       aes(DATE_TIME_HEURE))+
  geom_histogram() +
  geom_density()
dev.off()

EDIT: Sorry but I cant help it, I have to ask, why you choose to manually open a graphics device instead of just using ggsave() function?

Thanks, I had removed that line and R stated drawing the graph again but I am unsure of another way to change the width of the bars?

Yeah it keeps crashing and I think that something is wrong with the file directories because every time I go to save a file it throws a "no such file or directory"

I am still pretty new to R and wasn't aware of ggsave() but I will look into it and give it a try. I originally wanted to draw the plot in an external window but I couldn't get 11X to work so this was my solution.

Thanks again for the help!

Since your session is already crashed you have to restart the entire rstudio session to restore normal behaviour I'm not sure how to do that in rstudio cloud maybe someone else can help with that.

About the binwidth, you just have to choose a more reasonable value, posixct values are stored as seconds so 0.5 seconds width is too small, just choose a value that makes more sense with your data.

That's what I was afraid of and why I wanted to delete the ~/.rstudio file, but it doesn't sound like I can do that on the rstudio cloud. It seems like others have made it work on the server version.

I belive you are a little confused about the difference, rstudio cloud is a service in which they grant you access to a rstudio-server session running in their servers, no file is actually saved in your local system unless you manually export it.

I'm sure there is an option in the web GUI that allows you to restar the session, but if you can't find it (like me), the session is going to stop automatically after some time if you close that tab in your browser.

Currently though a project will go to sleep when the user stops interacting with it at 15 minutes (if the rsession is idle) or 24 hours (of the rsession is busy).

If you have access to the IDE in cloud you can restart or terminate the session through the session menu.

session%20menu

You also have terminal access to the container through the IDE and can delete or move your .rstudio files manually (if that's the problem).

moving%20rstudio%20directory%20contents

The project is coming up in our logs as hitting memory limit (1GB) on the container 15 times in the last 2 days. So I would guess that generating the histogram and displaying it is consuming too much memory - which then generates the error message when the rsession crashes.

Sean

2 Likes

ok, good to know thanks.
Had tried to delete the file through the terminal but it kept asking me for a password that I didn't have. I tried the password that I used to sign in but that didn't work and I don't remember having set another one?

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.