I have a page with a grid on it. If I navigated to the page and navigate to another page before the Grid has completed rendering then I get a NullReferenceException with the following stack trace. If I wait for the grid to complete its renders and then move off to another page then there is no error.
Syncfusion.Blazor.dll!Syncfusion.Blazor.Grids.Internal.GridJSInteropAdaptor<vx.Services.DynamicDictionary>.Dispose() Unknown
Syncfusion.Blazor.dll!Syncfusion.Blazor.Grids.SfGrid<vx.Services.DynamicDictionary>.System.IDisposable.Dispose.AnonymousMethod__342_1(System.Threading.Tasks.Task t1) Unknown
System.Private.CoreLib.dll!System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(System.Threading.Thread threadPoolThread, System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown
System.Private.CoreLib.dll!System.Threading.Tasks.Task.ExecuteWithThreadLocal(ref System.Threading.Tasks.Task currentTaskSlot, System.Threading.Thread threadPoolThread) Unknown
System.Private.CoreLib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() Unknown
The following is logged to the browser console:
Uncaught (in promise) Error: System.ArgumentException: There is no tracked object with id '55'. Perhaps the DotNetObjectReference instance was already disposed. (Parameter 'dotNetObjectId')
at Microsoft.JSInterop.JSRuntime.GetObjectReference(:65226/Int64 dotNetObjectId)
at Microsoft.JSInterop.Infrastructure.DotNetDispatcher.BeginInvokeDotNet(:65226/JSRuntime jsRuntime, DotNetInvocationInfo invocationInfo, String argsJson)
at Object.endInvokeDotNetFromJS (blazor.server.js:1)
at e.<anonymous> (blazor.server.js:8)
at blazor.server.js:1
at Array.forEach (<anonymous>)
at e.invokeClientMethod (blazor.server.js:1)
at e.processIncomingData (blazor.server.js:1)
at e.connection.onreceive (blazor.server.js:1)
at WebSocket.i.onmessage (blazor.server.js:1)
Attached is output from our application log.
Attachment:
Grid_destroy_error_application_log_3cfdf91c.zip