The issue: Document.Save
method randomly throws exception.
The app processes multiple PDFs simultaneously. The issue happens with random files. The issue cannot be reproduced at will with the same file. The same file may produce the issue 1-2 times out of 30.
Unfortunately, I cannot provide a code snippet to reproduce the issue the app has a lot of logic and I was unable to identify what lines of code may cause the issue.
System.IO.IOException
: The requested operation cannot be performed on a file with a user-mapped section open.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode)
at Aspose.Pdf.Document.#=zmCBp3wj3d_ct(String #=zkfhq0KfKswXu)
at Aspose.Pdf.Document.Save(String outputFileName)
...
- Any ideas?
- Does Aspose.PDF use memory-mapped files? Does it release all resources?
For internal reference: MDP-14453
Thanks.