Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Wed Apr 20, 2022 11:43 pm

We just purchased the latest version (having used this product for many years). We wanted to take advantage of the multithreading capability. We ran some tests generating 3700 documents single threaded and then multithreaded. When running it multithreaded we had multiple errors (see below). It worked without issue single threaded.

Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at System.Runtime.InteropServices.Marshal.CopyToManaged(IntPtr source, Object destination, Int32 startIndex, Int32 length)
at System.Drawing.Internal.GPStream.Write(IntPtr buf, Int32 length)
at System.Drawing.SafeNativeMethods.Gdip.IntGdipDeleteGraphics(HandleRef graphics)
at System.Drawing.SafeNativeMethods.Gdip.GdipDeleteGraphics(HandleRef graphics)
at System.Drawing.Graphics.Dispose(Boolean disposing)
at System.Drawing.Graphics.Dispose()
at spr?.?()
at spr?.?(Int32 A_0, Int32 A_1, ImageType A_2, MemoryStream A_3, Boolean A_4, Boolean A_5, Boolean A_6)
at spr?.?(spr? A_0)
at spr?.?(Document A_0)
at spr?.?(Document A_0, ToPdfParameterList A_1)
at Spire.Doc.Document.?(String A_0, ToPdfParameterList A_1)
at Spire.Doc.Document.SaveToFile(String fileName, ToPdfParameterList paramList)
at SmartGrid.Service.MeterDataMgt.Factory.Document.DocumentGeneratorBase.WritePDF(String name) i

madkins1868
 
Posts: 2
Joined: Thu Apr 28, 2016 7:18 pm

Thu Apr 21, 2022 7:46 am

Hi,

Thank you for your inquiry.
To help us investigate your issue accurately and quickly, please provide the following information. You can attach your file here or send it to us via email (support@e-iceblue.com). Thank you in advance.
1) Your complete code and input documents (if any)
2) Test environment, such as win10, 64bit
3) The type of application, such as Console App, .NET Framework 4.6

Sincerely,
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Return to Spire.Doc