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
close icon

[Android] System.NullReferenceException: Object reference not set to an instance of an object

Hello,
I created a SfListView reading data from a local SQLite database. It should display a list of questions with different types of answers, and the ItemTemplate is defined by a DataTemplateSelector.
If I put a single type of question in the list, it is rendered correctly and scrolling works great. If I mix types of question, when scrolling it throws the exception in the subject.

Please find attached my code. You should login (login will throw an exception which is already being investigated from your side), tap on the first audit and then tap on the first block to get the list that throws the exception. All the others works great.

Thanks for your support.

Regards,
Matteo

Attachment: AM_MP_V1_b3799400.zip

6 Replies

JN Jayaleshwari N Syncfusion Team January 28, 2019 11:53 AM UTC

Hi Matteo,   
   
Thanks for contacting Syncfusion Support.   
 
We have checked the reported query in your sample from our side. We would like to let you know that you have to set some time delay to load busy indicator before navigating to the  Categorie page in your async ExecuteSelectedItemsCommand method because when busy indicator is enabled it needs some time to load indicator before navigating. We could currently able to run your sample after setting some delay. We will analyze further in detail regarding the reported crash and provide details on or before January 30, 2019.  
   
private async void ExecuteSelectedItemCommand(Audit item)   
{   
  IsBusy = true;   
   
  await Task.Delay(200);   
   
  if (item != null)   
    await App.NavigationService.NavigateAsync(nameof(CategoriePage), item);   
}   
   
We have attached the modified sample for your reference and you can download the same from the following location.   
 
Regards,   
Jayaleshwari N.  



GP Gnana Priya Namasivayam Syncfusion Team January 30, 2019 01:03 PM UTC

Hi Matteo, 
 
We have checked the given sample in detail. We would like to let you know that we are getting unhandled exception from SfButton in rare case while navigating from AuditList and we have forwarded to validate the exception to concern team. But the reported Null reference Exception didn’t occur from our side. Can you please share the stack trace when reported exceptions occurs which will help us to analyze better and provide appropriate solution 
 
Regards, 
Gnana Priya N 



MC Matteo Comi January 30, 2019 01:25 PM UTC

Hello,
please find the stacktrace attached.

Regards,
Matteo

Attachment: stacktrace_8c34545c.zip


BK Bharathiraja K Syncfusion Team February 5, 2019 03:53 AM UTC

Hi Matteo, 
 
Thanks for your patience. We have validated and confirmed “SfButton get crash when placed inside the Xamarin.Forms TabbedPage” is an issue. We will include fix for the issue in our upcoming Volume-1 release which is scheduled to be rolled out in the mid of March 2019. We appreciate your patience until then.  
 
Thanks, 
Bharathiraja. 



MC Matteo Comi February 5, 2019 08:26 AM UTC

Hello,
thanks for the update.

Matteo


BK Bharathiraja K Syncfusion Team February 5, 2019 08:45 AM UTC

Hi Matteo, 
  
Thanks for your update. As always, we are happy to assist you. 
 
Thanks, 
BharathiRaja. 


Loader.
Live Chat Icon For mobile
Up arrow icon