Closed EdoardoCostantini closed 4 months ago
@nx10, to chip in on this, it seems related to httpgd
changing the default graphics device.
For instance, with httpgd
installed, the device is handeled via httpgd::hgd
.
getOption("device")
# function(...) {
# httpgd::hgd(
# silent = TRUE
# )
# .vsc$request("httpgd", url = httpgd::hgd_url())
# }
grDevices::dev.capabilities()
# *** caught segfault ***
# address 0x0, cause 'invalid permissions'
However, after, for instance:
options(device = "png")
the call to grDevices::dev.capabilities()
appears to wrok.
Hi!
this has been fixed in the development version for a while (see #119)
You can install it directly via:
remotes::install_github("nx10/httpgd")
Let me know of this solves it for you.
We are currently blocked from making a new CRAN release because of a small memory leak in the webserver library (should be un-noticable).
I will keep this issue open until the fixed CRAN version is released.
Oh, yes, now I remember—you mentioned about the CRAN
release in https://github.com/REditorSupport/vscode-R/issues/1227#issuecomment-1286892349. Calling grDevices::dev.capabilities()
seems to work well with the devel
version!
Yes it's a bit annoying but there is not really a great C++ http server library out there that's easy to integrate with R. Even rstudio (i.e. shiny etc.) use http-parser which is written in C and unmaintained for years now (and might be vulnerable to attacks).
Moving forward I think it might make sense to migrate to a Rust implementation. There is a number of well maintained active http libraries there. With the split of httpgd and unigd with a C API in between I have also basically prepared for this happening. But there is still some questions left whether CRAN will like this: https://github.com/r-rust/hellorust/issues/12
Hi!
this has been fixed in the development version for a while (see #119)
You can install it directly via:
remotes::install_github("nx10/httpgd")
Let me know of this solves it for you.
We are currently blocked from making a new CRAN release because of a small memory leak in the webserver library (should be un-noticable).
I will keep this issue open until the fixed CRAN version is released.
It works with this version! Thanks so much.
Fixed in the newest release
Describe the bug
I run the command:
grDevices::dev.capabilities()
the session stops and returns the following output:
I'm interested in this because a package I use uses this in a plotting function.
I've narrowed down the problem to
httpgd
because I reinstalled R from scratch, and if I install/removehttpgd
, the problem appears/disappears respectively.To Reproduce
grDevices::dev.capabilities()
Expected behavior
The output should be something like
Environment