Unplanned
Last Updated: 01 Oct 2020 17:25 by Rick
Emran
Created on: 28 Sep 2020 06:50
Category: ButtonGroup
Type: Bug Report
1
System.ObjectDisposedException: Cannot process pending renders after the renderer has been disposed.

I have a page with ButtonGroup. When I run the application, navigate to that page, refresh it using F5 I see the following exceptions:

System.AggregateException: Exceptions were encountered while disposing components. (Cannot process pending renders after the renderer has been disposed.
Object name: 'Renderer'.) (Cannot process pending renders after the renderer has been disposed.
Object name: 'Renderer'.)
 ---> System.ObjectDisposedException: Cannot process pending renders after the renderer has been disposed.
Object name: 'Renderer'.
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessPendingRender()
   at Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer.ProcessPendingRender()
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.AddToRenderQueue(Int32 componentId, RenderFragment renderFragment)
   at Microsoft.AspNetCore.Components.ComponentBase.StateHasChanged()
   at Telerik.Blazor.Components.Common.BaseComponent.StateHasChanged()
   at Telerik.Blazor.Components.TelerikButtonGroup.Telerik.Blazor.Components.ButtonGroup.IButtonContainer.RemoveButton(ButtonGroupButtonBase button)
   at Telerik.Blazor.Components.ButtonGroup.ButtonGroupButtonBase.Dispose()
   at Microsoft.AspNetCore.Components.Rendering.ComponentState.Dispose()
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.Dispose(Boolean disposing)
   --- End of inner exception stack trace ---
 ---> (Inner Exception #1) System.ObjectDisposedException: Cannot process pending renders after the renderer has been disposed.
Object name: 'Renderer'.
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessPendingRender()
   at Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer.ProcessPendingRender()
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.AddToRenderQueue(Int32 componentId, RenderFragment renderFragment)
   at Microsoft.AspNetCore.Components.ComponentBase.StateHasChanged()
   at Telerik.Blazor.Components.Common.BaseComponent.StateHasChanged()
   at Telerik.Blazor.Components.TelerikButtonGroup.Telerik.Blazor.Components.ButtonGroup.IButtonContainer.RemoveButton(ButtonGroupButtonBase button)
   at Telerik.Blazor.Components.ButtonGroup.ButtonGroupButtonBase.Dispose()
   at Microsoft.AspNetCore.Components.Rendering.ComponentState.Dispose()
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.Dispose(Boolean disposing)

1 comment
Rick
Posted on: 01 Oct 2020 17:25
Was getting the same error on a grid. Worked fine locally, but as soon as I deployed it to a container, every interaction threw that error. Updated the Telerik.ui.for.blazor library to 2.17 and the problem went away.