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
Fatal error when loading workspace image with objects containing a null external pointer and a prototype from class definition #8923
Comments
@Sciurus365 Thank you for raising the issues! I can reproduce it in
The comparable reprex is with |
@ronblum library(bigmemory)
setClass("testClass1",
slots = c(md5 = "character"),
contains = "big.matrix")
t1 <- as.big.matrix(matrix(1:100, nrow = 10))
tlist <- list()
for(i in 1:10){
tlist <- append(tlist, new("testClass1", address = t1@address, md5 = digest::digest(matrix(1:100, nrow = 10))))
}
tdf <- data.frame(x = 1:10)
tdf$testClass1 <- tlist And suppressing the variable inspector (by choosing "Manual Refresh Only" can solve this. So I'm now quite sure it's related to the variable inspector. |
@Sciurus365 I ran into this again, more or less by accident, and recorded it on MacOS 11.3. Is this what you're seeing? bigmemory.mov |
Yes exactly |
I believe this is a bug that should be fixed in the
The call to rstudio/src/cpp/session/modules/SessionEnvironment.R Lines 45 to 51 in 4d1fc87
|
In addition, working around this in RStudio would be quite challenging because the segfault is actually occurring in the call to
|
@kevinushey Thanks for your reply. Indeed I can reproduce the problem with |
We could handle this on the RStudio side, but it would be nice if |
System details
Steps to reproduce the problem
Describe the problem in detail
If I run the codes above, save the workspace, restart RStudio again, it will throw a fatal error. This only occurs if t3 is in the workspace, and only occurs in RStudio (RGui doesn't have this problem).
I guess a part of this problem comes from the behavior of
bigmemory
package: it generates external pointers which will become null in the next time. If I click t2 with a null pointer to view it, the fatal error of R will also occur. (This is easy to avoid: as long as I don't click it, it's fine.)But for t3, whenever I load the workspace, that fatal error occurs.
Another thing I found is that t2 is in the Data section of the variable inspector, while t3 is in the Values section. I suspect this is related to this problem, but I'm not sure.
Describe the behavior you expected
Successfully load the abovementioned objects.
The text was updated successfully, but these errors were encountered: