Skip to content
Prev 14941 / 15075 Next

quartz hanging

Sorry, I can?t reproduce.  The second Cmd-P behaves as expected
with Apple M1 Max, emacs 29.4, ESS 24.01.1 and?


R Under development (unstable) (2024-11-10 r87316) -- "Unsuffered Consequences"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: aarch64-apple-darwin20

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
R Under development (unstable) (2024-11-10 r87316)
Platform: aarch64-apple-darwin20
Running under: macOS Sonoma 14.7.2

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

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

time zone: America/Chicago
tzcode source: internal

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

other attached packages:
[1] ggplot2_3.5.1

loaded via a namespace (and not attached):
[1] labeling_0.4.3   utf8_1.2.4       R6_2.5.1         tidyselect_1.2.1
[5] farver_2.1.2     magrittr_2.0.3   gtable_0.3.6     glue_1.8.0
 [9] tibble_3.2.1     pkgconfig_2.0.3  generics_0.1.3   dplyr_1.1.4
[13] lifecycle_1.0.4  cli_3.6.3        fansi_1.0.6      scales_1.3.0
[17] grid_4.5.0       vctrs_0.6.5      withr_3.0.2      compiler_4.5.0
[21] tools_4.5.0      munsell_0.5.1    pillar_1.9.0     colorspace_2.1-1
[25] rlang_1.1.4
--
Rodney Sparapani, Associate Professor of Biostatistics
President, Wisconsin Chapter of the American Statistical Association
Division of Biostatistics, Data Science Institute
Medical College of Wisconsin, Milwaukee Campus


From: R-SIG-Mac <r-sig-mac-bounces at r-project.org> on behalf of bill+rsigmac at 8pawexpress.com <bill+rsigmac at 8pawexpress.com>
Date: Friday, July 4, 2025 at 12:33?AM
To: r-mac <r-sig-mac at r-project.org>
Subject: Re: [R-SIG-Mac] quartz hanging
ATTENTION: This email originated from a sender outside of MCW. Use caution when clicking on links or opening attachments.
________________________________

Okay, it took me a while, but I now have a very small reprex for quartz
(not xquartz) failing. I cannot repro this on linux with R-4.4.3 and the
same package versions.

This is using emacs/ess, though it behaves the same on the console. I do
not have RStudio installed.

|R.version # _ # platform aarch64-apple-darwin20 # arch aarch64 # os
darwin20 # system aarch64, darwin20 # status # major 4 # minor 4.3 #
year 2025 # month 02 # day 28 # svn rev 87843 # language R #
version.string R version 4.4.3 (2025-02-28) # nickname Trophy Case
Sys.info()[c("release","version")] # release # "24.5.0" # version #
"Darwin Kernel Version 24.5.0: Tue Apr 22 19:53:27 PDT 2025;
root:xnu-11417.121.6~2/RELEASE_ARM64_T6041" plot(1:10) |

(This can also be reproduced using |ggplot(mtcars, aes(mpg, disp)) +
geom_point()|.)

At this point, change to the quartz window, it looks fine. Press |cmd-p|
and a print dialog comes up, normal. Escape out. Press |cmd-p| again,
and a bunch of rows dump all at once:

|2025-07-03 22:12:31.320 R[85631:98913917] The behavior of the
UICollectionViewFlowLayout is not defined because: 2025-07-03
22:12:31.320 R[85631:98913917] the item width must be less than the
width of the UICollectionView minus the section insets left and right
values, minus the content insets left and right values. 2025-07-03
22:12:31.320 R[85631:98913917] The relevant UICollectionViewFlowLayout
instance is <NSCollectionViewFlowLayout: 0x15b623740>, and it is
attached to <NSCollectionView: 0x15b623000>. 2025-07-03 22:12:31.320
R[85631:98913917] Make a symbolic breakpoint at
UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the
debugger. 2025-07-03 22:12:31.322 R[85631:98913917] The behavior of the
UICollectionViewFlowLayout is not defined because: 2025-07-03
22:12:31.322 R[85631:98913917] the item width must be less than the
width of the UICollectionView minus the section insets left and right
values, minus the content insets left and right values. 2025-07-03
22:12:31.322 R[85631:98913917] The relevant UICollectionViewFlowLayout
instance is <NSCollectionViewFlowLayout: 0x15b623740>, and it is
attached to <NSCollectionView: 0x15b623000>. 2025-07-03 22:12:31.322
R[85631:98913917] Make a symbolic breakpoint at
UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the
debugger. 2025-07-03 22:12:31.324 R[85631:98913917] The behavior of the
UICollectionViewFlowLayout is not defined because: 2025-07-03
22:12:31.324 R[85631:98913917] the item width must be less than the
width of the UICollectionView minus the section insets left and right
values, minus the content insets left and right values. 2025-07-03
22:12:31.324 R[85631:98913917] The relevant UICollectionViewFlowLayout
instance is <NSCollectionViewFlowLayout: 0x15b623740>, and it is
attached to <NSCollectionView: 0x15b623000>. 2025-07-03 22:12:31.324
R[85631:98913917] Make a symbolic breakpoint at
UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the
debugger. |

(Repeating the |cmd-p| for the above messages is not required, it?s just
an oh-by-the-way. Not sure why it?s complaining, and I don?t entirely
understand what the messages are really saying. But since it?s neither a
warning nor a device-breaking error, I have been ignoring them.)

Now, load |kableExtra|. I haven?t tried many other packages, so far it
is just this one package.

|library(kableExtra) |

That?s all, no more code/expressions/evaluation required. Back to the
quartz window and press again |cmd-p|, and on the R console one of these
errors appears. I say ?one of? because it varies slightly based on base
graphics or ggplot2, or CRAN-vs-P3M ggplot2. Since the message-component
is the same, I believe it to be the same underlying problem.

|### with base graphics alone, I see this: Error in
getNamespace("grDevices") : Start tag expected, '<' not found [4] ###
using ggplot2 from P3M, this is the only message I see Error in
diff.default(xscale) : Start tag expected, '<' not found [4] ### using
ggplot2 from CRAN, I see the p3m-error above or one of these two Error
in length(x) : Start tag expected, '<' not found [4] Error in is.unit(y)
: Start tag expected, '<' not found [4] |

The quartz window for that R process is now unresponsive, R will plot
nothing more, and R will not open a new quartz window. I can |dev.off()
; dev.list()| and it suggests there are no windows, but the window is
still present and unresponsive. |dev.new()| does nothing. Additional
plot expressions (base or grid) do nothing, no error or warning, no
rendering.

Interestingly, when I do this with base graphics, the print dialog
remains up and is now unresponsive. (Does it matter that it says ?no
printer found??) When I repro this using |ggplot2|, the print dialog
does go away when the error hits, suggesting it is slightly later in
code execution?

Variations attempted:

  * R is just the default R installer, I have not compiled it or any of
    its components manually;
  * base graphics vs |ggplot2| grid, barely-different behavior, same failure
  * |ggplot2_3.5.2| installed from CRAN (source) and from p3m.dev (mac
    binary), same behavior
  * |kableExtra_1.4.0| installed from p3m.dev, and
    |remotes::install_github("haozhu233/kableExtra")| installed
    |1.4.0.15|, same behavior
  * R from the shell and R from emacs/ess
  * I tried |library(kableExtra); detach("package:kableExtra",
    unload=TRUE)| (no attempt to print) and it still erred/broke
  * though I think it was a red-herring, I have uninstalled XQuartz, no
    change
  * this has been in multiple versions of R-4.4, not just 4.4.3, and not
    just one download/install; I have not yet tried R-4.5
  * XCode updated itself to 16.2 (I don?t recall upgrading it), though I
    would not expect this to be an issue if I compiled neither R nor the
    packages using its compilers; I?m happy to be wrong here!

I do not think that the two packages have any collisions,
|intersect(ls(getNamespace("ggplot2")), ls(getNamespace("kableExtra")))|
yields nothing in common. But since this repros with base graphics
without |ggplot2| loaded, that?s a non-player anyway.

I?m hoping someone here can help with a couple requests/questions:

  * can anyone else repro this on their machine, or is it just me?
  * any ideas of what I might try to recompile, reinstall, or otherwise
    debug or deep-dive to see if there are any clear markers of what is
    causing the error?

Thanks!
Bill
On 6/2/25 17:28, Kasper Daniel Hansen wrote:

            
&#8203;

_______________________________________________
R-SIG-Mac mailing list
R-SIG-Mac at r-project.org
https://urldefense.com/v3/__https://stat.ethz.ch/mailman/listinfo/r-sig-mac__;!!H8mHWRdzp34!-YEpBLrLI6b_Mk0zf1f5h0O-bWSg2UBs07TqCgYQIYE-X-ULQQ1uoZD_NBd2nUVAzcNTm05C3SDAzebn0WuSPVCkDVU$<https://urldefense.com/v3/__https:/stat.ethz.ch/mailman/listinfo/r-sig-mac__;!!H8mHWRdzp34!-YEpBLrLI6b_Mk0zf1f5h0O-bWSg2UBs07TqCgYQIYE-X-ULQQ1uoZD_NBd2nUVAzcNTm05C3SDAzebn0WuSPVCkDVU$>