There are plenty of reasons why a document for any program might crash while you use it, or get corrupted when saving. The following best practices reduce the complexity and size of worksheets and thus reduce the chance of errors occurring when saving them:
- Save your worksheet as a workbook. If you go to the workbook tab above the palettes you can save your document as a workbook. Workbooks have additional checks that happen when saving, reducing the chance of a file becoming corrupt.
-
Remove all output when saving. This can be done by going to "Edit" > "Remove Output" > "From Worksheet". Typically, the majority of content in a worksheet is output and computations.
-
Wait to close Maple after saving. Often, plots, particularly 3D ones, take a while to save and if Maple is closed before the save completes, the worksheet may be corrupted.
-
Save a backup copy of the worksheet to your private folder in the Maple Cloud. By saving an additional copy on the Maple cloud you can have a backup available if something on your computer corrupts your worksheets.
-
Use 1D Math. Plain text, as opposed to formatted 2D Math, is less likely to be corrupted.
-
Use multiple worksheets or source files. If you separate your Maple worksheet into separate, smaller files, then the chance of corruption would be smaller, and if one were to be corrupted, it would be isolated. You can still group worksheets together via a workbook, but please note that this grouping can still run the risk of corruption throughout the group.
-
Enable/disable "auto save". Under "Options" > "General", (un)check "Auto save". When checked, this will create a backup, "%filename%_MAS.bak", at the stipulated interval (default 3 minutes).
The original worksheet will only save when a user manually saves it. Note that a backup will only be created if the worksheet has a name, and if a change has been made since the last backup.
For large files, disabling auto save might be preferable; the saving takes much longer to process, so Maple can overload the system and either crash or freeze. -
Avoid special language/keyboard characters and images. Sometimes, such content leads to invalid codes within the worksheet source, which corrupts the file. Also, images (including Maple-generated plots) can dramatically increase the size of the file, especially if an inappropriate file type is used for imported images, which can cause problems with the auto save (see above).
If you encounter a corrupt file, please see our FAQ page on repairing corrupt files.