【问题标题】:RStudio aborts session when using rgl package使用 rgl 包时 RStudio 中止会话
【发布时间】:2017-09-15 00:25:18
【问题描述】:

我正在使用带有 Lubuntu 16.04.02 的 8 岁机器。出于某种奇怪的原因,我无法以通常的方式安装 R,所以我编译它并从源代码安装它。这是我的配置文件命令:

./configure --enable-R-shlib --with-blas --with-lapack --with-x=yes --enable-BLAS-shlib --with-tcltk

从终端我可以毫无问题地运行

ejam@ejam:~/Documents/3ATD$ R

R version 3.4.1 (2017-06-30) -- "Single Candle"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

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.

> library(rgl)
> open3d()
glX 
  1 
> x <- sort(rnorm(1000))
> y <- sort(rnorm(1000))
> z <- sort(rnorm(1000))+atan2(x,y)
> plot3d(x,y,z,col=rainbow(1000))
> 

但是,当我尝试在 RStudio 中运行它时,会话立即中止。它显示一条类似于此处显示的消息:R rgl Package crashes Rstudio

我的 R 会话日志如下所示:

R version 3.4.1 (2017-06-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.3 LTS

Matrix products: default
LAPACK: /usr/local/lib/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=es_MX.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=es_MX.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=es_MX.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=es_MX.UTF-8 LC_IDENTIFICATION=C       

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

loaded via a namespace (and not attached):
[1] compiler_3.4.1 tools_3.4.1   

感谢任何帮助。

编辑 1:

我从终端跑了

$ gdb
(gdb) file rstudio

在打开的 RStudio 窗口中,我输入了

> library(rgl)
> open3d()

会话立即中止。

终端显示

Starting program: /usr/bin/rstudio 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffeac19700 (LWP 4288)]
[New Thread 0x7fffdc7c7700 (LWP 4289)]
[New Thread 0x7fffdbfc6700 (LWP 4290)]
[New Thread 0x7fffdb7c5700 (LWP 4291)]
[New Thread 0x7fffdafc4700 (LWP 4292)]
[Thread 0x7fffdafc4700 (LWP 4292) exited]
[New Thread 0x7fffdafc4700 (LWP 4319)]
[New Thread 0x7fffda7c3700 (LWP 4321)]
[New Thread 0x7fffd94d1700 (LWP 4325)]
[New Thread 0x7fffd8cd0700 (LWP 4326)]
[New Thread 0x7fff82026700 (LWP 4328)]
[New Thread 0x7fff81825700 (LWP 4329)]
load glyph failed err=6 face=0x1103500, glyph=2797
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
load glyph failed err=6 face=0x1103500, glyph=2797
libpng warning: iCCP: known incorrect sRGB profile
[Thread 0x7fffdb7c5700 (LWP 4291) exited]
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile

【问题讨论】:

  • 尝试使用gdb -p `pidof rsession` 之类的东西将gdb 附加到RStudio 的R 会话,然后加载这个库。如果这导致崩溃,您可以发布堆栈跟踪吗?
  • @KevinUshey 我希望我理解正确。我刚刚编辑了我的问题。我在其他地方读到 libpng 警告是无害的。

标签: rstudio


【解决方案1】:

我认为这个问题更普遍。我尝试了几个非标准 R 库(我指的是 R 中默认不提供的库)中的几个示例,例如“rgl”、“kernlab”和“TDA”。有趣的是,我可以从终端完美地运行这些示例。

我承认在配置 R 源代码时尝试添加“--enable-BLAS-shlib”标志时遇到了一些麻烦。我已经重新编译了没有此类标志的 R,并且 RStudio 现在可以正常工作了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-10-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多