simonec73 / threatsmanager

Threats Manager Platform Core libraries and SDK
MIT License
72 stars 14 forks source link

Silent Crash of application when we try to open a corrupt threatmodel diagram #48

Closed kalyancheerla closed 1 year ago

kalyancheerla commented 1 year ago

Bug Report A silent crash of threats manager studio windows application when we try to open a corrupt threat model diagram i.e., when the parentID and ID of any entity or group is same. The application silently closes down leaving the .tmlock file when we press on diagram 1 to open.

To Reproduce Steps to reproduce the behavior:

  1. Open the buggy.tm with TMS windows app.
  2. Once the document is successfully loaded, press on the diagram 1.
  3. App crashes silently
  4. .tmlock file is left behind without cleanup and the it doesn't report any error.

Expected behavior Expecting the app at the very least to clean the tmlock file or report error and doesn't open the diagram for the corrupt threat model.

Screenshots ID and parentID were same,

2023-04-13 11_27_36-bug

Below zip file contains the buggy.tm TMS file, reqfiles_for_bug.zip

Additional context image

simonec73 commented 1 year ago

Thank you for the nice verification. I will fix this.

kalyancheerla commented 1 year ago

I am happy to help, if you could provide me with your thoughts on its implementation. Also, it would lessen your work and provide me with some open-source credits that I can boost-off about! 😄