Closing the PDF document showing error

Dear Team,

when i doing bookmark adding or deleting process and closing that document getting below highlighted error

_doc.Close()
_doc.Dispose()

"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

Please advice how to handle this type of error.

Thanks and Regards,
Rajkumar.N

error.png

To diagnose the issue further we need the following information.

  1. Input file(s) - unless you can reproduce with any file
  2. Generated output file(s) - if you were able to generate one
  3. Code you used to generate the output.

First though, you should try the latest version
Latest official: https://www.pdftron.com/pdfnet/downloads.html
Release channel: http://www.pdftron.com/nightly/?p=stable/
Latest official builds, and Release channel, are ready for production usage, however the developer channel builds do not get the same amount of testing and can be in a state of change.