We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Null reference exception : value cannot be null in sfchart


I am developing xamarin forms app using sfchart and have created the layout in xaml and not from code behind.

The app is working fine in Android but the same code when deployed on IOS simulator results in exception.

Exception says " Argumentnullexception: Value cannot be null" and When I look at the output window it points to main.cs, line 17 file in IOS project which has the code ->  UIApplication.Main(args, null, "AppDelegate");

I somehow feel the null being passed to this method is causing this.  The complete log from output window is attached as a notepad file. Pls check and let me know the issue..

I already used the sample created by you guys in which sfchart has been created from code behind and that works fine. SO, need to know why it does not work with xaml coding.  My chart in android looks as below.

Attachment: logs_ba782ed2.zip

6 Replies

SP Saravana Pandian Murugan Syncfusion Team June 23, 2017 12:36 PM UTC

Hi Naveen, 
Thanks for using Syncfusion products. 
We suspect that, the below line is not added in your application’s AppDelegate.cs file iOS project. 
Code Example:  
public override bool FinishedLaunching(UIApplication app, NSDictionary options)  
            new SfChartRenderer();  
You can also refer the below KB article for reference.  
If you are still facing this issue, please update us the sample in which you are facing this issue which will be helping for providing further assistance on this.  
Saravana Pandian M. 

NC Naveen C Ramachandrappa June 24, 2017 01:05 AM UTC

I already have new SfChartRenderer();   in my code but still exception occurs.

I have put the complete code on onedrive as it is big. PFB the link. Please let me know the fix or issue.




NC Naveen C Ramachandrappa June 27, 2017 05:47 AM UTC


Looking for an update on this issue. My previous mail has all the details with complete code to troubleshoot. 

SP Saravana Pandian Murugan Syncfusion Team June 27, 2017 12:36 PM UTC

Hi Naveen,

Sorry for the delay.

We were able to reproduce the reported issue at our end. Currently, we are preparing the feasibility workaround to overcome this issue.We will update you with more details in one business day (June 28, 2017).

Saravana Pandian M. 

NC Naveen C Ramachandrappa June 28, 2017 06:01 PM UTC


Can you please provide an ETA so that I know by when I can expect a fix.

SP Saravana Pandian Murugan Syncfusion Team June 29, 2017 12:23 PM UTC

Hi Naveen,

A support incident has been created under your account and we request you to login into our Direct Trac support system for further updates on this issue. Our Direct Trac support system can be accessed from the following link.

Link: https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents  

Saravana Pandian M.

Live Chat Icon For mobile
Up arrow icon