Urgent - DropdownList - NullReferenceException on dialog second display

Updated to 19.2.0.46, SfDropdownList now throwing a null reference exception when the dialog it is nested within is displayed for a second time. 

System.NullReferenceException: Object reference not set to an instance of an object.

    at Syncfusion.Blazor.Internal.SfBaseUtils.UpdateDictionary(String key, Object data, Dictionary`2 dictionary)

    at Syncfusion.Blazor.DropDowns.SfDropDownList`2.DynamicPropertyUpdate()

    at Syncfusion.Blazor.DropDowns.SfDropDownList`2.OnParametersSetAsync()

    at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)

    at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)

The error can be reproduced every time, sample attached. I have kept the sample as simple as possible, but reflecting our actual use case. The dropdown on the dialog in my sample is using an unchanging list; it's DataSource and @bind-value are not being used. However, the dropdowns in our actual projects will potentially be dynamic DataSources and bound to a model. The error occurs in both cases now.

It was fine on the previous version we were using (Which was 19.1.0.59). 

This is a critical issue for us.


Attachment: Dialog__Dropdown_dynamic_property_update_e091e36f.zip

6 Replies

BC Berly Christopher Syncfusion Team July 13, 2021 10:45 AM UTC

Hi Lee,

Greetings from Syncfusion support.

This is already known issue at our end and this fix has been included in the today’s patch release version (19.2.47). So, we suggest you to upgrade the Syncfusion NuGet version to the latest version to get rid of the reported issue.

For your convenience, we have ensured in the latest version and modified the shared sample and attached it below,


Please find the details from the below feedback.


Regards
Berly B.C


LS Lee Stevens July 13, 2021 10:54 AM UTC

Thanks Berly, the sample you've sent back doesn't produce the issue now. 

I will test the latest update but if the other issue I have reported isn't fixed, I won't be able to use it:

Urgent - SfGrid and SfPivotView causing fatal exceptions when the collection provided to their DataSource is empty. | Blazor Forums | Syncfusion



BC Berly Christopher Syncfusion Team July 14, 2021 10:20 AM UTC

Hi Lee,


Query: I will test the latest update but if the other issue I have reported isn't fixed, I won't be able to use it: Urgent - SfGrid and SfPivotView causing fatal exceptions when the collection provided to their DataSource is empty. | Blazor Forums | Syncfusion

For Grid issue:

As we said in this forum, we have logged reported problem as an issue “Exception throws while changing Grid data source (which is an observable collection) to empty”. The fix will be included in our upcoming bi-weekly release which is expected to be rolled on July 21, 2021.

You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.


For Pivot issue:

We have considered the reported issue as a bug and logged the defect report “Exception throws while updating pivot table with empty datasource” for the same. We will include the fix in our upcoming weekly patch release which is estimated to be rolled out on 21st July 2021. You can keep track the issue in the feedback link below. We appreciate your patience until then. 


Feedback Link: https://www.syncfusion.com/feedback/27004/exception-throws-while-updating-pivot-table-with-empty-datasource


Note: You must login to view the above feedback link since it is private.


Regards,
Berly B.C


LS Lee Stevens July 15, 2021 10:29 AM UTC

Thanks again Berly, I can confirm that the dropdown issue no longer occurs with 19.2.0.47.


We are having to wait for the 21st July release for the aforementioned Grid and Pivot table issues anyway and hopefully our newly reported issue with editting events on the SfSchedule control will also be fixed. 



PO Prince Oliver Syncfusion Team July 16, 2021 04:06 AM UTC

Hi Lee, 

Most welcome, we are glad that the dropdown issue is resolved in your end. Let us know if you need any further assistance on this. 

Regards, 
Prince 



WA walshjupes September 27, 2021 05:12 AM UTC

NullReferenceException means that you are trying to use a reference variable whose value is Nothing/null . When the value is Nothing/null for the reference variable, which means that it is not actually holding a reference to an instance of any object that exists on the heap.

string str = null;

str.ToUpper();

Above c# code throws a NullReferenceException at the second line because you can't call the instance method ToUpper() on a string reference pointing to null.




Loader.
Up arrow icon