[R-SIG-Mac] xquartz hanging
Marc Schwartz
m@rc_@chw@rtz @end|ng |rom me@com
Sat May 31 19:04:14 CEST 2025
Hi,
I am currently running R 4.5.0 on macOS 15.5 (Sequoia), and I also use emacs (30.1) and ess (25.1.0), the latter from elpa, along with other emacs packages.
I do not have the issue that you are referring to below, and did not under prior versions to the best of my recollection.
I do tend to stay up to date on the versions of all of the above and do clean installs of R and packages with each new version, fully removing the older version file tree first (/Library/Frameworks/R.framework).
Thus, you might consider updating both macOS and R to current versions.
I don't use ggplot*, so cannot comment if there may be something specific to that package causing any issues, albeit, you might post to their github issues page in the absence of other resolutions, especially if you cannot replicate the problem with base graphics:
https://github.com/tidyverse/ggplot2/issues
One thing that you should do, if you have not, is to be sure to re-install XQuartz after upgrading R versions, and this is referenced on the R macOS CRAN page. See if re-installing XQuartz has any impact on the issues that you are observing.
You might also want to fully uninstall XQuartz first, before re-installing it, and the instructions for that are available on their FAQ page:
https://www.xquartz.org/FAQs.html
One additional thing to consider is to try to replicate the behavior that you are observing by running R in Terminal and/or via R.app, to try to exclude the possibility that there is something going on with your emacs/ess installation.
If you can replicate the issues in Terminal and/or R.app, that would help to exclude emacs/ess from involvement at least. If you cannot, then you might be sure that you are running the latest versions of emacs and ess to see if that helps, in case they are adding a source of conflict.
Regards,
Marc Schwartz
> On May 31, 2025, at 10:35 AM, bill+rsigmac using 8pawexpress.com wrote:
>
> Are there easy fixes or alternatives to using XQuartz for R plots?
>
> I’m running R-4.4.3 (emacs/ess) on macos 15.4.1 and have xquartz-2.8.5
> installed. Most of the time plotting in R works well enough (I tend to
> use ggplot2, I don’t know if it happens as often with base plots).
> Occasionally (several times a week), “something” happens with the plot
> window, and from then on that R process can no longer plot anything
> more. The “something” is not well defined for me yet, I think it’s a
> mouse-wheel or mouse-click or similar; the snark in me says “well don’t
> do that”, but I cannot nail down exactly how/when it breaks, it just does.
>
> When it happens, the current device window is still open, but it has a
> mac spinning-colorwheel, no new plotting commands work, and I cannot
> close the window myself. I cannot dev.off() it, nor does dev.new() give
> me a new plotting window. When this happens for a particular R process,
> my only options for plotting are either (a) close the R process and
> start over, or (b) manually plot to a PDF or similar one-shot graphics
> device, viewing in a different app.
>
> There are several related issues I can find:
>
> https://github.com/XQuartz/XQuartz/issues/431, specific to macos 15.4 or
> newer I think; some mention of “minimizing windows” but I don’t minimize
> my plot windows, so perhaps not that
> https://github.com/XQuartz/XQuartz/issues/168, closed as “not planned”,
> though this one is much older than the first (431) issue
>
> I’ve tried using something like |httpgd|
> <https://github.com/nx10/httpgd/> since it can (mostly) provide an
> “always updating graphics device” for example without xquartz.
> Unfortunately, with some other packages (namely plumber that I use
> frequently-enough) it can put the R’s REPL into an unbreakable state
> (#215 <https://github.com/nx10/httpgd/issues/215>). If that were fixed
> I’d be a lot more comfortable using that as my workaround.
>
> My research has not shown any other options for fixing or replacing
> xquartz with a more stable solution. Are there good ways to troubleshoot
> and try to fix the xquartz issue? Does anybody else have a workaround or
> alternative that is less unwieldy than pdf(..); plot(..); dev.off()?
>
> Thanks,
> Bill
>
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
More information about the R-SIG-Mac
mailing list