DataGrid Settings - random hangs when changing items per page #567

Open
opened 2026-01-29 17:39:28 +00:00 by claunia · 0 comments
Owner

Originally created by @elylv on GitHub (Oct 4, 2022).

I am experiencing random hangs of the browser (and eventual crashes) when using the new Settings parameter of the DataGrid.

It seems to work fine for most things, including sorting and filtering, however, when I change the page size options it seems to cause random hangs of the browser. I will click on the page size, the page size opens, but as soon as I click on an option the browser freezes (drop-down menu remains open with the option I clicked highlighted) for probably a couple of minutes before eventually giving an unhandled error. Checking the console reveals many multiples of this error:

crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: TypeError: Failed to fetch
System.Net.Http.HttpRequestException: TypeError: Failed to fetch
 ---> System.Runtime.InteropServices.JavaScript.JSException: TypeError: Failed to fetch
   at System.Net.Http.BrowserHttpHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.BrowserHttpHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at GOSL.Client.Helpers.HttpService.<LoadDataGrid>d__18`1[[GOSL.Shared.DTOs.CaseMDTO, GOSL.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext() in C:\src\Client\Helpers\HttpService.cs:line 133
   at GOSL.Client.Repository.CaseRepository.GetCases(LoadDataArgs args, String caseList, String searchTerm) in C:\src\Client\Repository\CaseRepository.cs:line 66
   at GOSL.Client.Pages.CaseList.LoadCases(LoadDataArgs args) in C:\src\Client\Pages\CaseList.razor:line 241
   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
   at Radzen.Blazor.RadzenDataGrid`1.<InvokeLoadData>d__383[[GOSL.Shared.DTOs.CaseMDTO, GOSL.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
   at Radzen.Blazor.RadzenDataGrid`1.<Reload>d__381[[GOSL.Shared.DTOs.CaseMDTO, GOSL.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
   at Radzen.Blazor.RadzenDataGrid`1.<LoadSettings>d__468[[GOSL.Shared.DTOs.CaseMDTO, GOSL.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
   at Radzen.Blazor.RadzenDataGrid`1.<OnAfterRenderAsync>d__400[[GOSL.Shared.DTOs.CaseMDTO, GOSL.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

Followed by an endless loop of:

/__w/1/s/src/mono/mono/sgen/sgen-gc.c:3993 <disabled>
/__w/1/s/src/mono/mono/sgen/sgen-gc.c:3993 <disabled>
/__w/1/s/src/mono/mono/sgen/sgen-gc.c:3993 <disabled>
/__w/1/s/src/mono/mono/sgen/sgen-gc.c:3993 <disabled>
/__w/1/s/src/mono/mono/sgen/sgen-gc.c:3993 <disabled>
/__w/1/s/src/mono/mono/sgen/sgen-gc.c:3993 <disabled>
/__w/1/s/src/mono/mono/sgen/sgen-gc.c:3993 <disabled>
/__w/1/s/src/mono/mono/sgen/sgen-gc.c:3993 <disabled>
/__w/1/s/src/mono/mono/sgen/sgen-gc.c:3993 <disabled>
/__w/1/s/src/mono/mono/sgen/sgen-gc.c:3993 <disabled>
/__w/1/s/src/mono/mono/sgen/sgen-gc.c:3993 <disabled>
/__w/1/s/src/mono/mono/sgen/sgen-gc.c:3993 <disabled>
/__w/1/s/src/mono/mono/sgen/sgen-gc.c:3993 <disabled>
/__w/1/s/src/mono/mono/sgen/sgen-gc.c:3993 <disabled>

Until I eventually kill the browser. The browser is unresponsive for the ~2mins before the unhandled exception appears.

I can't reliably get this to occur every time. On some of my grids, it's happening always. On others, I need to change the page size a few times, or filter a column first before changing the page size.
It only happens when the Settings binding is used. It also happens with separate Settings and SettingChanged parameters, but the SettingsChanged callback is never hit before the browser hangs.

Originally created by @elylv on GitHub (Oct 4, 2022). I am experiencing random hangs of the browser (and eventual crashes) when using the new Settings parameter of the DataGrid. It seems to work fine for most things, including sorting and filtering, however, when I change the page size options it seems to cause random hangs of the browser. I will click on the page size, the page size opens, but as soon as I click on an option the browser freezes (drop-down menu remains open with the option I clicked highlighted) for probably a couple of minutes before eventually giving an unhandled error. Checking the console reveals many multiples of this error: ``` crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: TypeError: Failed to fetch System.Net.Http.HttpRequestException: TypeError: Failed to fetch ---> System.Runtime.InteropServices.JavaScript.JSException: TypeError: Failed to fetch at System.Net.Http.BrowserHttpHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.BrowserHttpHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) at GOSL.Client.Helpers.HttpService.<LoadDataGrid>d__18`1[[GOSL.Shared.DTOs.CaseMDTO, GOSL.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext() in C:\src\Client\Helpers\HttpService.cs:line 133 at GOSL.Client.Repository.CaseRepository.GetCases(LoadDataArgs args, String caseList, String searchTerm) in C:\src\Client\Repository\CaseRepository.cs:line 66 at GOSL.Client.Pages.CaseList.LoadCases(LoadDataArgs args) in C:\src\Client\Pages\CaseList.razor:line 241 at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task) at Radzen.Blazor.RadzenDataGrid`1.<InvokeLoadData>d__383[[GOSL.Shared.DTOs.CaseMDTO, GOSL.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext() at Radzen.Blazor.RadzenDataGrid`1.<Reload>d__381[[GOSL.Shared.DTOs.CaseMDTO, GOSL.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext() at Radzen.Blazor.RadzenDataGrid`1.<LoadSettings>d__468[[GOSL.Shared.DTOs.CaseMDTO, GOSL.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext() at Radzen.Blazor.RadzenDataGrid`1.<OnAfterRenderAsync>d__400[[GOSL.Shared.DTOs.CaseMDTO, GOSL.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext() at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState) ``` Followed by an endless loop of: ``` /__w/1/s/src/mono/mono/sgen/sgen-gc.c:3993 <disabled> /__w/1/s/src/mono/mono/sgen/sgen-gc.c:3993 <disabled> /__w/1/s/src/mono/mono/sgen/sgen-gc.c:3993 <disabled> /__w/1/s/src/mono/mono/sgen/sgen-gc.c:3993 <disabled> /__w/1/s/src/mono/mono/sgen/sgen-gc.c:3993 <disabled> /__w/1/s/src/mono/mono/sgen/sgen-gc.c:3993 <disabled> /__w/1/s/src/mono/mono/sgen/sgen-gc.c:3993 <disabled> /__w/1/s/src/mono/mono/sgen/sgen-gc.c:3993 <disabled> /__w/1/s/src/mono/mono/sgen/sgen-gc.c:3993 <disabled> /__w/1/s/src/mono/mono/sgen/sgen-gc.c:3993 <disabled> /__w/1/s/src/mono/mono/sgen/sgen-gc.c:3993 <disabled> /__w/1/s/src/mono/mono/sgen/sgen-gc.c:3993 <disabled> /__w/1/s/src/mono/mono/sgen/sgen-gc.c:3993 <disabled> /__w/1/s/src/mono/mono/sgen/sgen-gc.c:3993 <disabled> ``` Until I eventually kill the browser. The browser is unresponsive for the ~2mins before the unhandled exception appears. I can't reliably get this to occur every time. On some of my grids, it's happening always. On others, I need to change the page size a few times, or filter a column first before changing the page size. It **only** happens when the Settings binding is used. It also happens with separate Settings and SettingChanged parameters, but the SettingsChanged callback is never hit before the browser hangs.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#567