Random but consistent C stack error on Windows 10

Unfortunately not sorry, the only available workaround at the moment is to assign the results of each call to stan to a different output.

In other words, instead of:

fit <- stan(model1, data=data)

fit <- stan(model2, data=data)

Use:

fit1 <- stan(model1, data=data)

fit2 <- stan(model2, data=data)