title: R crashing while displaying ggplot after update (process memory read out of range)
body: <p>I just updated to R 4.1.0 and re-installed my packages and Rstudio (on Ubuntu 20.04). Now R runs out of memory and crashes when I try to make any ggplot. The error message is long and I can't fully read it because the R session immediately aborts, but it mentions <code>&quot;missing nul terminator&quot;</code>, <code>&quot;process memory read out of range&quot;</code> and a bunch of lines of <code>[XXXX:XXXX:YYYYYYYY,ZZZZZZ,AAAAAA ERROR: elf_dynamic_array_reader.h:61] tag not found</code> and finally <code>[XXXX:XXXX:YYYYYYYY,ZZZZZZ,AAAAAA] ERROR directory_reader_posix.cc:42] opendir: No such file or directory (2)</code> (where X, Y, Z, and A are numbers).</p>
  <p>I originally got this error with my data but it seems to happen with any ggplot:</p>
  <pre><code>library(ggplot2)
  
  ggplot(mtcars, aes(x = cyl, y = mpg)) + geom_boxplot()
  </code></pre>
  <p>I think it's to do with actually displaying the plot because it doesn't crash when I save the plot into a variable and then <code>ggsave()</code> it, and the resulting file is fine. It's also OK when I do <code>ggplot(...)</code> within a function with <code>ggsave()</code> in the next line.</p>
  <p>The same plot in base R works fine.</p>
  <pre><code>boxplot(mpg~cyl, data = mtcars) 
  </code></pre>
  <p>==&gt; displays boxplot in the Plots pane</p>
  <p>Reinstalling ggplot2 with <code>install.packages()</code> didn't fix the problem, and I tried to <code>sudo apt install ./rstudio-1.4.1106-amd64.deb</code> again but it just says Rstudio is already the newest version.</p>