Closed Haclio closed 1 year ago
Not reproducible for me. If I install the .deb
package for VSCode from https://code.visualstudio.com and then when prompted install the recommended R plugins then your example (with the addition of library("ggplot2")
) works fine on my platform (Ubuntu Linux).
Perhaps this is a duplicate of https://github.com/coolbutuseless/ggpattern/issues/90
What happens when you call grDevices::dev.capabilities()
in your VSCode R terminal?
If so you may be able to sidestep this by setting options(ggpattern_use_R4.1_features = FALSE)
or options(ggpattern_use_R4.1_features = TRUE)
.
Hi, thanks for the quick response.
I should have added that I'm on Windows, my apologies for that.
grDevices::dev.capabilities()
closes my R terminal, without any error code or message.
Both options(ggpattern_use_R4.1_features = FALSE)
or options(ggpattern_use_R4.1_features = TRUE)
make ggplot render the patterns without error, so thanks for that. I don't know what these particular features do so, is one of them preferred over the other ?
I don't know what these particular features do so, is one of them preferred over the other ?
options(ggpattern_use_R4.1_features = TRUE)
tells {gridpattern}
(used by {ggpattern}
) to render certain patterns using features which only a subset of R graphics devices support. If the R graphics devices do not support these features and this is an affected pattern then the pattern will be rendered incorrectly but if the R graphics device does support these features it should render faster and more sharply.
options(ggpattern_use_R4.1_features = FALSE)
tells {gridpattern}
(used by {ggpattern}
) to render patterns using a rasterized fallback which should work on more graphics devices but will render slower and may look more "pixelated".
{gridpattern}
uses grDevices::dev.capabilities()
to tell if your active graphics devices supports these features but for some weird reason on a subset of VSCode implementations this causes it to close or segfault.
I'm closing this issue because this doesn't seem to be a bug with {ggpattern}
.
@toorukt or @Haclio , if you can reproduce your grDevices::dev.capabilities()
segfaults-when-called-within-VSCode issue with the development version of R (ake "R devel") this bug may be worth reporting upstream to the core R team. Unfortunately I can't reproduce this issue myself.
If you can reproduce this in R devel one way to report is to post to the R-devel mailing list: https://stat.ethz.ch/mailman/listinfo/r-devel
Every time I try to render a ggplot2 object in the VSCode viewer in which
ggpattern
has been used, the R terminal radian closes abruptly. I can't discount a problem with VSCode itself, butggpattern
is the only package I have trouble with, and I've tried in RStudio and it works.VSCode returns an error : The terminal process "C:\Users\XXXXXX\AppData\Local\Programs\Python\Python311\Scripts\radian.exe '--no-save', '--no-restore'" exited with code: 3221225477. A quick search online tells me this error is due to something related to access violations, but why only
ggpattern
? I'm just starting to use VSCode so I'm afraid I don't have much else to say for now. I'll be happy to help if anything else is needed.Reproducible example
(yes, that's all it takes)
Session info
Please enter here the results of
xfun::session_info("ggpattern")