Unplanned
Last Updated: 11 Aug 2023 12:16 by ADMIN
LindenauAtSOG
Created on: 21 Apr 2022 07:48
Category: PDFViewer
Type: Bug Report
2
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:
6 comments
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