Cannot Load Saved Diagram sfDiagram

Hi,

I am trying to load the previously saved sfDiagram data using the serialization example provided in the documentation: https://help.syncfusion.com/wpf/diagram/serialization

But each time it throws the exception System.NullReferenceException as shown below


Image_7166_1754637555949

I am using .Net6.0 with syncfusion.SfDiagram.Wpf library version 27.2.5 along with Syncfusion.Shared.WPF 27.2.5


3 Replies

AK Arun Kumar Sivakumar Syncfusion Team August 11, 2025 06:50 AM UTC

Hi Muhammad,

 

Reported issue: An Exception occurs while loading the saved diagram file.

 

We tried to reproduce the reported issue using our serialization sample with your mentioned version NuGet package. However, we were not able to reproduce the issue. The saved file loaded without any exception.

 

Could you please share your saved diagram file? This will help us check the issue more accurately and provide you with the right solution.

 

Regards,

Arun Kumar S

 



MA Muhammad Ahsan saddique August 11, 2025 10:33 AM UTC

Thank you for your effort, I have attached the file i want to load. Please keep in mind that i have created the same file using sfDiagram Save function and it is created without any problem.


Attachment: testDiagram3_eb90c930.txt


AK Arun Kumar Sivakumar Syncfusion Team August 12, 2025 06:33 AM UTC

Hi Muhammad,

 

Reported issue: An Exception occurs while loading the saved diagram file.

 

We have validated the reported issue using the provided details. Upon review, we noticed that the file is in .txt format, but its content is actually in XML format. To address this, we created an XML file and loaded it using the SfDiagram.Load method. The loading process worked correctly, and we have attached the output for your reference.

 

Based on this, we suspect that the issue may be due to the file being saved with a .txt extension instead of .xml. To assist you further, we have shared both the tested sample file and the converted XML file for your reference.

 

Regards,

Arun Kumar S


Attachment: Sample_and_other_files_97736b6f.zip

Loader.
Up arrow icon