We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Slide.GetThumbnail Method Makes Memory Leak

We are experiencing a memory leak on our .NET server when calling Slide.GetThumbnail. There is a large amount of unmanaged memory after creating thumbnails that is never cleared (see below).
image.png (49.1 KB)

This problem appears to be worse on certain computers. On our Amazon Linux EC2 with 2 CPUs and 4GB RAM, the unmanaged memory grows more slowly than on our development computer with 12 CPUs and 16gb RAM.

@derby,
Thank you for the issue description. Please share more details:

  • A code snippet reproducing the problem
  • Initial presentation files
  • The version and distribution of Linux

@Andrey_Potapov,

Here is a link to a minimal set of code that reproduces the problem: https://drive.google.com/file/d/1eIJTfjVf7GzpzXaCRwbYdgjwCb0_eb9c/view?usp=sharing
edit: The powerpoint we used is in the zip file as well.

Here is the main method:
code.png (30.8 KB)

Here is the resultant memory leak:
leak.png (32.4 KB)

The computer is running Ubuntu 20.04.2 LTS.
The processor is a AMD® Ryzen 5 3400g

Thanks for your help.

@derby,
I’m sorry, I forgot to ask you. Please also specify the version of Aspose.Slides you are using.

The version is 21.1.0

@derby,
Thank you for the additional information. I have logged the issue in our tracking system with ID SLIDESNET-42490 for further investigation. I will inform you about any progress.

@derby,
Please check your memory consumption and leaks with disposing objects as below:

using (Presentation pres = new Presentation("1024.pptx"))
{
    foreach (ISlide slide in pres.Slides)
    {
        using (Bitmap bmp = slide.GetThumbnail(1f, 1f))
        { 
            // handle thumbnail
        }
    }
}

@Andrey_Potapov,

We have replaced the content of our main method with the implementation you have provided. We still experience the same very high memory usage on the affected computer.

@derby,
We will continue to investigate the issue.

@derby,
Our development team cannot reproduce the issue. VS2019 performance profiling screenshot: vs_diag.png (23.9 KB).
Could you share your profiling session dump with a snapshot (VS2019 “Performance Profiler” or DotMemory), please?

@Andrey_Potapov,
Here is our DotMemory profile: https://drive.google.com/file/d/1W1lFPLtqKgZqE_ttlvBiZciokuCh9ZBl/view?usp=sharing

@derby,
Thank you for the additional information. Our development team will continue to investigate the issue.

Hello, just curious if you have investigated this issue and if you have anything new you can share.

Thanks

@andrewlf,
I requested information for you from our development team. I will let you know as soon as possible.

@andrewlf,
Our development team is investigating this case. The issue is environment-specific. Investigation results will be ready not earlier than the mid of 07’21.

Thank you for the update on the investigation. I hope it reveals the problem.

Thanks again,

Andrew

Have there been any updates on this? We are experiencing the same issues that Andrew and Derby mentioned on Ubuntu 20 with Aspose.Slides 21.10.0

@bwadams,
Thank you for contacting support. This issue has not been resolved yet.
I requested information from our development team. I will let you know as soon as possible.