Closed bholbrook closed 4 weeks ago
@bholbrook Thanks for reporting the issue.
Although we do not have any other such reports yet, it seems (looking at the call stack you provided) that the exception comes from line 830: https://github.com/havit/Havit.Blazor/blob/2a1076ee71ae858f7e3f106ac7770f26553fd32c/Havit.Blazor.Components.Web.Bootstrap/Grids/HxGrid.razor.cs#L823-L832
I'll try to add a null-guard condition for this part and publish a new pre-release. Please let me know if it helps.
(The _dataProviderInProgressDelayTimer
is most likely set to null
from Dispose()
or maybe another HandleTimerElapsedAsync()
running simultaneously.)
@bholbrook release 4.6.11-pre1
(We might also move the timer-disposing logic to the start of HandleTimerElapsedAsync
to precede the await
there.)
I've just updated to the pre-release 4.6.11-pre1 and I'm no longer experiencing the issue!
I'd like to preface this with I don't know exactly how/why this is occurring, just that it is. I've tried to reproduce this issue in demo code but can't produce anything that replicates exactly what's going on in my application such that I can share it here...
This is the error I'm seeing:
Something between 4.6.9 and 4.6.10 in the
HxGrid
component has changed such that aNullReferenceException
is occurring on load of my components.Comparing the two versions here: https://github.com/havit/Havit.Blazor/compare/v4.6.9...v4.6.10#diff-71ac77db351a747929499dedb1011e5171aee7a5b9e921e09de44a7e098c65fa My immediate guess is that there's not sufficient null checking in the
StartDataProviderInProgress
function. TheHandleTimerElapsedAsync
function disposes the_dataProviderInProgressDelayTimer
and then sets it to null, but these lines:Looks to me like the .Start() call could fail if null.
What do people think? Is something simple that might be fixable? Does my reasoning make sense here? Is this enough information to handle possible nulls in this block?