-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
Using the default Server Side Blazor, with Preview 4 I've found that after clicking several times on the Application's navigation menues suddendly the app stopped working showing in the console:
After trying to duplicate this for some time I've found it's pretty random (some times taking hundreds of clicks to reproduce) so I ended up with this code, that makes the app break pretty fast:
@page "/"
@counter
@functions
{
int counter = 0;
protected override async Task OnAfterRenderAsync()
{
while (true)
{
counter++;
await Task.Delay(50);
StateHasChanged();
}
base.OnAfterRenderAsync();
}
}
Just put this code in the Index page, and let it run.... it should break before the counter hits 500...
Remember that this ONLY happens with Websocket disabled, for this I had to publish it in my IIS, and websocket support disabled, using Windows 10. This was reproduced in three different computers.
Please note that this happens in application's real usage too, sometimes a couple of fast clicks triggers the bug. You don't have to use this extreme statehaschange refresh rate to trigger it.
Regards