I have update the Aspose.Diagram-package to version 25.12.0
The Aspose.Diagram-package is used in:
WinForms application using .NET Framework 4.8
Language: C#
Platform: Windows 11
Development Environment: Visual Studio 2022
Unfortunately, this package is now throwing an System.NullReferenceException when opening the following template file (added as zipfile): BPMN 2.0 Model.zip (581.8 KB)
Code-snippet:
Diagram diagram = new Diagram(“BPMN 2.0 Model.vsd”, LoadFileFormat.Vsd);
In the previous version (25.5.0) this exception didn’t occur.
I also noticed that the method ‘page.Shapes.RemoveDependsOn(shape);’ is throwing an System.NullReferenceException exception now on template which can be opened. I bypassed this by using the method ‘page.Shapes.Remove(shape);’, but in the previous version (25.5.0) this exception didn’t occur.
I understand the issue is frustrating, especially since it worked in the previous version. Let me help clarify the problem.
Does the NullReferenceException occur immediately when calling new Diagram("BPMN 2.0 Model.vsd", LoadFileFormat.Vsd) or only during a specific operation afterward (e.g., accessing shapes, pages, or rendering)?
Is the file path correct and accessible at runtime, and have you confirmed the file is not corrupted or locked during load?
Can you confirm whether the same exception occurs with other VSD files, or is it specific to this “BPMN 2.0 Model.vsd” template?
For the RemoveDependsOn(shape) issue: does the shape object have a valid parent and is it properly initialized before calling the method?
@tkn1967
Thanks for the template file.
After an initial testing, I am able to reproduce the issue as you mentioned by using your template file.
We will fix these issues in next version 26.1 that we plan to release in the first half of January 2026.
We apologize for any inconvenience caused.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): DIAGRAMNET-53874,DIAGRAMNET-53875
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
The issues you have found earlier (filed as DIAGRAMNET-53874,DIAGRAMNET-53875) have been fixed in this update. This message was posted using Bugs notification tool by philip.zhou