Error: protection stack overflow with new package version of rstanarm

I need to reestimate several models after updating to the newest rstanarm package version (see Error in if (is.mer(x) && x$stan_function != "stan_gamm4") after updating package version).

However, I have trouble running the same models with the new version of rstanarm. The models all end with an error concerning memory:

Error: protect(): protection stack overflow

I use the same machine as before, same data, etc.
The use of simpler models, less chains, less iterations, … give the same message.

R uses maximum memory available as with the previous package version:

memory.limit()
[1] 3956

which has never been a problem before.

One of the old models was e.g. as following:
model2 ← stan_lmer(CWM.bodysize2 ~ elevation_z + NDVI_ARC_z +(1|year/month) + (1|plot), algorithm=“sampling”, data=Hop, na.action=na.omit, chains=4, iter=2000, prior=normal(), prior_ops=prior_options(scaled=T))

Model under new version of rstanarm is e.g.:
model2 ← stan_lmer(CWM.bodysize2 ~ elevation_z + NDVI_ARC_z + (1|plot) +(1|year/month), algorithm=“sampling”, data=Hop, na.action=na.omit, chains=4, iter=2000, prior =NULL)

On the other hand, running other (example) models works. E.g.
default_prior_test ← stan_glm(mpg ~ wt + am, data = mtcars, chains = 1)

It looks like the R devs missed this one. @jonah or @bgoodri — any ideas here? If nobody responds, the way to escalate is to open a bug report on the stan-dev/rstanarm GitHub repo.

I haven’t seen that before with Stan stuff. Everyone on Google says to start R via

R --max-ppsize=50000

and then everyone says that does not help.

Still, I do not have any idea WHY the “protection stack overflow” error occurred. Finally, I decided to completely deinstall and reinstall RStan on my machine. After I had also upgraded my R version, I needed to upgrade to a newer version of Rtools, followed by the usual installation of RStan and rstanarm (https://github.com/stan-dev/rstan/wiki/Installing-RStan-on-Windows). This solved the problem. However, I am still not sure what exactly caused the error.

We get that a lot. It’s just due to the deeply entangled nature of configuring a bunch of complicated packages.

Thanks for reporting back.