R lme4 Error in '/ usr / lib / rstudio / bin / rsession': malloc (): memory corruption:

Whenever I run the lmer or glmer from lme4 , I get the following error:

Error in '/ usr / lib / rstudio / bin / rsession': malloc (): memory corruption:

I am updating all R packages, but still getting the same error. Any help would be greatly appreciated. Thanks

sessionInfo ()

 R version 3.3.2 (2016-10-31) Platform: i686-pc-linux-gnu (32-bit) Running under: Ubuntu 16.04.2 LTS locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 [4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C [10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] lme4_1.1-13 Matrix_1.2-8 loaded via a namespace (and not attached): [1] minqa_1.2.4 MASS_7.3-45 tools_3.3.2 Rcpp_0.12.9 splines_3.3.2 [6] nlme_3.1-131 grid_3.3.2 nloptr_1.0.4 lattice_0.20-34 

Edited

 library(lme4) fm1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy) 

It produces the following error:

Error in '/ usr / lib / rstudio / bin / rsession': malloc (): memory corruption:

+2
memory r error-handling lme4
source share
3 answers

There were reports of problems with the latest Matrix package, 1.2-8, on a 32-bit OS (people from Terry Terno and Brian Ripley). Perhaps the fix on the way may take some time (pers., M. Maechler), so I would try to downgrade the matrix to version 1.2-7, for example. devtools::install_version("Matrix","1.2-7") (you will need to install compilation tools). If you look at the NEWS file for Matrix, I suspect this has something to do with:

  • C-API: Now SuiteSparse_long is defined as int64_t on all platforms, and now we include (C99) 'inttypes.h
+4
source share

During the time when the problem was diagnosed and resolved by me (the Matrix keeper):

Matrix 1.2-8 updated its API, but RcppEigen copied part of the Matrix C API (headers, etc.) ... and is now no longer compatible ... only with a 32-bit version.

At the same time, an update to RcppEigen (and the Matrix too). Please install the latest versions of these two, and all such lme4 problems should lme4 away.

+1
source share

There might be a problem updating Ubuntu. I had the same problem, but after the last update of the Ubuntu database, the problem was fixed.

0
source share

All Articles