System.NullReferenceException: at Syncfusion.Blazor.Internal.SfBaseUtils.UpdateDictionary (Blazor.Server - Version 18.4.0.44)

sorry this bug (see below) occurs sporadically so that i am still unable to create a repo.
i suppose it has something todo with asynchronous loading of the component.
but maybe can you spot the error or do you have an idea for an workaround?
thanks!
regards
viktor

System.NullReferenceException:
at Syncfusion.Blazor.Internal.SfBaseUtils.UpdateDictionary (Syncfusion.Blazor.Core, Version=18.4.0.44, Culture=neutral, PublicKeyToken=null)
at Syncfusion.Blazor.DropDowns.SfDropDownList`2.DynamicPropertyUpdate (Syncfusion.Blazor.DropDowns, Version=18.4.0.44, Culture=neutral, PublicKeyToken=null)
at Syncfusion.Blazor.DropDowns.SfDropDownList`2+d__414.MoveNext (Syncfusion.Blazor.DropDowns, Version=18.4.0.44, Culture=neutral, PublicKeyToken=null)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.AspNetCore.Components.ComponentBase+d__22.MoveNext (Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.AspNetCore.Components.RenderTree.Renderer+d__50.MoveNext (Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)


3 Replies 1 reply marked as answer

BC Berly Christopher Syncfusion Team March 29, 2021 09:43 AM UTC

Hi Viktor, 
  
Greetings from Syncfusion support. 
  
We have checked the reported issue and the reported issue does not occur at our end. So, we have prepared the sample based on the provided issue details and attached it below. 
  
  
Please check the above sample and share any issue reproducing sample or code snippet that will help us to check and proceed further at our end. 
  
Regards, 
Berly B.C 



BV Bob Vale April 9, 2021 08:08 AM UTC

Hi I have managed to run into this problem too. Unfortunately I'm having trouble reproducing an version that reliable reproduces the bug.

It happens on Blazor server.  It appears to happen when the control is removed from the DOM tree, for example using an if to conditionally render a section.

My suspicion is that happens due to a race condition where the control is removed from the DOM between the parameters set and the render - or a call back triggering something.

Even though we cannot reliable reproduce it in order to accurately trace it,  would it be possible for you to put guard clauses into update dictionary that can safely swallow the null reference exception. Maybe just log it.  Because this change happens during a render call it results in immediate application crash.

Based on our usage, if the control can ignore this crash then I believe our application will function normally as the control is being removed from the render tree.


BC Berly Christopher Syncfusion Team April 12, 2021 12:31 PM UTC

Hi Bob Vale, 

We have already resolved the reported issue in the latest Syncfusion release version 19.1.0.55 and it has been rolled out successfully. So, we suggest you to upgrade the Syncfusion product version to the latest version to get rid of the reported issue. Please find the feedback for the reported issue below. 

 
Regards, 
Berly B.C 



Marked as answer
Loader.
Up arrow icon