s-u / Cairo

R graphics device using cairo graphics library for creating high-quality output
12 stars 10 forks source link

If I create 2 CairoX11() devices and then move the window, R segfaults #11

Open wdkrnls opened 9 years ago

wdkrnls commented 9 years ago

I'm using a tiling window manager and am consistently observing CairoX11() crash my R process when using multiple instances.

kleinschmidt commented 6 years ago

I'm seeing the same thing on Gnome 3.30 (Arch Linux 4.18.16) with system Cairo version 1.16.0 and xorg-server 1.20.3: R reliably segfaults after opening a second X11 device and trying to move or resize either the first or second plot window:

> devtools::session_info()
Session info ------------------------------------------------------------------
 setting  value                       
 version  R version 3.5.1 (2018-07-02)
 system   x86_64, linux-gnu           
 ui       X11                         
 language (EN)                        
 collate  en_US.UTF-8                 
 tz       America/New_York            
 date     2018-11-09                  

Packages ----------------------------------------------------------------------
 package    * version date       source        
 base       * 3.5.1   2018-10-22 local         
 Cairo      * 1.5-9   2015-09-26 CRAN (R 3.5.1)
 compiler     3.5.1   2018-10-22 local         
 datasets   * 3.5.1   2018-10-22 local         
 devtools     1.13.6  2018-06-27 CRAN (R 3.5.1)
 digest       0.6.17  2018-09-12 CRAN (R 3.5.1)
 graphics   * 3.5.1   2018-10-22 local         
 grDevices  * 3.5.1   2018-10-22 local         
 memoise      1.1.0   2017-04-21 CRAN (R 3.5.1)
 methods    * 3.5.1   2018-10-22 local         
 rstudioapi   0.7     2017-09-07 CRAN (R 3.5.1)
 stats      * 3.5.1   2018-10-22 local         
 tools        3.5.1   2018-10-22 local         
 utils      * 3.5.1   2018-10-22 local         
 withr        2.1.2   2018-03-15 CRAN (R 3.5.1)
> CairoX11(); CairoX11()
> 
 *** caught segfault ***
address 0xe10000c3, cause 'memory not mapped'

This happens 100% of the time for me, at least when I open the two windows in quick succession. It seems less reliable when there's a delay between opening the first and second.

Are there any logs or other debugging steps that would be useful for you to track down the root cause of this?