我以前使用 brms 没有问题,但现在 Rstudio 崩溃了。
为了获得错误消息,我在项目的 .Rmd 文件中使用了一个块,但是当我在项目外部和 R 文件中执行相同的代码时,它不会改变。
我安装了最后一个 Rstudio 版本,它没有改变。我尝试更改为 AGG 图形选项,但没有更改(Github 问题)。
我用 :
- Ubuntu 20.04
- 工作室 1.4.1106
- R 4.0.5 (2021-03-31) -- “摇一摇”,平台 x86_64-pc-linux-gnu(64 位)
我使用第一个 brms 示例作为可重现的示例:
library(brms)
prior1 <- brms::prior(normal(0,10), class = b) +
brms::prior(cauchy(0,2), class = sd)
fit1 <- brms::brm(count ~ zAge + zBase * Trt + (1|patient),
data = brms::epilepsy, family = poisson(), prior = prior1)
在 RStudio 中不删除任何文件
我得到:
Compiling Stan program...
[19390:19391:20210518,203526.720139:ERROR file_io_posix.cc:148] open /home/girard-tercieux/.r/crashpad_database/pending/6cc96900-24f5-45db-8a82-f9057ab2d2e3.lock: File exists (17)
[19390:19391:20210518,203526.720243:ERROR directory_reader_posix.cc:42] opendir: No such file or directory (2)
[19390:19390:20210518,203526.723109:ERROR process_memory_range.cc:86] read out of range
[19390:19390:20210518,203526.723119:ERROR elf_image_reader.cc:558] missing nul-terminator
[19390:19390:20210518,203526.723225:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.725782:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.725824:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.725861:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.725900:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.725937:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.725978:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.726324:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.726362:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.726697:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.726741:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.726784:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.726831:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.726872:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.726919:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.726969:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.727014:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.727064:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.727113:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.727158:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.727207:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.727256:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.727297:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.727343:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.727388:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.727445:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.727494:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.727536:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.727589:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.727649:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.727702:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.727754:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.727812:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.727874:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.727925:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.727994:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.728057:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.728119:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.728161:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.728218:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.728267:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.728315:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.728360:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.728402:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.728445:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.728494:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.728541:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.728624:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.728670:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.728712:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.728748:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.728798:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.728838:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.728883:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.728970:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.729016:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.729078:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.729159:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.729208:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.729254:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.729386:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.729445:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.729815:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.729882:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.729945:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.730009:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.730083:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.730371:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.730435:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.730494:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.730547:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.730604:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.730669:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.730725:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.730777:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.730833:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.730888:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.730946:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.730993:ERROR elf_dynamic_array_reader.h:61] tag not found
[19390:19390:20210518,203526.731155:ERROR elf_dynamic_array_reader.h:61] tag not found
从 .r/crashpad_database/pending 中删除 .lock 文件后的 Rstudio
第一个错误发生了变化:
Compiling Stan program...
[20562:20563:20210518,204852.272733:ERROR directory_reader_posix.cc:42] opendir: No such file or directory (2)
[20562:20562:20210518,204852.275285:ERROR process_memory_range.cc:86] read out of range
[20562:20562:20210518,204852.275291:ERROR elf_image_reader.cc:558] missing nul-terminator
[20562:20562:20210518,204852.275379:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.277535:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.277569:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.277600:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.277633:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.277665:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.277700:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.277981:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.278012:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.278281:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.278315:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.278352:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.278388:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.278422:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.278457:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.278491:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.278526:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.278560:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.278594:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.278639:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.278678:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.278716:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.278749:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.278784:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.278817:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.278851:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.278886:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.278919:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.278953:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.278986:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.279020:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.279056:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.279091:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.279125:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.279159:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.279200:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.279234:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.279271:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.279303:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.279337:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.279370:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.279405:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.279440:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.279476:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.279511:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.279546:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.279582:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.279618:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.279650:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.279685:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.279715:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.279749:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.279781:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.279819:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.279889:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.279922:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.279953:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.279997:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.280028:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.280062:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.280133:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.280164:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.280389:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.280422:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.280451:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.280485:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.280517:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.280674:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.280707:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.280737:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.280766:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.280797:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.280826:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.280856:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.280885:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.280916:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.280945:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.280974:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.281004:ERROR elf_dynamic_array_reader.h:61] tag not found
[20562:20562:20210518,204852.281098:ERROR elf_dynamic_array_reader.h:61] tag not found
仅从终端使用 R :
我得到:
Floating point exception (core dumped)
窗口告诉我“应用程序 R 已意外关闭”。结果与我是否从 .r/crashpad_database/pending 中删除 .lock 文件相同。
另一个问题已打开,但他们只谈论图形,我看不出它与我的问题有关另一个 Github 问题。
我现在已经失去了希望,但是如果有人有想法,我会很高兴阅读它;)
编辑
@BenBolker 的解决方案:
install.packages("cmdstanr", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))
library(cmdstanr)
install_cmdstan()
set_cmdstan_path(path = NULL)
library(brms)
prior1 <- brms::prior(normal(0,10), class = b) +
brms::prior(cauchy(0,2), class = sd)
fit1 <- brms::brm(count ~ zAge + zBase * Trt + (1|patient),
data = brms::epilepsy, family = poisson(), prior = prior1, backend = "cmdstanr")
斯坦工作正常!
但是,我仍然想知道为什么 brm() 函数曾经在没有这个后端选项的情况下工作,我不明白解决方案(我不是计算机科学家,因此我真的很挣扎),我仍然很担心,因为 brm()函数使 R 在没有后端选项的情况下崩溃。