OutOfMemory Crash when using ShowTextBlock

A forum for questions or concerns related to the PDF-XChange Core API SDK

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
whoit
User
Posts: 269
Joined: Tue Jul 07, 2015 3:30 pm

OutOfMemory Crash when using ShowTextBlock

Post by whoit »

Hi -

We recently implemented ShowTextBlock as our stamping method, and throughout all of our tests, everything works fine.
We have distributed a copy to one of our clients, and are now see this error:

2018/01/25 - 1:35:12 AM --- [processQFiles]: afranke: Conversion Failure - ERROR Placing Banner: System.OutOfMemoryException: Insufficient memory to continue the execution of the program. at PDFXCoreAPI.IPXC_Page.PlaceContent(IPXC_Content pContent, UInt32 nFlags)
at DynamicStamping.DynamicStamping.StampDocument(Int32 iPageNumber)
- 'Drawing Print' '9494553_C' '001' P_9494553_001_C_E12918_V.pdf: FAILED TO CONVERT

Any ideas what this could be?

Thanks,
Wayne
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: OutOfMemory Crash when using ShowTextBlock

Post by Sasha - Tracker Dev Team »

Hello Wayne,

Are you using the x86 version in the .Net application? Well it can happen in this case if you are using a vast amount of documents and you are forgetting to Close them and/or clearing the garbage collector (like in the FullDemo sample).

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
whoit
User
Posts: 269
Joined: Tue Jul 07, 2015 3:30 pm

Re: OutOfMemory Crash when using ShowTextBlock

Post by whoit »

Hi Alex -

We are using the x86 version (called from VB6).
We are Closing the documents.
We can test the garbage collector later today.

Are you saying this limitation does not exist in the x64 version?

-Wayne
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: OutOfMemory Crash when using ShowTextBlock

Post by Sasha - Tracker Dev Team »

Hello Wayne,

As far as I remember, there were some topics on this matter already. In short, the .Net is very inefficient when it comes to memory usage - the heap can just pile up and the Garbage Collector won't ever release it. This can lead to such an errors in the x86 programs (as they have a direct memory limit).

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply