Hi,
I used to have the same problem with an old build of Mach4.
I open a file to record probe data and then proceed to run a Gcode job that probes the workpiece in a grid. If that job should ever fail,
like a probe wire fall off, then Mach would never close the data file and then Mach would hang up.
With a more recent build that problem has gone away. I can only assume that the file gets automatically closed if Mach stops for whatever reason.
Craig