Skip to content

arm64 - caught segfault - shiny app #116

@Polkas

Description

@Polkas

I find out that the ragg is causing the shiny crashes on my arm64.
The error seems to come from https://github.com/rstudio/shiny/blob/d4527cdc289c897b92a0b06eef4200537c0d98b1/R/imageutils.R#L1-L12.
When I remove the ragg package from the R env, then the shiny app works correctly.
Of course reinstalling of the ragg is not helping.

Error message from the shiny app:

*** caught segfault ***
address 0xc0005ffe836b8040, cause 'invalid permissions'

Traceback:
 1: (function (filename = "Rplot%03d.png", width = 480, height = 480,     units = "px", pointsize = 12, background = "white", res = 72,     scaling = 1, bitsize = 8, bg) {    if (environmentName(parent.env(parent.frame())) == "knitr" &&         deparse(sys.call(), nlines = 1, width.cutoff = 500) ==             "dev(filename = filename, width = dim[1], height = dim[2], ...)") {        units <- "in"    }    file <- validate_path(filename)    if (!bitsize %in% c(8, 16)) {        stop("Only 8 and 16 bit is supported", call. = FALSE)    }    dim <- get_dims(width, height, units, res)    background <- if (missing(bg))         background    else bg    .Call("agg_png_c", file, dim[1], dim[2], as.numeric(pointsize),         background, as.numeric(res), as.numeric(scaling), as.integer(bitsize),         PACKAGE = "ragg")    invisible()})(filename = "/var/folders/ym/kndydf1d4lz25qklb25kqmz80000gn/T//RtmpUGIyib/file10cdf1cecf5db.png",     width = numeric(0), height = numeric(0), res = 158.4)
 2: do.call(pngfun, args)
 3: startPNG(outfile, width * pixelratio, height * pixelratio, res = res *     pixelratio, ...)
 4: drawPlot(name = "teal-main_ui-root-adverse_events-ae_by_subgroup-out-plot_main",     session = <environment>, func = function ()     {        ..stacktraceon..(renderPlot())    }, width = NULL, height = NULL, alt = NA, pixelratio = 2.2,     res = 72)

sessionInfo:

R version 4.2.1 (2022-06-23)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.5.1

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libRlapack.dylib

locale:
[1] C/UTF-8/C/C/C/C

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

other attached packages:
[1] ragg_1.2.2  shiny_1.7.2

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.9        digest_0.6.29     later_1.3.0       mime_0.12        
 [5] R6_2.5.1          lifecycle_1.0.1   xtable_1.8-4      magrittr_2.0.3   
 [9] rlang_1.0.5       cli_3.3.0         promises_1.2.0.1  ellipsis_0.3.2   
[13] textshaping_0.3.6 httpuv_1.6.5      fastmap_1.1.0     compiler_4.2.1   
[17] systemfonts_1.0.4 htmltools_0.5.3  
> 
> 

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