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.

Tue Nov 05, 2019 6:42 pm

Hi
this code have example when two methods increase memory usage on about 30 MB each and after not reasle
so when i produce about thousands document in cycle, after 1000 doc it getting error

Exception details: Exception of type 'System.OutOfMemoryException' was thrown. Source: mscorlib Stack trace: at System.String.CtorCharArrayStartLength(Char[] value, Int32 startIndex, Int32 length) at System.Xml.XmlTextReaderImpl.get_Value() at System.Xml.XmlTextReader.get_Value() at sprᲜ.ᜨ() at spr᷺.᜞() at sprᷳ.ᜀ(spr᷺ A_0, ParagraphFormat A_1, Boolean A_2) at sprᷳ.ᜀ(spr᷸ A_0, ParagraphFormat A_1, CharacterFormat A_2) at spr᷃.ᜀ(spr᷸ A_0) at spr᷋.ᜁ(spr᷸ A_0) at sprᶷ.ᜀ(Document A_0) at sprᶶ.ᜂ() at sprᶶ.ᜃ() at sprᶷ.ᜅ() at spr᷀.ᜀ() at spr᷀.ᜃ() at spr᷀.ᜀ(Stream A_0, Document A_1, spr᰼ A_2) at spr᷀.ᜀ(String A_0, Document A_1, spr᰼ A_2) at Spire.Doc.Document.᜘(String A_0) at Spire.Doc.Document.LoadFromFile(String fileName, FileFormat fileFormat, String password) at Spire.Doc.Document.ᜀ(String A_0, String A_1) at Spire.Doc.Document..ctor(String fileName)



Spire.Doc.Document spd = new Spire.Doc.Document("d:\\Timberwood Park - Notice Annual Meeting 2019 Final.docx");
int PageCnt = spd.PageCount; // +25-40 MB
spd.SaveToFile("d:\\1\\1.pdf", FileFormat.PDF); // +40-60 MB
spd.Close();
spd.Dispose();

//memory not released

sserra
 
Posts: 76
Joined: Tue Jun 13, 2017 4:03 pm

Wed Nov 06, 2019 8:11 am

Hi,

After testing your file and code with Spire.Doc Pack(hot fix) Version:7.11.1, I didn't encounter the error. Please try to use the latest version.

I noticed you were using a cycle and thousands documents, but your code only convert one file to pdf and there is no loop. If the latest version cannot solve your issue, please provide full code and files or a sample project for showing your issue. You could upload it here or send to us(support@e-iceblue.com) via email.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Wed Nov 06, 2019 3:27 pm

Hi
same code
latest version 7.11.1.4040

please look screenshots , and memory usage

sserra
 
Posts: 76
Joined: Tue Jun 13, 2017 4:03 pm

Thu Nov 07, 2019 6:04 am

Hi,

Thanks for your information.
I noticed the memory is not released, and posted the issue to our Dev team.
We will let you know once there is any update.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Wed Dec 04, 2019 3:25 pm

Hi
so, month ago u posted 3 bugs in your system
just worries, that after a 4 weeks it not fixed yet.

sserra
 
Posts: 76
Joined: Tue Jun 13, 2017 4:03 pm

Thu Dec 05, 2019 8:58 am

Hi,

Sorry that there is no progress so far. I am afraid the issue will not be fixed in a short time due to its complexity. Anyway, we will inform you once there is any good news.
Apologize for the inconvenience caused.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.Doc