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.
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
Here is a link to a minimal set of code that reproduces the problem: aspose-test.zip - Google Drive
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.
I’m sorry, I forgot to ask you. Please also specify the version of Aspose.Slides you are using.
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.
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
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.
We will continue to investigate the issue.
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?
Here is our DotMemory profile: AsposeMemoryLeakTest.dmw - Google Drive
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.
I requested information for you from our development team. I will let you know as soon as possible.
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.
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
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.
Hi guys, any update on this issue?
I’m facing the same issue on Slides for Java with version 21.2.
It takes about 16 Gigabytes when getting thumbanails for a 120 pages slides and makes a lot of gc.
Thank you for contacting support.
The issue described in the forum thread has not been resolved yet.
There were many updates after version 21.2. Please check your results using the latest version of Aspose.Slides for Java if it is possible. If the issue persists, please create a new forum thread and describe the issue you are experiencing with the following data and information:
- presentation file (you can zip the file and upload an archive in the forum thread)
- code example or a simple project that reproduces the problem
- screenshot with your diagnostic results
- OS version on which the code was executed
- JDK version in your app
- any additional information about your environment