MATLAB crashes while opening mod file

I have just downloaded Dynare 4.6.1. After setting the path I tried to run example1.mod files but my MATLAB crashes! In fact it crashes with all the mod files

I get this error ““matlab has encountered an internal problem and needs to close. The unsaved information you were working on may be lost””

I am using macOS Mojave 10.14.6 and MATLAB_R2016b!

Am i missing any step?

This seems like a problem with the mex-files. How did you install Dynare?

I downloaded the package from Dynare website and then I followed all the steps mentioned here

Now i discovered that it works well when i type “edit example1.mod” in command prompt but it crashes when i try to open mod file directly!

How did you try to run the mod-file. It seems you are trying to run it as a video.