Unexpected crash when leaving and restoring executing session

We have had problems in our newly setup Posit Workbench environment (2024.04.0+735.pro3) with random crashes of long running jobs. As a test I created a simple function in a project in Posit Cloud and could replicate the error, which leads me to think that the problem is not in our local setup but a more general problem.

Executing the dummy code below (I know it's inefficient, but that should not cause it to crash randomly) and then switching a few times back and forth between the Workspace overview and the executing project so that the project page is reloaded eventually results in a crashed session. I have not been able to replicate the crash without leaving the session.

The error message that comes up is "The previous R session was abnormally terminated due to an unexpected crash..." but many times the session has just been restarted and the history lost without any error message.

The problem did not appear in our old Workbench environment (2022.12.0+353.pro20).

rm(list = ls())

control = data.frame(lopnr=1:1e6,is_female=sample(c(0,1),1e6,replace=T))
print(nrow(control))
sink(file='loop.out')
for (i in 1:nrow(control)){
  dat<-control[i, ]
  print(dat)
  flush.console()
}
sink(file=NULL)

Hi @eolk

Thanks for reaching out. I can see you have opened a support ticket. I have sent a response there asking for some more diagnostic information for review. When we find the cause and solution, we will update both the ticket and this post.

Regards,
Lachlan

Hi

We've been helping @eolk with this issue and have created a bug report for it here:

1 Like