Alright, I managed to reproduce the error after clearing up ~30GB space.
To generate the error I did:
- Run through a complete analysis, loading approximately 1-2Gb into the memory (according to the gc() command)
- Putting a browser() statement within a function
- Executing that function, printing various values within it (including printing the data frame, which shows up below the cell in the notebook document with my current settings)
- Going to the source of the function (while still in browser mode) adding print statements to it
- When trying to continue interacting with it I obtained the crash, and had to restart R
I tried reproducing the procedure in a minimal function, but there I did not run into any problems after extensively editing it while being within the browser mode.
Maybe not relevant, but I post the original and updated function for reference (I don't think the exact code matters here, I have run into the error for a range of different cases).
get_protein_and_batch <- function(rdf, ddf, protein, target_batch, name) {
browser()
filter_ddf <- ddf[ddf$batch == target_batch, ]
target_vals <- rdf %>%
filter(query_short == protein) %>%
dplyr::select(filter_ddf$sample) %>%
unlist()
data.frame(
value=target_vals,
batch=name,
fertility=filter_ddf$fertility)
}
After performing changes (and obtaining the crash):
get_protein_and_batch <- function(rdf, ddf, protein, target_batch, name) {
browser()
filter_ddf <- ddf[ddf$batch == target_batch, ]
print(filter_ddf)
print(filter_ddf)
target_vals <- rdf %>%
filter(query_short == protein) %>%
dplyr::select(filter_ddf$sample) %>%
unlist()
data.frame(
value=target_vals,
batch=name,
fertility=filter_ddf$fertility)
}
Any further input is highly appreciated. Thank you for your time!