I was working on a project, then saved and exited. About 5 seconds later when I tried opening it, it said there was an error. The error was
System.ArgumentException: Parameter is not valid.
at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData)
at PaintDotNet.Data.PngFileType.OnLoad(Stream input) in D:\src\pdn\src\PaintDotNet\Data\PngFileType.cs:line 118
at PaintDotNet.FileType.Load(Stream input) in D:\src\pdn\src\Data\FileType.cs:line 496
at PaintDotNet.Functional.Func.Eval[T1,TRet](Func`2 f, T1 arg1) in D:\src\pdn\src\Base\Functional\Func.cs:line 158
How do I fix this and how do I prevent this from happening?