Blazor-Diagrams / Blazor.Diagrams

A fully customizable and extensible all-purpose diagrams library for Blazor
https://blazor-diagrams.zhaytam.com
MIT License
1.01k stars 205 forks source link

Exception in DiagramCanvas due to race condition #454

Open toluwtglobal opened 4 months ago

toluwtglobal commented 4 months ago

In DiagramCanvas reference error is thrown when un-subcribing from resize event during dispose. This is cause by race conditions as the method is executing synchronously. WE have created a PR for making the execution asynchronous. See PR link below.

https://github.com/Blazor-Diagrams/Blazor.Diagrams/pull/453

TimJoehnk commented 3 months ago

Hi, I got the same issue, but even with the changes in the pullrequest I sometimes get an exception by the canvas already being disposed when calling ObserveResizes. Checking if the Canvas has been disposed before fixed this.