PDF Viewer throws NullReferenceException when Dispose is called

Hi,

Moving from 31.2.10 to 32.1.23 caused an exception when calling the Dispose() method on a pdfViewer instance :

System.NullReferenceException: Arg_NullReferenceException

_r @ blazor.web.js:1Understand this error

blazor.web.js:1 at Syncfusion.Blazor.SfPdfViewer.PdfViewerCommandManager.Dispose()

_r @ blazor.web.js:1Understand this error

blazor.web.js:1 at Syncfusion.Blazor.SfPdfViewer.PdfViewerBase.ComponentDispose()


Please see the repro :

https://blazorplayground.syncfusion.com/BZLHjihVpaPZKFnM


Regards.


4 Replies 1 reply marked as answer

VS Venkada Subramanian Durai Syncfusion Team January 23, 2026 11:57 AM UTC

Hi Julien Barach,

Thank you for the update. We were able to reproduce the reported issue "Exception thrown on disposing the PDF Viewer". We suspect this to be a defect and will perform further analysis. We will update you with more details by January 28, 2026.


Regards,

Venkada Subramaian D



DM Dennis M January 28, 2026 03:46 AM UTC

Hi Venkada,

I also encountered this issue. Seems that 31.2.18 was ok and this changed with v32.x

Also having issues when refreshing the page which may be related. For example, we refresh the page multiple times and sometimes it will cause issues within PDF Viewer. That issue is occurring on v32.1.25 intermittently, whereas we cannot cause the same error with v31.2.18. My team will investigate further and raise a ticket.

Regards,

Dennis



VS Venkada Subramanian Durai Syncfusion Team January 28, 2026 02:55 PM UTC

 Hi Julien Barach,

Moving from 31.2.10 to 32.1.23 caused an exception when calling the Dispose() method on a pdfViewer instance :

 

System.NullReferenceException: Arg_NullReferenceException

 

_r @ blazor.web.js:1Understand this error

 

blazor.web.js:1 at Syncfusion.Blazor.SfPdfViewer.PdfViewerCommandManager.Dispose()

 

_r @ blazor.web.js:1Understand this error

 

blazor.web.js:1 at Syncfusion.Blazor.SfPdfViewer.PdfViewerBase.ComponentDispose()

Thank you for your patience. We have confirmed the issue "Exception occurred when disposing the PDF Viewer component" and logged it as a defect.

 

We will include the fix in our Volume 1 2026 SP release.

Feedback:   Exception occurred when disposing the PDF Viewer component in Blazor | Feedback Portal

 

Disclaimer: "Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization."

Also having issues when refreshing the page which may be related. For example, we refresh the page multiple times and sometimes it will cause issues within PDF Viewer. That issue is occurring on v32.1.25 intermittently, whereas we cannot cause the same error with v31.2.18. My team will investigate further and raise a ticket.

Thank you for the update. Could you please share the error details you are encountering with the PDF Viewer when refreshing the web page multiple times? It would also be helpful if you could provide a video demonstrating the issue.
 

In addition, please check whether the reported issue occurs in the attached sample and share the modified version of the PDF Viewer sample that replicates the specific issue you are facing.

Sample we have tested
 

If you would prefer to share these details in a new ticket with clear information, please raise a ticket in our support portal, and we will provide further updates in the respective ticket.

Create Ticket | Syncfusion

 

Regards,

Venkada Subramanian D



VS Venkada Subramanian Durai Syncfusion Team February 5, 2026 10:52 AM UTC

Hi Julien Barach,

We are glad to announce that our Essential Studio® 2025 Volume 4 SP Release v32.2.3 is rolled out and is available for download under the following link.

 

Essential Studio® 2025 Volume 4... | Announcements Forums | Syncfusion
 

We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.


We have fixed the reported issue "Exception occurred when disposing the PDF Viewer component" and the fix for the reported issue was included in our Volume 4 SP Release v32.2.3. Kindly upgrade to that version to get the issue resolved.

 

Root cause: The issue occurred due to the null check missing with the comment manger whether the pdf viewer instance is available.

 

Solution: Now the issue was by including the proper null check to the comment manger whether the pdf viewer instance available or not.

 

Packages:

 

 

Blazor NextGen

https://www.nuget.org/packages/Syncfusion.Blazor.SfPdfViewer

 

CDN Links:

 

https://cdn.syncfusion.com/blazor/32.2.3/styles/bootstrap5.css

https://cdn.syncfusion.com/blazor/32.2.3/syncfusion-blazor-sfpdfviewer.min.js


Regards,
Venkada Subramanian D


Marked as answer
Loader.
Up arrow icon