Fatal error with ggplot after updating to latest Rstudio version

Viewed 840

Recently, when booting up Rstudio v1.3 Apricot Nasturtium, a message appeared in the console warning that:

R graphics engine version 14 is not supported by this version of RStudio. The Plots tab will be disabled until a newer version of RStudio is installed.

I installed the latest version of Rstudio (v1.4.1106, Tiger Daylily), by downloading the Ubuntu 18/Debian 10 deb file and running

sudo apt install ~/Downloads/rstudio-1.4.1106-amd64.deb

To test the Plots tab, I ran

plot(sample.int(20), sample.int(20))

which worked without problems. I then tested ggplot by running

library(ggplot2)
library(tidyverse)
test_df <- data.frame(test_x=sample.int(20), test_y=sample.int(20))
test_df %>% ggplot(aes(x=test_x, y=test_y)) + geom_point()

and got a fatal error with the following error message:

[438609:438609:20210601,170114.000291:ERROR process_memory_range.cc:86] read out of range [438609:438609:20210601,170114.000338:ERROR elf_image_reader.cc:558] missing nul-terminator [438609:438609:20210601,170114.000475:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.003921:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.003979:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.004031:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.004084:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.004135:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.004198:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.004660:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.004711:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.005227:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.005297:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.005351:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.005412:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.005464:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.005516:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.005564:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.005617:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.005666:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.005717:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.005874:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.005925:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.005978:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.006021:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.006077:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.006124:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.006176:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.006228:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.006284:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.006336:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.006386:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.006439:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.006552:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.006614:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.008365:ERROR elf_dynamic_array_reader.h:61] tag not found [438609:438609:20210601,170114.011795:ERROR directory_reader_posix.cc:42] opendir: No such file or directory (2)

I tried uninstalling and reinstalling Rstudio v1.4.1106 but the issue persists. Following this post I tried installing nvidia 430 drivers

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-driver-430 nvidia-settings

but Rstudio experiences the same fatal error when attempting ggplot commands.

My current specs are Rstudio v1.4.1106 with R v4.1.0, on a Dell XPS 15 7590 running Ubuntu 20.04.2 LTS The graphics card is an NVIDIA Corporation TU117M [GeForce GTX 1650 Mobile / Max-Q].

1 Answers

So it seems like it's an issue with ggplot and the latest version of RStudio. Currently waiting for an official fix, but in the meantime running X11() before each ggplot command works, as does switching the graphics backend to 'agg'.

I'm currently using the 'agg' workaround as it's easier for me than the X11() fix.

Related