20.2.0.46 Throws Exception

I am seeing the following exception being thrown when installing ` 20.2.0.46`.  This does not occur in ` 20.2.0.40`:

```

Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer: Warning: Unhandled exception rendering component: Object reference not set to an instance of an object.


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

   at Syncfusion.Blazor.Grids.SfGrid`1.GetClass()

   at Syncfusion.Blazor.Grids.SfGrid`1.OnParametersSetAsync()

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

   at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()

Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost: Error: Unhandled exception in circuit 'Q4ShmjKWXGjSMs8dAfR-mlmHLqfvXe30h-MR2EOtnDo'.


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

   at string Syncfusion.Blazor.Grids.SfGrid<TValue>.GetClass()

   at async Task Syncfusion.Blazor.Grids.SfGrid<TValue>.OnParametersSetAsync()

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

   at async Task Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()

[2022-09-01T14:13:48.000Z] Error: System.NullReferenceException: Object reference not set to an instance of an object.

   at string Syncfusion.Blazor.Grids.SfGrid<TValue>.GetClass()

   at async Task Syncfusion.Blazor.Grids.SfGrid<TValue>.OnParametersSetAsync()

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

   at async Task Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()

```


19 Replies

NP Naveen Palanivel Syncfusion Team September 3, 2022 10:55 AM UTC

Hi Mike-E,


Greetings from Syncfusion support.


We checked your query and you facing issue in the latest issue 20-2-0-46.We need some more information, Kindly share the below details to validate further at our end.


  1. Share us entire Grid code snippet along with model class.
  2. Share us the video demonstration of the issue with detailed replication procedure.
  3. If possible share us an simple issue reproduceable sample

The above-requested details will be helpful for us to validate the reported query at our end and provide the solution as early as possible.


Regards,

Naveen Palanivel



MI Mike-E September 3, 2022 11:40 AM UTC

Thank you for your time and investigation into this matter, @Naveen.

Unfortunately, I do not have a simple reproduction/solution that I can provide for you easily. I am not sure a video will assist, either.

However, I do have some further information that may assist you in tracking this down.

This appears to be due to the use of a `class` attribute in my SfGrid markup which is causing this issue. Here is a screenshot of where the exception takes place (note that there appears to be a symbol location issue and this is really throwing on line 419):

https://i.imgur.com/otZGA5O.png

(Note further that I could not add the above picture to this post as it's complaining about it being over 100KB).

Subsequently, I added the UnMatchedAttributes property to the Watch window. Notice how it reports true for containing the "class" key, but when actually accessed, it returns null:

CsXQYV9[1].png

So, there appears there is a bug in 20.2.0.46 in the SfGrid.UnMatchedAttributes collection where the ContainsKey returns true but the returned value is actually null.

Please let me know if there is any further information that I can provide to further diagnose this issue with you.



NP Naveen Palanivel Syncfusion Team September 5, 2022 09:02 PM UTC

Hi Mike-E,


We checked your query and  gave the SfGrid a custom class property(Class=”test”). We verify that the specified custom class has been added to the grid in the browser. The issue does not replicate from our end, and we have also attached the screenshot below.


Kindly share us what kind of issue you facing and  let us know if the custom class of the grid is updating properly or not.



Please get back to us if you need further assistance.


Regards,

Naveen Palanivel



MI Mike-E September 5, 2022 10:11 PM UTC

Hi Naveen,


Thank you for the reply.  I can confirm that this is a definite issue that does not exist in 20.2.0.40.  At first glance, I am curious if you have tried `class="test"` rather than `Class="test"`.  Note that I am using lowercase `class`.  If that does not reproduce it on your side I will further investigate a reproducible solution for you.


Thank you for your continued assistance.



CM Charles Matvchuk September 6, 2022 01:44 AM UTC

Put a checkbox column as the first column and the error should resolve itself.  At least it did for me and my use case.  Even making the checkbox column not visible the error is still gone.



NP Naveen Palanivel Syncfusion Team September 7, 2022 12:15 AM UTC

Hi Charles,


Sorry to the inconvenience,


We check your query and we like to inform that we also using the lowercase “class” in grid. We accidently send uppercase custom class in pervious response, but reported issue does not occurs at our end .


Can you please share simple issue reproduceable sample to validate further at our end.


Regards,

Naveen Palanivel



MI Mike-E September 7, 2022 07:14 AM UTC

Thank you for the workaround @Charles.  Are you able to provide Syncfusion a simple repro for their investigation?  If not I can try to widdle one down.  Things are pretty busy for me here so finding time is a challenge ATM.



MI Mike-E September 7, 2022 06:27 PM UTC

Here you go Team Syncfusion. This throws the error in .46 but not .40:

https://i.imgur.com/sVWKAzR.png



NP Naveen Palanivel Syncfusion Team September 8, 2022 07:26 PM UTC

Hi Mike-E,

 

Sorry for the inconvenience. 

 

We are currently Validating the reported query at our end and we will update the further details within two days. Until then we appreciate your patience.

 

Regards,

Naveen Palanivel



MI Mike-E September 9, 2022 07:44 AM UTC

No problem Naveen.  I appreciate the update and collaboration.



NP Naveen Palanivel Syncfusion Team September 13, 2022 11:14 PM UTC

Hi  Mike


We check your query and issue is reproduced we will validating at our end . In the meantime we can given alternate way to overcome the issue to change nullable string to non nullable string. We attached the code snippet below , please refer the code snippet for your reference.


string Class

    {

        get

        {

            return string.Empty;

        }

    }

 



Please get back to us if you need further assistance



Regards,

Naveen Palanivel



MI Mike-E September 21, 2022 08:13 AM UTC

Thank you for the update @Naveen.  I wanted to verify that you are fixing this for a future version as while this is a workaround, it is still a breaking change for a minor version update.  Additionally (it should go without saying but will say it anyways :)) null references should be accounted for on your side as an API provider.


Thank you for any further consideration and efforts.



NP Naveen Palanivel Syncfusion Team September 27, 2022 04:01 AM UTC

Hi Mike,


We have confirmed this as an issue and logged the defect report “Appears there is a bug in  the SfGrid.UnMatchedAttributes collection” for the same. Thank you for taking time to report this issue and helping us to improve our product. At Syncfusion, we are committed to fix all validated defects (subject to technological feasibility and Product Development Life Cycle) and this fix will be included in our upcoming patch release which is expected to be rolled out on or before 19th  Oct , 2022.

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.       


https://www.syncfusion.com/feedback/38002/appears-there-is-a-bug-in-the-sfgrid-unmatchedattributes-collection



Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization”


Until then we appreciate your patience.



Regards,

Naveen Palanivel



MI Mike-E September 27, 2022 08:37 AM UTC

Thank you for the update Naveen, it is appreciated, along with all of your efforts over there.  I very much enjoy the quality of your controls. 🙏



NP Naveen Palanivel Syncfusion Team September 29, 2022 03:04 AM UTC

Hi Mike,


welcome.


we will update once the release is rolled out



Regards,

Naveen Palanivel



NP Naveen Palanivel Syncfusion Team October 26, 2022 02:54 AM UTC


Hi Mike,


Sorry for the Inconvenience.


We are facing difficulties in fix, so we are not able to include the reported Appears there is a bug in  the SfGrid.UnMatchedAttributes collection in our mentioned patch release as promised. We have planned to include this in our upcoming patch release which is expected to be rolled out by  16th Nov 2022.

Till then we appreciate your patience.    


Regards

Naveen Palanivel



MI Mike-E October 26, 2022 07:27 AM UTC

Thank you for the update, Naveen.



NP Naveen Palanivel Syncfusion Team October 28, 2022 04:17 AM UTC

Hi Mike,


Welcome


we will get back to you once the release is rolled out. 


Until then we appreciate your patience.


Regards,

Naveen Palanivel



NP Naveen Palanivel Syncfusion Team November 30, 2022 05:30 PM UTC

Hi Mike 


We are glad to announce that, we have included fix for the issue “Appears there is a bug in  the SfGrid.UnMatchedAttributes collection” in our release (20.3.0.59).  So please upgrade to our latest version of Syncfusion NuGet package to resolve the reported issue. Please find the Nuget package for latest fixes and features from below.


Nuget : https://www.nuget.org/packages/Syncfusion.Blazor.Grid


We appreciate your patience in waiting for this release.



Regards,

Naveen


Loader.
Up arrow icon