Also, if NFS reads through here... Why is Mach 4 so unstable when it comes to shutting down incorrectly. I can't think of any other piece of software that I use that has such an adverse reaction. Heck, even if Mach 4 is closed and the computer is unplugged, it was mess stuff up. Can't this be protected against using save states in the software or some other method to automatically load a known good configuration?
Most of Mach's settings are in memory and flushed to the disk files upon shutdown (until recent builds). So if the shutdown process is interrupted by turning off the PC, well... BOO! We don't know what or when a plugin may be writing to a settings file, so if Some plugin is writing to the Machine.ini file when the power is cut... BOO again! That is one way to get corrupted.
And ANY program that is writing to the disk when the PC is switched off or not shutdown properly can corrupt the disk file system. So it may not be Mach that is having the issue with the shutdown. It could be any other program that is running and IT corrupts the Mach config files. Another way to get corrupted.
Basically, we keep our settings in regular text files (not even XML files in Mach 4) to make them human readable/understandable. There can be a lot of settings. Parameters, system variables, Machine.ini, etc... Unfortunately, this makes it more corruptible from an improper shutdown (whether Mach or some other program was writing to the disk) than say some program that saves it's settings in the OS PROTECTED registry hive file.
Also, this seems to be PC dependent. Disk driver type or something? I have NEVER had disk corruption on my Mach 4 milling machine. And I have messed up and pulled power before the PC was shut down probably 100s of times. But I may not be using any of the same plugins you are using. Plugins are definitely a wildcard here...
All that being said, we have tried to put in a settings corruption detection mechanism in the most recent dev builds that will prompt you to restore previously saved settings files. But that ONLY works if the backup setting files are not corrupted too! Also, we don't try to flush all of the settings when Mach is shut down now. However, again, we can't tell what the plugins may be doing.
So the best way to prevent corruption is to shut the PC down properly. After all, it is proper Windows etiquette.
Steve