Unplanned
Last Updated: 28 Jun 2024 10:20 by ADMIN
LindenauAtSOG
Created on: 21 Apr 2022 07:48
Category: PDFViewer
Type: Bug Report
7
PdfViewer: Reflection used in ContentElementsCanvas creates Dispatchers that are never released
When displaying PDF-Files using PDFViewer, ContentElementsCanvas .RenderAsync uses reflection (DispatcherObjectUtils.ApplyDispatcher) to render Visuals on multiple threads.
However this leads to a memory leak since the dispatchers cant be GC'ed, see screenshot below.




The Screenshot is from the actual application we expirienced this issue with, the attached reproduction example is a boiled down version of what your code does.
If you wanna reproduce this on your own, create an application that uses PdfViewer that switches between many pdf files. The ammount of Dispatchers will grow steadily, probably to a total of the number of threads used by Task.Factory.

Attached Files:
10 comments
ADMIN
Dimitar
Posted on: 28 Jun 2024 10:20

Hello Philipp,

I understand your disappointment. We do our best to fix all bugs, yet some receive less attention than others. As much as I'd like to share an ETA on its resolution, currently, none is available, so I would not want to mislead you. Once we resolve this bug, we will immediately update the public feedback page to notify you and other clients.  

Once more, please accept our apologies for this delay.

Regards,
Dimitar
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Philipp
Posted on: 27 Jun 2024 11:48

The PdfViewer is a citical component in our application as well. We recently noticed these memory leaks as well. We cannot go on telling our customers to restart the App every 30 minutes when the memory usage gets to high. --> Out Of Memory Exceptions.

And since there is absolutely no progress on that matter since 2022, we are disappointed.

ADMIN
Dimitar
Posted on: 24 Apr 2024 05:18

Hi Andrew,

I understand your frustration, indeed such issues are unacceptable. I have forwarded your feedback to the team responsible. I cannot promise anything at the moment, but we will do our best to include this for implementation. 

Thank you for your understanding. 

Regards,
Dimitar
Progress Telerik

A brand new ThemeBuilder course was just added to the Virtual Classroom. The training course was designed to help you get started with ThemeBuilder for styling Telerik and Kendo UI components for your applications. You can check it out at https://learn.telerik.com
Andrew
Posted on: 23 Apr 2024 09:32

This issue really means we cannot use RadPdfViewer in our customer application, it is not acceptable to have a known memory leak which will cause our application to crash.

I echo Devel's words that it is not really acceptable to have a serious issue like this in an expensive product. 

Seems this issue has been known for at least 2 years and still no resolution and no proposal to resolve it.

 

 

ADMIN
Dimitar
Posted on: 11 Aug 2023 12:16

Hello Devel,

I offer my sincerest apologies on behalf of the entire team for the trouble this issue has caused you! 

We do our best to fix all bugs, yet some receive less attention than others, which is why they can sometimes be delayed, such as this one. As much as I'd like to share an ETA on its resolution, currently, none is available, so I would not want to mislead you. Once we resolve this bug, we will immediately update the public feedback page to notify you and other clients.  

I cannot say where exactly the issue lies and if is caused by the WPF framework, if it is we will report it in the appropriate channels.

Once more, please accept our apologies for this delay.

Regards,
Dimitar
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Devel
Posted on: 10 Aug 2023 10:52

Hello,

 

I have already come to this issue as well, there is memory leak with the PdfViewer.

I donĀ“t think this is acceptable to have memory leaks in stable release of such pricey product.

If it is really issue in the WPF framework, can you provide link to open github issue where it is adressed?

 

Thanks

ADMIN
Dimitar
Posted on: 09 Aug 2023 12:36

Hi Christian,

This issue is still not planned for implementation. We have done some refactoring of the ContentElementsCanvas but we are still using the same approach for this. I will see if I can increase the issue priority but I cannot engage with a timeframe. 

Thank you for your understanding.

Regards,
Dimitar
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

LindenauAtSOG
Posted on: 09 Aug 2023 07:46
So is there any plan of fixing this? Customers expirience their application crashing due to the ammount of `Dispatchers` and memory piling up
ADMIN
Tanya
Posted on: 28 Apr 2022 07:25

Hello Christian,

Thank you for that information. I have tested both - the isolated logic and PdfViewer. The behavior seems like an issue in the WPF framework and we will need some additional time to further investigate the case and the possibilities we have for fixing it. I am approving the report and we will update the item once we have any information on it.

Your Telerik points are updated in appreciation of bringing this behavior to our attention.

Regards,
Tanya
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

LindenauAtSOG
Posted on: 21 Apr 2022 09:27
The Dispatchers themself are not so bad but the objects that are attached to the MediaConext.

image

image