Gantt Chart cannot render task tree - produces an exception message

Hi,

Can you help me figure out what's the issue when I render a task tree? To give a brief description of the data that I'm working with, the TaskCollection property contains a task that has multiple single subtasks and these subtasks also has multiple subtasks under it.

When I was trying to render this on the web page, it returns this exception message instead.

warn: Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer[100]
Unhandled exception rendering component: Nullable object must have a value.
System.InvalidOperationException: Nullable object must have a value.
at System.Nullable`1.get_Value()
at Syncfusion.Blazor.Gantt.Internal.ChartBase`1.CalculateWidth(IDictionary`2 ganttData, Boolean isAuto)
at Syncfusion.Blazor.Gantt.Internal.ChartBase`1.UpdateGanttData(IEnumerable`1 records)
at Syncfusion.Blazor.Gantt.Internal.ChartPane`1.OnInitializedAsync()
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
Unhandled exception in circuit 'kVNkohZxenfDBVEsABXfH_POgIsppZIkfcpJ84bBH-g'.
System.InvalidOperationException: Nullable object must have a value.
at System.Nullable`1.get_Value()
at Syncfusion.Blazor.Gantt.Internal.ChartBase`1.CalculateWidth(IDictionary`2 ganttData, Boolean isAuto)
at Syncfusion.Blazor.Gantt.Internal.ChartBase`1.UpdateGanttData(IEnumerable`1 records)
at Syncfusion.Blazor.Gantt.Internal.ChartPane`1.OnInitializedAsync()
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
warn: Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer[100]
Unhandled exception rendering component: Cannot access a disposed object.
System.ObjectDisposedException: Cannot access a disposed object.
at Microsoft.AspNetCore.Components.RenderTree.ArrayBuilder`1.ThrowObjectDisposedException()
at Microsoft.AspNetCore.Components.RenderTree.ArrayBuilder`1.GrowBuffer(Int32 desiredCapacity)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& diffContext, Int32 newFrameIndex)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndex
Excl, Int32 newStartIndex, Int32 newEndIndexExcl)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.ComputeDiff(Renderer renderer, RenderBatchBuilder batchBuilder, Int32 componentId, ArrayRa
nge`1 oldTree, ArrayRange`1 newTree)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderInExistingBatch(RenderQueueEntry renderQueueEntry)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
Unhandled exception in circuit 'kVNkohZxenfDBVEsABXfH_POgIsppZIkfcpJ84bBH-g'.
System.ObjectDisposedException: Cannot access a disposed object.
at Microsoft.AspNetCore.Components.RenderTree.ArrayBuilder`1.ThrowObjectDisposedException()
at Microsoft.AspNetCore.Components.RenderTree.ArrayBuilder`1.GrowBuffer(Int32 desiredCapacity)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& diffContext, Int32 newFrameIndex)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndex
Excl, Int32 newStartIndex, Int32 newEndIndexExcl)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.ComputeDiff(Renderer renderer, RenderBatchBuilder batchBuilder, Int32 componentId, ArrayRa
nge`1 oldTree, ArrayRange`1 newTree)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderInExistingBatch(RenderQueueEntry renderQueueEntry)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()


I am attaching the razor page that demonstrates this particular issue. Please let me know if this type of data structure can be properly rendered by the Gantt chart using the exact Gantt chart settings that I'm using. If not, please advise what needs to be adjusted.


For reference, I'm using Syncfusion.Blazor version 19.1.0.63.


Thanks


Attachment: GanttChartTaskTreeRenderIssue_88fd09ae.zip


5 Replies 1 reply marked as answer

MS Monisha Sivanthilingam Syncfusion Team August 2, 2021 07:03 AM UTC

Hi Denzel, 
 
Greetings from Syncfusion support. 
 
We were able to replicate the error you reported. However, this error has already been noticed by us and fixed internally. Please upgrade your packages to the latest version v19.2.49 to avoid this issue. 
 
Please contact us if you require any further assistance. 
 
Regards, 
Monisha. 



RS Roy Sunga replied to Monisha Sivanthilingam August 2, 2021 09:08 PM UTC

Hi Monisha,


I have tried upgrading the Syncfusion Blazor to version 19.2.0.49 but the Gantt chart is still not rendering. Instead, I'm getting this exception instead.

warn: Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer[100]
Unhandled exception rendering component: Value cannot be null. (Parameter 'source')
System.ArgumentNullException: Value cannot be null. (Parameter 'source')
at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
at Syncfusion.Blazor.TreeGrid.SfTreeGrid`1.HierarchyToFlatData(IEnumerable`1 datasource, Object parentItem, DataReadyArgs`1 dm)
at Syncfusion.Blazor.TreeGrid.SfTreeGrid`1.HierarchyToFlatData(IEnumerable`1 datasource, Object parentItem, DataReadyArgs`1 dm)
at Syncfusion.Blazor.TreeGrid.SfTreeGrid`1.HierarchyToFlatData(IEnumerable`1 datasource, Object parentItem, DataReadyArgs`1 dm)
at Syncfusion.Blazor.TreeGrid.SfTreeGrid`1.ProcessHierarchyData(DataReadyArgs`1 dm, IEnumerable`1 flatDataSource, IEnumerable`1 parentRecords)
at Syncfusion.Blazor.TreeGrid.SfTreeGrid`1.ConvertToFlatData(DataReadyArgs`1 dm)
at Syncfusion.Blazor.TreeGrid.SfTreeGrid`1.GetFlatData(IEnumerable dataSource, DataReadyArgs`1 dm, Boolean isRemoteChild, Boolean isGanttRecord)
at Syncfusion.Blazor.Gantt.Internal.TreeGridPane`1.GetGanttFlatData(IEnumerable dataSource)
at Syncfusion.Blazor.Gantt.Internal.TreeGridPane`1.OnInitializedAsync()
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
Unhandled exception in circuit 'rlFkGhqmk7Z2kyetGmw_4bdsG2u-W4L7M54Lfm-VkHA'.
System.ArgumentNullException: Value cannot be null. (Parameter 'source')
at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
at Syncfusion.Blazor.TreeGrid.SfTreeGrid`1.HierarchyToFlatData(IEnumerable`1 datasource, Object parentItem, DataReadyArgs`1 dm)
at Syncfusion.Blazor.TreeGrid.SfTreeGrid`1.HierarchyToFlatData(IEnumerable`1 datasource, Object parentItem, DataReadyArgs`1 dm)
at Syncfusion.Blazor.TreeGrid.SfTreeGrid`1.HierarchyToFlatData(IEnumerable`1 datasource, Object parentItem, DataReadyArgs`1 dm)
at Syncfusion.Blazor.TreeGrid.SfTreeGrid`1.ProcessHierarchyData(DataReadyArgs`1 dm, IEnumerable`1 flatDataSource, IEnumerable`1 parentRecords)
at Syncfusion.Blazor.TreeGrid.SfTreeGrid`1.ConvertToFlatData(DataReadyArgs`1 dm)
at Syncfusion.Blazor.TreeGrid.SfTreeGrid`1.GetFlatData(IEnumerable dataSource, DataReadyArgs`1 dm, Boolean isRemoteChild, Boolean isGanttRecord)
at Syncfusion.Blazor.Gantt.Internal.TreeGridPane`1.GetGanttFlatData(IEnumerable dataSource)
at Syncfusion.Blazor.Gantt.Internal.TreeGridPane`1.OnInitializedAsync()
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
warn: Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer[100]
Unhandled exception rendering component: Cannot access a disposed object.
System.ObjectDisposedException: Cannot access a disposed object.
at Microsoft.AspNetCore.Components.RenderTree.ArrayBuilder`1.ThrowObjectDisposedException()
at Microsoft.AspNetCore.Components.RenderTree.ArrayBuilder`1.GrowBuffer(Int32 desiredCapacity)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& diffContext, Int32 newFrameIndex)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndex
Excl, Int32 newStartIndex, Int32 newEndIndexExcl)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.ComputeDiff(Renderer renderer, RenderBatchBuilder batchBuilder, Int32 componentId, ArrayRa
nge`1 oldTree, ArrayRange`1 newTree)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderInExistingBatch(RenderQueueEntry renderQueueEntry)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
Unhandled exception in circuit 'rlFkGhqmk7Z2kyetGmw_4bdsG2u-W4L7M54Lfm-VkHA'.
System.ObjectDisposedException: Cannot access a disposed object.
at Microsoft.AspNetCore.Components.RenderTree.ArrayBuilder`1.ThrowObjectDisposedException()
at Microsoft.AspNetCore.Components.RenderTree.ArrayBuilder`1.GrowBuffer(Int32 desiredCapacity)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& diffContext, Int32 newFrameIndex)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndex
Excl, Int32 newStartIndex, Int32 newEndIndexExcl)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.ComputeDiff(Renderer renderer, RenderBatchBuilder batchBuilder, Int32 componentId, ArrayRa
nge`1 oldTree, ArrayRange`1 newTree)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderInExistingBatch(RenderQueueEntry renderQueueEntry)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()


Were you able to test the code that I have provided to your codebase with the updated library? Can you provide the code that you have used plus the sample code that I have initially attached? Perhaps, I have missed a new implementation that you're maybe using since this is an updated version of the library.

Thanks!



MS Monisha Sivanthilingam Syncfusion Team August 3, 2021 11:08 AM UTC

Hi Denzel, 
 
We have also noticed that issue and have already fixed it in version v19.2.51. Please upgrade your packages to the latest version to avoid this issue. 
 
Regards, 
Monisha. 


Marked as answer

RS Roy Sunga August 3, 2021 01:13 PM UTC

Hi Monisha,


Can confirm that the issue is resolved with upgrading the Syncfusion Blazor libraries to version 19.2.0.51. Many thanks for your response!



PN Preethi Nesakkan Gnanadurai Syncfusion Team August 4, 2021 09:21 AM UTC

Hi Denzel, 
  
Thanks for the update, we are glad to hear that your issue has been fixed. 
  
Regards, 
Preethi 


Loader.
Up arrow icon