NullReferenceException when closing Grid Dialog

Hello,

I'm getting the following error when closing the edit dialog on Grid (started to happen when migrating to v18.2.46 (now in 18.2.47)

warn: Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer[100]
      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.Internal.Edit`1.CloseEdit()
   at Syncfusion.Blazor.Grids.SfGrid`1.CloseEdit()
   at Syncfusion.Blazor.Grids.Internal.DialogEdit`1.<BuildRenderTree>b__0_10()
   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
   at Syncfusion.Blazor.Internal.SfBaseUtils.InvokeEvent[T](Object eventFn, T eventArgs)
   at Syncfusion.Blazor.Buttons.SfButton.OnClickHandler(MouseEventArgs args)
   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
      Unhandled exception in circuit '7cDhXbovi8WwPypWTjlhMkdan8eN6VIRLNUKBpd1Vu0'.
System.NullReferenceException: Object reference not set to an instance of an object.
   at Syncfusion.Blazor.Grids.Internal.Edit`1.CloseEdit()
   at Syncfusion.Blazor.Grids.SfGrid`1.CloseEdit()
   at Syncfusion.Blazor.Grids.Internal.DialogEdit`1.<BuildRenderTree>b__0_10()
   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
   at Syncfusion.Blazor.Internal.SfBaseUtils.InvokeEvent[T](Object eventFn, T eventArgs)
   at Syncfusion.Blazor.Buttons.SfButton.OnClickHandler(MouseEventArgs args)
   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
      Unhandled exception in circuit '7cDhXbovi8WwPypWTjlhMkdan8eN6VIRLNUKBpd1Vu0'.
System.Threading.Tasks.TaskCanceledException: A task was canceled.
   at Microsoft.JSInterop.JSRuntime.InvokeWithDefaultCancellation[T](String identifier, Object[] args)
   at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
   at Syncfusion.Blazor.SfBaseComponent.InvokeMethod(String methodName, Object[] methodParams)
   at Syncfusion.Blazor.Popups.SfDialog.ComponentDispose()
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__139_0(Object state)
   at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteSynchronously(TaskCompletionSource`1 completion, SendOrPostCallback d, Object state)
   at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.<>c.<.cctor>b__23_0(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteBackground(WorkItem item)

Attached is the code.

Thanks,

erick










Attachment: test.razor_86135fc9.zip

9 Replies 1 reply marked as answer

ER Erick July 30, 2020 03:31 AM UTC

One additional comment. I've tested a Grid with locally populated data source and it works ok. It seems that the exception occurs when clicking on the cancel button of the edit dialog in a Grid that has OData API as data source.

Regards,

Erick


RN Rahul Narayanasamy Syncfusion Team July 30, 2020 06:03 AM UTC

Hi Erick, 
   
Greetings from Syncfusion. 
     
We have checked the reported problem and we are able to reproduce the reported at our end too. We have already confirmed it is a bug and logged the defect report “Exception throws when cancel button is pressed in Dialog Editing”. Thank you for taking the time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and including the defect fix in our upcoming  weekly patch release which is expected to be rolled out on August 05, 2020   
   
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.   
   
   
Till then we appreciate your patience.    
 
Regards, 
Rahul 




ER Erick July 31, 2020 03:41 AM UTC

Thanks Rahul,

I looked at https://www.syncfusion.com/feedback/16516/exception-throws-when-cancel-button-is-pressed-in-dialog-editing, and it says the bug will be fixed on Vol 3 release (september 2020). Is that the right date? I would like to know because I already missed a project deadline and have to decide if it's better to get back to 18.1 version.

I have also noticed that adding lines to Grid is not working, only editing (I have several OData sourced grids with dropdowns that make reference to another api endpoint). Does this have to do with the same cancel issue?

Regards,

Erick






RN Rahul Narayanasamy Syncfusion Team August 3, 2020 12:10 PM UTC

Hi Erick, 
 
Query: I looked at https://www.syncfusion.com/feedback/16516/exception-throws-when-cancel-button-is-pressed-in-dialog-editing, and it says the bug will be fixed on Vol 3 release (september 2020). Is that the right date? 
 
Yes, the fix for the issue was fixed internally and it will be included in our upcoming  weekly patch release which is expected to be rolled out on August 05, 2020 as promised. Until then we appreciate your patience. 
 
Regards, 
Rahul 



RN Rahul Narayanasamy Syncfusion Team August 5, 2020 10:34 AM UTC

Hi Erick 
  
We are glad to announce that our Blazor Weekly patch release (v18.2.0.48) has been rolled out successfully and in this release we have included the fix for Exception throws when cancel button is pressed in Dialog Editing issue. So kindly update your NuGet to our latest version (18.2.0.48) to resolve the reported issue.  


 
 
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.  

Regards, 
Rahul 
 


Marked as answer

ER Erick August 6, 2020 10:51 PM UTC

Thank you Rahul. I have tested the new version and the issue is solved.

Regards,

erick


RN Rahul Narayanasamy Syncfusion Team August 7, 2020 04:47 AM UTC

Hi Erick, 

Thanks for the update. 

Please get back to us if you need further assistance. 

Regards, 
Rahul 



MC Mike Chafin August 7, 2020 01:03 PM UTC

I was having the same issue with Grid dialog but with local datasource running 47.  48 fixed it but .....

What concerns me is that this is the third regression error I've seen indicating that unit testing coverage is lacking.  What is the unit testing coverage? If it is below 95% will it be brought up to > 95%




RN Rahul Narayanasamy Syncfusion Team August 10, 2020 02:36 PM UTC

Hi Mike, 
 
Greetings from Syncfusion. 
 
We have validated your query and in our Volume 2 release, we did major changes to reduce JavaScript interop calls to improve performance. This result in major design level changes, hence these issues occurred. We are adding more test cases at our end to prevent these problems in future. 
 
Until then we appreciate your patience. 
 
Regards, 
Rahul 
 


Loader.
Up arrow icon