r-lib / ragg

Graphic Devices Based on AGG
https://ragg.r-lib.org
Other
172 stars 24 forks source link

Image files go blank upon closing RStudio #78

Open michaellevy opened 3 years ago

michaellevy commented 3 years ago

A few times (out of 20+ sessions using the package), I've had png files created with agg_png go empty after closing the RStudio session in which they were created. The files still exist in their created resolution, but they go from being full of content to being blank white. The latest time, the png files were open when I closed RStudio -- I watched their content disappear -- but I don't know if that has always been true. I'm sorry I can't provide a better reprex for this; the code I always use to create the files is bellow and session info below that; let me know if anything else would be helpful.

agg_png("file.png", width = 1500, height = 1500)
ggplot...
invisible(dev.off())
system("open file.png")
─ Session info ────────────────────────────────────────────────────────────────
 setting  value                       
 version  R version 4.0.2 (2020-06-22)
 os       macOS  10.16                
 system   x86_64, darwin17.0          
 ui       RStudio                     
 language (EN)                        
 collate  en_US.UTF-8                 
 ctype    en_US.UTF-8                 
 tz       America/Phoenix             
 date     2021-03-14                  

─ Packages ────────────────────────────────────────────────────────────────────
 package      * version  date       lib source        
 assertthat     0.2.1    2019-03-21 [1] CRAN (R 4.0.2)
 backports      1.1.9    2020-08-24 [1] CRAN (R 4.0.2)
 blob           1.2.1    2020-01-20 [1] CRAN (R 4.0.2)
 broom          0.7.0    2020-07-09 [1] CRAN (R 4.0.2)
 callr          3.5.1    2020-10-13 [1] CRAN (R 4.0.2)
 cellranger     1.1.0    2016-07-27 [1] CRAN (R 4.0.2)
 cli            2.0.2    2020-02-28 [1] CRAN (R 4.0.2)
 colorspace     1.4-1    2019-03-18 [1] CRAN (R 4.0.2)
 colourlovers * 0.3.6    2020-12-09 [1] CRAN (R 4.0.2)
 crayon         1.3.4    2017-09-16 [1] CRAN (R 4.0.2)
 DBI            1.1.0    2019-12-15 [1] CRAN (R 4.0.2)
 dbplyr         1.4.4    2020-05-27 [1] CRAN (R 4.0.2)
 desc           1.2.0    2018-05-01 [1] CRAN (R 4.0.2)
 devtools       2.3.2    2020-09-18 [1] CRAN (R 4.0.2)
 digest         0.6.25   2020-02-23 [1] CRAN (R 4.0.2)
 dplyr        * 1.0.2    2020-08-18 [1] CRAN (R 4.0.2)
 ellipsis       0.3.1    2020-05-15 [1] CRAN (R 4.0.2)
 fansi          0.4.1    2020-01-08 [1] CRAN (R 4.0.2)
 farver         2.0.3    2020-01-16 [1] CRAN (R 4.0.2)
 forcats      * 0.5.0    2020-03-01 [1] CRAN (R 4.0.2)
 fs             1.5.0    2020-07-31 [1] CRAN (R 4.0.2)
 generics       0.0.2    2018-11-29 [1] CRAN (R 4.0.2)
 ggforce      * 0.3.2    2020-06-23 [1] CRAN (R 4.0.2)
 ggplot2      * 3.3.2    2020-06-19 [1] CRAN (R 4.0.2)
 glue           1.4.2    2020-08-27 [1] CRAN (R 4.0.2)
 gtable         0.3.0    2019-03-25 [1] CRAN (R 4.0.2)
 haven          2.3.1    2020-06-01 [1] CRAN (R 4.0.2)
 hms            0.5.3    2020-01-08 [1] CRAN (R 4.0.2)
 httr           1.4.2    2020-07-20 [1] CRAN (R 4.0.2)
 jsonlite       1.7.2    2020-12-09 [1] CRAN (R 4.0.2)
 lifecycle      0.2.0    2020-03-06 [1] CRAN (R 4.0.2)
 lubridate      1.7.9    2020-06-08 [1] CRAN (R 4.0.2)
 magrittr       1.5      2014-11-22 [1] CRAN (R 4.0.2)
 MASS           7.3-51.6 2020-04-26 [1] CRAN (R 4.0.2)
 memoise        1.1.0    2017-04-21 [1] CRAN (R 4.0.2)
 modelr         0.1.8    2020-05-19 [1] CRAN (R 4.0.2)
 munsell        0.5.0    2018-06-12 [1] CRAN (R 4.0.2)
 patchwork    * 1.0.1    2020-06-22 [1] CRAN (R 4.0.2)
 pillar         1.4.6    2020-07-10 [1] CRAN (R 4.0.2)
 pkgbuild       1.1.0    2020-07-13 [1] CRAN (R 4.0.2)
 pkgconfig      2.0.3    2019-09-22 [1] CRAN (R 4.0.2)
 pkgload        1.1.0    2020-05-29 [1] CRAN (R 4.0.2)
 png            0.1-7    2013-12-03 [1] CRAN (R 4.0.2)
 polyclip       1.10-0   2019-03-14 [1] CRAN (R 4.0.2)
 prettyunits    1.1.1    2020-01-24 [1] CRAN (R 4.0.2)
 processx       3.4.5    2020-11-30 [1] CRAN (R 4.0.2)
 ps             1.3.4    2020-08-11 [1] CRAN (R 4.0.2)
 purrr        * 0.3.4    2020-04-17 [1] CRAN (R 4.0.2)
 R6             2.4.1    2019-11-12 [1] CRAN (R 4.0.2)
 ragg         * 1.1.0    2021-02-15 [1] CRAN (R 4.0.2)
 Rcpp           1.0.5    2020-07-06 [1] CRAN (R 4.0.2)
 readr        * 1.3.1    2018-12-21 [1] CRAN (R 4.0.2)
 readxl         1.3.1    2019-03-13 [1] CRAN (R 4.0.2)
 remotes        2.2.0    2020-07-21 [1] CRAN (R 4.0.2)
 reprex         0.3.0    2019-05-16 [1] CRAN (R 4.0.2)
 rlang          0.4.10   2020-12-30 [1] CRAN (R 4.0.2)
 rprojroot      1.3-2    2018-01-03 [1] CRAN (R 4.0.2)
 rstudioapi     0.11     2020-02-07 [1] CRAN (R 4.0.2)
 rvest          0.3.6    2020-07-25 [1] CRAN (R 4.0.2)
 scales         1.1.1    2020-05-11 [1] CRAN (R 4.0.2)
 scico        * 1.2.0    2020-06-08 [1] CRAN (R 4.0.2)
 sessioninfo    1.1.1    2018-11-05 [1] CRAN (R 4.0.2)
 stringi        1.4.6    2020-02-17 [1] CRAN (R 4.0.2)
 stringr      * 1.4.0    2019-02-10 [1] CRAN (R 4.0.2)
 systemfonts    1.0.1    2021-02-09 [1] CRAN (R 4.0.2)
 testthat       2.3.2    2020-03-02 [1] CRAN (R 4.0.2)
 textshaping    0.3.0    2021-02-10 [1] CRAN (R 4.0.2)
 tibble       * 3.0.3    2020-07-10 [1] CRAN (R 4.0.2)
 tidyr        * 1.1.2    2020-08-27 [1] CRAN (R 4.0.2)
 tidyselect     1.1.0    2020-05-11 [1] CRAN (R 4.0.2)
 tidyverse    * 1.3.0    2019-11-21 [1] CRAN (R 4.0.2)
 tinytex        0.25     2020-07-24 [1] CRAN (R 4.0.2)
 tweenr         1.0.1    2018-12-14 [1] CRAN (R 4.0.2)
 usethis        2.0.1    2021-02-10 [1] CRAN (R 4.0.2)
 vctrs          0.3.4    2020-08-29 [1] CRAN (R 4.0.2)
 withr          2.4.1    2021-01-26 [1] CRAN (R 4.0.2)
 xfun           0.16     2020-07-24 [1] CRAN (R 4.0.2)
 XML            3.99-0.5 2020-07-23 [1] CRAN (R 4.0.2)
 xml2           1.3.2    2020-04-23 [1] CRAN (R 4.0.2)

[1] /Library/Frameworks/R.framework/Versions/4.0/Resources/library