App crashes when no matches found

Hi.
I try to search any word that does not match anything in the list. App crashes  instead of showing "No Results Found".

a) Ios 14.3
b) Nugget 18.4.0.32

1) Mainpage.Xaml

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
               xmlns:combobox="clr-namespace:Syncfusion.XForms.ComboBox;assembly=Syncfusion.SfComboBox.XForms"
             xmlns:ListCollection="clr-namespace:System.Collections.Generic;assembly=mscorlib"
             xmlns:local="clr-namespace:ComboBox_MultiSelection"
             x:Class="ComboBox_MultiSelection.MainPage">
    <ContentPage.BindingContext>
        <local:EmployeeViewModel/>
    </ContentPage.BindingContext>
    <StackLayout
        VerticalOptions="Start" 
        HorizontalOptions="Start" 
        Padding="30">
        <Button Text="Clear" Clicked="Btn_Clicked" HorizontalOptions="Center" VerticalOptions="Center"/>
        <combobox:SfComboBox
            HeightRequest="40"
            x:Name="comboBox" 
            DisplayMemberPath="Name"
            IsEditableMode="True"
            AllowFiltering="True"
            SuggestionMode="Contains"
            Watermark="Search...."
            TextHighlightMode="MultipleOccurrence"
            HighlightedTextColor="Red"
            HighlightedTextFontAttributes="Bold"
            NoResultsFoundText="Material not in the list"
            SelectedValuePath="ID"
            DataSource="{Binding EmployeeCollection}">
            <combobox:SfComboBox.ItemTemplate>
                <DataTemplate>
                    <StackLayout Orientation="Horizontal">
                        <Label Text="{Binding Name}" FontSize="Medium"/>
                    </StackLayout>
                </DataTemplate>
            </combobox:SfComboBox.ItemTemplate>
        </combobox:SfComboBox>
    </StackLayout>
</ContentPage>

2) Mainpage.cs

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;

namespace ComboBox_MultiSelection
{
public partial class MainPage : ContentPage
{
        public MainPage()
{
InitializeComponent();
}

        private void Btn_Clicked(object sender, EventArgs e)
        {
            comboBox.Clear();
        }
    }

    public class Employee
    {
        private int id;
        public int ID
        {
            get { return id; }
            set { id = value; }
        }
        private string name;
        public string Name
        {
            get { return name; }
            set { name = value; }
        }
    }

    public class EmployeeViewModel
    {
       
        private ObservableCollection<Employee> employeeCollection;
        public ObservableCollection<Employee> EmployeeCollection
        {
            get { return employeeCollection; }
            set { employeeCollection = value; }
        }
        public EmployeeViewModel()
        {
            employeeCollection = new ObservableCollection<Employee>();
            employeeCollection.Add(new Employee() { ID = 1, Name = "Frank" });
            employeeCollection.Add(new Employee() { ID = 2, Name = "James" });
            employeeCollection.Add(new Employee() { ID = 3, Name = "Steve" });
            employeeCollection.Add(new Employee() { ID = 4, Name = "Lucas" });
            employeeCollection.Add(new Employee() { ID = 5, Name = "Mark" });
            employeeCollection.Add(new Employee() { ID = 6, Name = "Michael" });
            employeeCollection.Add(new Employee() { ID = 7, Name = "Aldrin" });
            employeeCollection.Add(new Employee() { ID = 8, Name = "Jack" });
            employeeCollection.Add(new Employee() { ID = 9, Name = "Howard" });
        }
    }
}


7 Replies 1 reply marked as answer

RB Robin Bahm January 5, 2021 03:00 AM UTC

I'm having the same issue with the SFAutoComplete control, with version 18.4.0.32 and 18.4.0.33.  The issue only occurs on iOS for me, it works as expected on Android.  It seems to crash the app immediately after the ValueChanged event is fired.  Rolling back to 18.4.0.31 fixes the issue.

The error that is thrown by the SFAutoComplete control is 
SIGABRT: Object reference not set to an instance of an object.
  • AutoCompeteTableSource.GetCell (UIKit.UITableView tableView, Foundation.NSIndexPath indexPath)
  • (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
  • UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate)
  • UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName)
  • Application.Main (System.String[] args)


SP Sakthivel Palaniyappan Syncfusion Team January 5, 2021 01:18 PM UTC

Hi EDGAR,

Greetings from Syncfusion.

We have analyzed your query and fixed the reported issue of “While typing in SfComboBox, the app is crashing in iOS.” and please find the assemblies from below.

Custom Assemblies:
https://www.syncfusion.com/downloads/support/directtrac/general/ze/SfComboBox-674091629.zip

Assembly version : 18.4.0.32

Since 18.4.0.32 is a weekly NuGet release, we are not able to generate patch 18.4.0.32 version. We can generate patch only for Main release and SP1 release versions, so we have provided the custom assemblies in 18.4.0.32.

Disclaimer:
Please note that we have created this for version
18.4.0.32 specifically to resolve the issue reported in this incident. If you have received other patches for the same version for other products, please apply all patches in the order received.

Please refer the  below link for how to apply custom assemblies.
https://www.syncfusion.com/kb/8279/how-to-apply-the-custom-assemblies-when-configured-the-project-with-syncfusion-nuget


Fix for the reported issue will be included in our upcoming weekly NuGet release, which will be available on January 12, 2021.

Regards,
Sakthivel P.
 



EG EDGAR GARCIA January 5, 2021 02:50 PM UTC

Thanks, 


SS Suganya Sethuraman Syncfusion Team January 6, 2021 06:42 AM UTC

Hi EDGAR,

Most welcome. As promised earlier, we will include the fix in our upcoming weekly NuGet release, which will be available on January 12, 2021.We appreciate your patience until then.

Regards,
Suganya Sethuraman.
 



SS Suganya Sethuraman Syncfusion Team January 13, 2021 01:10 PM UTC

Hi EDGAR,

Thanks for the patience.

We have fixed the reported issue and included the reported issue in our latest Weekly NuGet release update version 18.4.0.34 which is available for download (https://www.nuget.org/ ).

We thank you for your support and appreciate your patience in waiting for this update. Please get in touch with us if you would require any further assistance.

Regards,
Suganya Sethuraman.
 


Marked as answer

MI Michal October 23, 2021 02:42 PM UTC

Hello, bug is still present in other form in UWP version 18x to 19.3.0.46. How to reproduce:

When text  "No Results Found" in sugestion box appear and you click on it = app crashes.

Also none of event is called: SelectionChanged, ValueChanged when you click on "No Results Found", so we cant catch empty selection.

Happening with dynamic datasource:

public ObservableCollection<RowData> ComboSoure = new ObservableCollection<RowData>();

public class RowData : DataRecord

{

public string keyval { get; set; }

public string caption { get; set; }

public class DataRecord

{

private Dictionary<string, object> _Values;

public Dictionary<string, object> Values

{

get => _Values;

set => _Values = value;

}

public DataRecord()

{

_Values = new Dictionary<string, object>();

}}}



SS Suganya Sethuraman Syncfusion Team October 25, 2021 06:14 AM UTC

Hi Michal,

Greetings from Syncfusion.

We have checked the reported issue, but we could not be able to reproduce the issue. Please have a sample for your reference,

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/ComboBoxNoResultsFound1675527253

Since we are not aware of your exact application scenario, so we request you to check the issue with the attached sample and let us know whether it is reproduced or not? If the issue was not reproduced in this sample, please revert us by modifying the sample based on your application along with replication procedure or provide the sample. It will help us to provide better solution at the earliest.

Regards,
Suganya Sethuraman.


Loader.
Up arrow icon