When models are executed in a chunk, Rstudio will bomb after a while.
This is likely because all the information is being stored and printed, and for models with many cycles it ends up being too much.
A likely solution would be to have some check if it is run in interactive mode or not.
A temporary solution is to execute the model in the RStudio terminal, and not execute the chunk.