Blazor-Diagrams / Blazor.Diagrams

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

BUG: Z.Blazor.Diagram crashes (whole application) when you are scrolling too much or too long #265

Open HugoVG opened 2 years ago

HugoVG commented 2 years ago

Steps to reproduce:

Module._mono_wasm_invoke_method@https://blazor-diagrams.zhaytam.com/_framework/wasm/dotnet.3.2.0.js:1:195738 [blazor.webassembly.js:1:37761](https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js)
call_method@https://blazor-diagrams.zhaytam.com/_framework/wasm/dotnet.3.2.0.js:1:160823 [blazor.webassembly.js:1:37761](https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js)
bind_static_method/<@https://blazor-diagrams.zhaytam.com/_framework/wasm/dotnet.3.2.0.js:1:163094 [blazor.webassembly.js:1:37761](https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js)
beginInvokeDotNetFromJS@https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js:1:41357 [blazor.webassembly.js:1:37761](https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js)
s@https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js:1:8562 [blazor.webassembly.js:1:37761](https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js)
e.invokeMethodAsync@https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js:1:9641 [blazor.webassembly.js:1:37761](https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js)
v/</</<@https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js:1:34635 [blazor.webassembly.js:1:37761](https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js)
t.dispatchEvent@https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js:1:11187 [blazor.webassembly.js:1:37761](https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js)
e/this.eventDelegator</<@https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js:1:12101 [blazor.webassembly.js:1:37761](https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js)
e/this.eventDelegator<@https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js:1:12125 [blazor.webassembly.js:1:37761](https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js)
e.prototype.onGlobalEvent@https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js:1:22181 [blazor.webassembly.js:1:37761](https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js)
<empty string> [blazor.webassembly.js:1:37761](https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js)
  at System.Threading.Tasks.ValueTask`1[TResult].get_Result () <0x21b37f0 + 0x0002c> in <filename unknown>:0 [blazor.webassembly.js:1:37761](https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js)
  at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync (Microsoft.JSInterop.IJSRuntime jsRuntime, System.String identifier, System.Object[] args) <0x2135260 + 0x000e4> in <filename unknown>:0 [blazor.webassembly.js:1:37761](https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js)
  at Blazor.Diagrams.Extensions.JSRuntimeExtensions.UnobserveResizes (Microsoft.JSInterop.IJSRuntime jsRuntime, Microsoft.AspNetCore.Components.ElementReference element) <0x244b6d0 + 0x000ee> in <filename unknown>:0 [blazor.webassembly.js:1:37761](https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js)
  at Blazor.Diagrams.Components.Renderers.NodeRenderer.CheckVisibility () <0x22e7f28 + 0x00292> in <filename unknown>:0 [blazor.webassembly.js:1:37761](https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js)
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_1 (System.Object state) <0x25f8fd8 + 0x0000c> in <filename unknown>:0 [blazor.webassembly.js:1:37761](https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js)
  at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (System.Object state) <0x25f8f88 + 0x0001c> in <filename unknown>:0 [blazor.webassembly.js:1:37761](https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js)
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) <0x1bad018 + 0x00100> in <filename unknown>:0 [blazor.webassembly.js:1:37761](https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js)
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) <0x1bacdd8 + 0x00010> in <filename unknown>:0 [blazor.webassembly.js:1:37761](https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js)
  at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () <0x25f8f18 + 0x00038> in <filename unknown>:0 [blazor.webassembly.js:1:37761](https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js)
  at System.Threading.ThreadPoolWorkQueue.Dispatch () <0x22a1460 + 0x00102> in <filename unknown>:0 [blazor.webassembly.js:1:37761](https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js)
  at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () <0x22a10c8 + 0x00000> in <filename unknown>:0 [blazor.webassembly.js:1:37761](https://blazor-diagrams.zhaytam.com/_framework/blazor.webassembly.js)
Uncaught 
Object { name: "ExitStatus", message: "Program terminated with exit(255)", status: 255 }
HugoVG commented 2 years ago

Just tried with a really big canvas on version 3.0 Beta 4 and it seems resolved there, only the linking issues still persist and it sometimes spams the console with errors.

zHaytam commented 2 years ago

Hello, yeah that was fixed in 3.0. What do you mean by "only the linking issues still persist and it sometimes spams the console with errors."?

HugoVG commented 2 years ago

testing on 74+ nodes we are having some issues with it linking, it takes 2 State changed for it to be Fixed, it mostly happens when a node is placed outside the visible canvas it'll try and link bit will just place it randomly.

zHaytam commented 2 years ago

I will need some way to reproduce the issue in order to understand it and/or fix it

juliolitwin commented 2 years ago

@zHaytam Do you have any predictions of when version 3.0 will come out of beta?

zHaytam commented 2 years ago

@zHaytam Do you have any predictions of when version 3.0 will come out of beta?

Most likely the beginning of december.