Out of Memory Exception with Thumbnail Viewer open in Portrait orientation

Questions, comments and suggestions concerning VintaSoft Imaging .NET SDK.

Moderator: Alex

Post Reply
nnansen
Posts: 4
Joined: Fri Nov 04, 2022 11:36 pm

Out of Memory Exception with Thumbnail Viewer open in Portrait orientation

Post by nnansen »

Hello,

We are encountering out of memory exceptions when loading large documents in portrait mode with the thumbnail viewer open. When the thumbnail viewer is closed the document is able to load without encountering out of memory exceptions. I suspect having both the Image Viewer for the document and the Thumbnail Viewer for the thumbnails open at the same time is causing the memory issue. I am hoping we you can suggest some changes which would optimize this situation.

I have tried modifying some of the settings in our Thumbnail Viewer control, but they do not seem to solve the issue unfortunately. We reduced the ThumbnailScale to Smallest, reduced the number of threads available for rendering the thumbnails in ThumbnailRenderingThreadCount, Changed ThumbnailFlowStyle to SingleColumn from WrappedRows. This somewhat improved behavior but still experience the errors.

The document in question is 66MB. When loading the document, memory used by our application will jump from the regular 200-400MB range up the 1000MB, at which point it shows the out of memory exceptions and the memory usage drops back down. Our customer uses a Portrait orientation monitor, so the thumbnail viewer is quite tall when using the full screen's height. When viewed on a Landscape orientation, or shortened the height of application window, the same document does not experience out of memory exceptions.

Please advise on next steps, thank you.

Nick Nansen
RedSail Technologies
Alex
Site Admin
Posts: 2319
Joined: Thu Jul 10, 2008 2:21 pm

Re: Out of Memory Exception with Thumbnail Viewer open in Portrait orientation

Post by Alex »

Hello Nick,

Could you provide us your document for tests? If yes, please upload your file to any free upload server (for example Google Drive) and send us (to support@vintasoft.com) link for downloading the file. If file contains sensitive data, please place file in archive with strong password.

Best regards, Alexander
nnansen
Posts: 4
Joined: Fri Nov 04, 2022 11:36 pm

Re: Out of Memory Exception with Thumbnail Viewer open in Portrait orientation

Post by nnansen »

Thank you for the reply, I will email the document momentarily. I was not able to reproduce on the 64bit version of demo, it seems to be related to our app running in 32 bit, for some additional context.
Alex
Site Admin
Posts: 2319
Joined: Thu Jul 10, 2008 2:21 pm

Re: Out of Memory Exception with Thumbnail Viewer open in Portrait orientation

Post by Alex »

Thank you for PDF document. We reproduced the problem in 32-bit version of VintaSoft Document Viewer Demo. Problem occurs because SDK cannot create bitmap, which is necessary for rendering of PDF page. Problem presents because 32-bit .NET application can address only 2Gb of memory. We will try to optimize memory usage in PDF renderer and I will let you know result.

Best regards, Alexander
Post Reply