RStudio 2025.09.0 crashes while running `matchit` function from package `MatchIt`

library(tidyverse)
library(MatchIt)

dat <- tibble(y = rbinom(2000, 1, 0.3), 
x1 = rnorm(2000, 1.5, 0.87),
x2 = as.factor(rbinom(2000, 2, 0.73)),
x3 =  as.factor(as.vector(rmultinom(2000, 2, c(0.3, 0.5, 0.2)))
)

matchMod <- matchit(y ~ x1 +  x2 + x3 ,
                    data = dat,
                    method = "nearest",
                    distance = "glm",
                    caliper = 0.1,
                    ratio = 1,
                    replace = TRUE
                    )

While I try to run the above code RStudio version 2025.09.0 crashes but in my earlier version RStudio version 2025.05.1 does run the code properly.

Can you guys help where does it go wrong?

I ran into the same issue. Tried to troubleshoot and just reinstalled an older version of RStudio

Did reinstalling an older version of RStudio fix the issue?

This is fixed in an upcoming 2025.09.1 patch, which should be released very soon.

You might be able to work around it in the meantime via steps at beginning of this issue:

FYI, a new release with this fix (and several others) is now available (2025.09.1+401).

Yes indeed. I am still using the older version and it solves my problem.