Dashboard layout nullreference exception in 18.4.30

I'm getting a nullreference exception in the Dashboard layout component with the following stack trace since moving to 18.4.30.

Syncfusion.Blazor.dll!Syncfusion.Blazor.Layouts.SfDashboardLayout.OnAfterScriptRendered()
Syncfusion.Blazor.dll!Syncfusion.Blazor.SfBaseComponent.OnAfterRenderAsync(bool firstRender)
[Resuming Async Method]
System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<System.Threading.Tasks.VoidTaskResult>.AsyncStateMachineBox<Syncfusion.Blazor.SfBaseComponent.<OnAfterRenderAsync>d__26>.ExecutionContextCallback(object s)

<SfDashboardLayout AllowDragging=@true AllowResizing=@true Columns="10" @ref=@MainDashboard>
      <DashboardLayoutEvents Created=@DashBoardCreate Changed=@DashBoardTilePositionChange OnResizeStop=@DashBoardTileSizeChange />
</SfDashboardLayout>

I'm currently creating panels via calls to AddPanel on the dashboard create event. The exception occurs before the create event is fired. 

Attach is the application logging output.

Attachment: vx20201222_1a912bf5.zip

7 Replies 1 reply marked as answer

SP Sowmiya Padmanaban Syncfusion Team December 23, 2020 11:55 AM UTC

Hi Michael Aston,  
 
Greetings from Syncfusion support. 
 
We have checked your reported problem with DashboardLayout component. We are able to replicate the issue. We have consider this as a bug from DashboardLayout component. We will include the fix for this bug in our next patch release which is expected to rolled out by the end of December 2020.  
  
You can track the status of this issue fix through the following feedback portal link.  
 
 
However, we suggest you to use the below workaround solution to resolve your issue until the release rolls out. 
 
You need to add the empty DashboardLayoutPanels tag to DashboardLayout component. It will resolves your reported issue. 
 
<SfDashboardLayout AllowDragging=@true AllowResizing=@true Columns="10" @ref=@MainDashboard> 
    <DashboardLayoutEvents Created=@DashBoardCreate /> 
    <DashboardLayoutPanels>       
    </DashboardLayoutPanels> 
</SfDashboardLayout> 
 
@code { 
    SfDashboardLayout MainDashboard; 
    public void DashBoardCreate() 
    { 
        this.MainDashboard.AddPanel(new PanelModel 
        { 
            SizeX = 2, 
            SizeY = 2, 
            Row = 0, 
            Col = 0, 
            Content =@<div style="height:100%; width:100%;"> 
        <div>Button</div> 
    </div>}); 
 
    } 
} 
 
Please, refer the sample link below. 
 
 
Please let us know, if you need any further assistance. 
 
Regards,  
Sowmiya.P 



MA Michael Aston December 23, 2020 04:03 PM UTC

Thanks for the work around,  but I've now hit another issue with another null reference exception this time in chart code. 

Syncfusion.Blazor.dll!Syncfusion.Blazor.Charts.Chart.Internal.ChartSeriesRenderer.ProcessJsonData() Unknown
Syncfusion.Blazor.dll!Syncfusion.Blazor.Charts.Chart.Internal.ChartSeriesRenderer.DataManagerSuccess(bool isRemoteData) Unknown
Syncfusion.Blazor.dll!Syncfusion.Blazor.Charts.SfChart.InitializeDataModule(Syncfusion.Blazor.Charts.ChartSeries series) Unknown
Syncfusion.Blazor.dll!Syncfusion.Blazor.Charts.SfChart.ProcessData(bool render, bool shouldLoadedTrigger) Unknown
Syncfusion.Blazor.dll!Syncfusion.Blazor.Charts.SfChart.OnAfterRenderAsync(bool firstRender) Unknown

<SfChart Palettes=@CompositeRiskPalette Height="100%" Width="100%" @ref=@ChartObj>
        <ChartEvents OnExportComplete=@GetChartImage></ChartEvents>
        <ChartPrimaryXAxis Coefficient="100" LabelPlacement="LabelPlacement.OnTicks" EnableTrim="true" ValueType="Syncfusion.Blazor.Charts.ValueType.Category"></ChartPrimaryXAxis>
        <ChartPrimaryYAxis Minimum="0" Maximum="100" />
        <ChartSeriesCollection>
            <ChartSeries DataSource=@CompositeRiskActual XName="Title" YName="Value" Opacity="0.75" Type="ChartSeriesType.Radar" DrawType="ChartDrawType.Area" />
            <ChartSeries DataSource=@CompositeRiskAcceptable XName="Title" YName="Value" Opacity="0.75" Type="ChartSeriesType.Radar" DrawType="ChartDrawType.Area" />
        </ChartSeriesCollection>
        <ChartTooltipSettings Enable="true"></ChartTooltipSettings>
    </SfChart>

public String[] CompositeRiskPalette = new String[] { "#FF6666", "#66FF66" };

        public List<CompositeRiskData> CompositeRiskActual = new List<CompositeRiskData>
        {
            new CompositeRiskData{ Title= "Control weakness", Value= 75 },
            new CompositeRiskData{ Title= "Special circumstances", Value= 76 },
            new CompositeRiskData{ Title= "Business impact", Value= 80 },
            new CompositeRiskData{ Title= "Level of threat", Value= 27 },
            new CompositeRiskData{ Title= "Criticality", Value= 58 }
        };

        public List<CompositeRiskData> CompositeRiskAcceptable = new List<CompositeRiskData>
        {
            new CompositeRiskData{ Title= "Control weakness", Value= 12 },
            new CompositeRiskData{ Title= "Special circumstances", Value= 12 },
            new CompositeRiskData{ Title= "Business impact", Value= 15 },
            new CompositeRiskData{ Title= "Level of threat", Value= 13 },
            new CompositeRiskData{ Title= "Criticality", Value= 14 }
        };


Note: I've added a reference to cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.20/lodash.min.js work around the undefined throttle issue.


DG Durga Gopalakrishnan Syncfusion Team December 28, 2020 07:25 AM UTC

Hi Michael,

We suggest you declare a property with get, set accessor to resolve the reported issue. Please check with the below link for latest release update changes.

public class CompositeRiskData{
        public string Title { get; set; }
        public double Value { get; set; }
    }

UG Link : https://blazor.syncfusion.com/documentation/release-notes/18.4.30/?type=all#chart


Kindly revert us if you have any concerns.

Regards,
Durga G



MA Michael Aston December 28, 2020 08:18 PM UTC

Thanks that resolves that issue. The next 18.4.30 issue I've hit is that the DataUrl property is not set for the new SfChart event OnExportComplete thats fired by the chart Export function.

ChartObj.Export(ExportType.PNG, "Dummy", null, false);




DG Durga Gopalakrishnan Syncfusion Team December 29, 2020 02:49 PM UTC

Hi Michael, 

 
We have validated your reported scenario. We have considered this as a bug and logged a defect report. This fix will be available in our upcoming weekly patch release which is scheduled to be rolled out on 27th January 2021. We appreciate your patience until then. You can keep track of the bug from the feedback portal below. 
  
  
The provided feedback link is private, and you need to login to view this feedback. 
  
If you have any more specification/precise replication procedure or a scenario to be tested, you can add it as a comment in the portal. 
  
Regards, 
Durga G 



DG Durga Gopalakrishnan Syncfusion Team January 6, 2021 04:44 PM UTC

Hi Michael,

We have fixed the reported issue and this fix will be available in our upcoming weekly patch release which is scheduled to be rolled out on 12th January 2021. We appreciate your patience until then. Meanwhile, we have generated custom nugget package in latest released version. Please add this local nugget in your application and install Syncfusion.Blazor.Charts package to get rid of reported issue. 


Please revert us if you have any concerns.

Regards,
Durga G



DG Durga Gopalakrishnan Syncfusion Team January 13, 2021 02:48 PM UTC

Hi Michael,

We are glad to announce that our v18.4.34 patch release is rolled out; we have added the fix for reported issue. You can use the latest Syncfusion.Blazor NuGet package version


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,
Durga G


Marked as answer
Loader.
Up arrow icon