System.ArgumentNullException: Value cannot be null.

Got the following error when loading a view with that component in it

System.ArgumentNullException: Value cannot be null. Parameter name: str at Foundation.NSString..ctor (System.String str) [0x0002e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.18.0.18/src/Xamarin.iOS/Foundation/NSString.cs:162 at Syncfusion.SfChart.iOS.SFDateTimeRangeNavigator.LabelWidthForText (System.String text, Syncfusion.SfChart.iOS.SFRangeNavigatorScaleStyle scaleStyle) [0x00000] in <12a7b576f7534afa88517c11b35449e1>:0 at Syncfusion.SfChart.iOS.SFDateTimeRangeNavigator.IsOverFlow (System.Double availableWidth, Foundation.NSMutableArray labels, System.String labelPosition) [0x00033] in <12a7b576f7534afa88517c11b35449e1>:0 at Syncfusion.SfChart.iOS.SFDateTimeRangeNavigator.CanSetInterval (Syncfusion.SfChart.iOS.SFDateTimeRangeNavigatorIntervalType intervalRange) [0x000e5] in <12a7b576f7534afa88517c11b35449e1>:0 at Syncfusion.SfChart.iOS.SFDateTimeRangeNavigator.SetCustomInterval () [0x001b4] in <12a7b576f7534afa88517c11b35449e1>:0 at Syncfusion.SfChart.iOS.SFDateTimeRangeNavigator.MeasureIntervals () [0x00006] in <12a7b576f7534afa88517c11b35449e1>:0 at Syncfusion.SfChart.iOS.SFDateTimeRangeNavigator.LayoutSubviews () [0x0016e] in <12a7b576f7534afa88517c11b35449e1>:0

3 Replies

YP Yuvaraj Palanisamy Syncfusion Team October 22, 2020 02:15 PM UTC

   
Greetings from Syncfusion.  
   
We have analyzed your query and we have prepared the sample; it was working fine at our end. Could you please share following details which is helpful to serve you better solution at the earliest?  
   
·       Share your use case scenario.  
·       Whether the reported crash issue happened in load time or while navigation.  
·       If possible, please share the code example   
·       Issue reproducing steps also please share  
 
Regards, 
Yuvaraj 



MJ malcom jarr November 18, 2020 05:29 AM UTC

The exception that is thrown when a C# null reference is passed to a method that does not accept it as a valid argument. An ArgumentNullException exception is thrown at run time in the following two major circumstances:

  • An uninstantiated object is passed to a method. To prevent the error, instantiate the object.
  • An object returned from a method call is then passed as an argument to a second method, but the value of the original returned object is null. To prevent the error, check for a return value that is null and call the second method only if the return value is not null.




YP Yuvaraj Palanisamy Syncfusion Team November 19, 2020 02:37 PM UTC

Hi Malcom jar,  
   
Thanks for your update.  We can provide the possible fix based on considering this issue reproducing cases. But it leads to fail with some other cases. In case of knowing is proper use case and way of replicating this issue then it will be better to provide a fix with stability.  
 
@
 [email protected]  Could you please share your use case scenario, which is helps to resolve the reported issue and we will provide you better solution at the earliest.  

Regards, 
Yuvaraj. 


Loader.
Up arrow icon