Skip to content

Potential segfault with saveRDS of list of empty ggplot() #4635

@bersbersbers

Description

@bersbersbers

I am investigating the segfaults I see in rstudio/rmarkdown#2229. I have spent a few hours(!) minimizing my code to a few hundred lines which I cannot yet share. I did notice, though, that the stack traces now consistently point towards a chunk at the end of a .Rmd file - specifically, the saveRDS line.

plotlist <- list()
plotlist[[1]] <- ggplot()
names(plotlist) <- c("plot")
saveRDS(c(plotlist), file.path("plot.rds")) # <--

(This is code minimized over and over again - there is much more happening in between in the full code.)

This .Rmd, when run via rmarkdown, shiny and shinytest, segfaults when rendered a second time, after being rendered once and after one renderPlot(plot(NULL)).

While this alone is not enough to repro the segfault, I guess, I do wonder if anyone sees some potential error right away.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions