Unable to save file - Win32 IO returned 1224

Problem

FGU cannot save your campaign file and may cause a crash. The logs or console show something similar to:
 Unable to save file (C:/Users/YourUsername/AppData/Roaming/SmiteWorks/Fantasy Grounds/campaigns/My Campaign/db.xml): Win32 IO returned 1224. Path: C:\Users\YourUsername\AppData\Roaming\SmiteWorks\Fantasy Grounds\campaigns\My Campaign\db.xml

Solution

This is a Windows system error that occurs when attempting to write to a file that is currently being used by some other process. Check to see if you have other processes running that could be accessing the file, such as a scheduled backup or antivirus check.

Whitelisting or Creating Exceptions for Antivirus Applications

Sometimes this error can happens when a non-Microsoft antivirus is being used (Norton, McAffee, etc.) Make sure you add Fantasy Grounds Unity and all it’s necessary files, folders and subfolder to your antivirus / antimalware / network protection software exception list.

Help Article:

Also, make sure that you have room available on the drive where the campaign is stored. In the example above, it is the C: drive. If the disk becomes full, FGU will not be able to save the file and will throw an error.

Tools like WinDirStat can be useful in finding where disk space is being used and freeing it up.