Rstudio crashes when applying add_criterion to a brms model

Applying add_criterion() to a brms model as follows crashes RStudio:

model ← add_criterion(model, criterion = c(“loo”, “waic”))

first it hangs for a long time, but then inevitably crashes. The models are logistic regressions. add_criterion() has worked previously with other logistic regression models. The models aren’t super large, e.g., 121.8 MB for one that causes such a crash.

Can you post the version of R, Rstudio, brms, and your OS? Thanks!

R: 4.2.1 “Funny-Looking Kid”
RStudio: 2022.07.1 Build 554
brms: 2.17
MacOS Monterey: 12.5.1