nesi / eri-ood-rstudio-server-app

(Beta) OOD RStudio-server for app for eRI
MIT License
0 stars 1 forks source link

Shadow graphics device error: r error 4 (Error : C stack usage 7969184 is too close to the limit ) #2

Closed DininduSenanayake closed 2 weeks ago

DininduSenanayake commented 3 weeks ago

Error Message :

Error in RStudioGD() : 
  Shadow graphics device error: r error 4 (Error : C stack usage  7969184 is too close to the limit
)
In addition: There were 50 or more warnings (use warnings() to see the first 50)
> sessionInfo()
R version 4.3.2 (2023-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Rocky Linux 8.7 (Green Obsidian)

Matrix products: default
BLAS/LAPACK: FlexiBLAS OPENBLAS;  LAPACK version 3.11.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

time zone: Pacific/Auckland
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ggplot2_3.4.4 akima_0.6-3.4 ade4_1.7-22   abind_1.4-5   ape_5.7-1    

loaded via a namespace (and not attached):
 [1] vctrs_0.6.4       nlme_3.1-163      cli_3.6.1         rlang_1.1.2       generics_0.1.3    glue_1.6.2       
 [7] colorspace_2.1-0  sp_2.1-1          scales_1.3.0      fansi_1.0.5       grid_4.3.2        munsell_0.5.1    
[13] tibble_3.2.1      MASS_7.3-60       lifecycle_1.0.3   compiler_4.3.2    dplyr_1.1.3       pkgconfig_2.0.3  
[19] Rcpp_1.0.11       rstudioapi_0.15.0 lattice_0.22-5    digest_0.6.33     R6_2.5.1          tidyselect_1.2.0 
[25] utf8_1.2.4        pillar_1.9.0      parallel_4.3.2    magrittr_2.0.3    withr_3.0.0       tools_4.3.2      

How to reproduce

options(scipen=999)  # turn-off scientific notation like 1e+48
library(ggplot2)
theme_set(theme_bw())  # pre-set the bw theme.
data("midwest", package = "ggplot2")
# midwest <- read.csv("http://goo.gl/G1K41K")  # bkup data source

# Scatterplot
gg <- ggplot(midwest, aes(x=area, y=poptotal)) + 
  geom_point(aes(col=state, size=popdensity)) + 
  geom_smooth(method="loess", se=F) + 
  xlim(c(0, 0.1)) + 
  ylim(c(0, 500000)) + 
  labs(subtitle="Area Vs Population", 
       y="Population", 
       x="Area", 
       title="Scatterplot", 
       caption = "Source: midwest")

plot(gg)
MattBixley commented 3 weeks ago

can not reproduce

> plot(gg) geom_smooth()using formula = 'y ~ x' Warning messages: 1: Removed 15 rows containing non-finite outside the scale range (stat_smooth()). 2:

`> sessionInfo() R version 4.3.3 (2024-02-29) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Rocky Linux 8.7 (Green Obsidian)

Matrix products: default BLAS/LAPACK: FlexiBLAS OPENBLAS; LAPACK version 3.11.0

locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

time zone: Pacific/Auckland tzcode source: system (glibc)

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] lubridate_1.9.3 forcats_1.0.0 stringr_1.5.1 dplyr_1.1.4 purrr_1.0.2
[6] readr_2.1.5 tidyr_1.3.1 tibble_3.2.1 ggplot2_3.5.1 tidyverse_2.0.0

loaded via a namespace (and not attached): [1] Matrix_1.6-1 gtable_0.3.5 compiler_4.3.3 tidyselect_1.2.1 [5] splines_4.3.3 scales_1.3.0 fastmap_1.2.0 yaml_2.3.8
[9] lattice_0.21-8 R6_2.5.1 labeling_0.4.3 generics_0.1.3
[13] knitr_1.47 munsell_0.5.1 pillar_1.9.0 tzdb_0.4.0
[17] rlang_1.1.1 utf8_1.2.3 stringi_1.8.4 xfun_0.45
[21] timechange_0.3.0 cli_3.6.1 mgcv_1.9-1 withr_3.0.0
[25] magrittr_2.0.3 digest_0.6.33 grid_4.3.3 rstudioapi_0.16.0 [29] hms_1.1.3 nlme_3.1-165 lifecycle_1.0.3 vctrs_0.6.5
[33] evaluate_0.21 glue_1.6.2 farver_2.1.2 fansi_1.0.4
[37] colorspace_2.1-0 rmarkdown_2.27 tools_4.3.3 pkgconfig_2.0.3
[41] htmltools_0.5.8.1`

MattBixley commented 3 weeks ago

Possibly "cairo" related https://github.com/rstudio/rstudio/issues/2214

DininduSenanayake commented 2 weeks ago

On interactive-0

$ R --slave -e 'Cstack_info()["size"]'
   size 
7969177 

$ ulimit -s
8192

I recommend we make ulimit , unlimited as we have done in other platforms

MattBixley commented 2 weeks ago

agree - consistency of platforms

MattBixley commented 2 weeks ago

Managed to replicate the error while on interactive-2 with the R-Geo Module

> plot(1,1) Error in RStudioGD() : Shadow graphics device error: r error 4 (Error : C stack usage 7971984 is too close to the limit )

DininduSenanayake commented 2 weeks ago
Error in RStudioGD() : 
  Shadow graphics device error: r error 4 (Error : evaluation nested too deeply: infinite recursion 

Screenshot from 2024-07-16 13-57-30