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

Crash in release mode works fine in debug after XF 3.5 update

I'm not sure if this is a Syncfusion or XF problem, but the problem started occurring after the XF 3.5 update. I suspect it's related to the SfListview control, but I can't be sure.   I have created a very stripped down version of my app and I'm able to replicate the problem.  

My environment:
Visual Studio 15.9.7
Xamarin Forms 3.5.0.169047
My Xamarin app uses .net standard as it's code sharing strategy
Issue happens on Android and iOS builds in release mode
Issue can be reproduced with a small representative app on Android (haven't tried yet on iOS)

Repo attached

Here is the XAML for the MainPage of my basic app:

<?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:sflv="clr-namespace:Syncfusion.ListView.XForms;assembly=Syncfusion.SfListView.XForms"
             xmlns:sfPick="clr-namespace:Syncfusion.SfPicker.XForms;assembly=Syncfusion.SfPicker.XForms"
             xmlns:local="clr-namespace:SFXF35Test"
             x:Class="SFXF35Test.MainPage">
    <StackLayout>
        <Button x:Name="btnSelectMedia" Text="Select Media" Clicked="BtnSelectMedia_Clicked"/>
        <Label x:Name="lblSelectedMedia" Text="None Selected" HorizontalOptions="Center" FontSize="Medium" FontAttributes="Bold" TextColor="Blue"/>
        <sfPick:SfPicker x:Name="pickMedia" PickerMode="Dialog"  HorizontalOptions="CenterAndExpand" HeaderText="Pick Media"
                             OkButtonClicked="PickMedia_OkButtonClicked" CancelButtonClicked="PickMedia_CancelButtonClicked" ShowFooter="True" >
        </sfPick:SfPicker>
        <sflv:SfListView x:Name="lvMediaItems"
                       ItemTapped="LvMediaItems_ItemTapped"
                      
                            
                      >
            <sflv:SfListView.ItemSize>
                <OnIdiom Phone="40" Tablet="75"/>
            </sflv:SfListView.ItemSize>
        </sflv:SfListView>
    </StackLayout>
</ContentPage>

And the code behind:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace SFXF35Test
{
    public partial class MainPage : ContentPage
    {
        public MainPage()
        {
            InitializeComponent();
        }
        private void BtnSelectMedia_Clicked(object sender, EventArgs e)
        {
        }
        private void PickMedia_OkButtonClicked(object sender, Syncfusion.SfPicker.XForms.SelectionChangedEventArgs e)
        {
        }
        private void PickMedia_CancelButtonClicked(object sender, Syncfusion.SfPicker.XForms.SelectionChangedEventArgs e)
        {
        }
        private void LvMediaItems_ItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
        {
        }
    }
}


And the redacted App.xaml.cs file

using System;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
[assembly: XamlCompilation(XamlCompilationOptions.Compile)]
namespace SFXF35Test
{
    public partial class App : Application
    {
        public App()
        {
            InitializeComponent();
            Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("REDACTEDLICENSEKEY");  

            MainPage = new MainPage();
        }
        protected override void OnStart()
        {
            // Handle when your app starts
        }
        protected override void OnSleep()
        {
            // Handle when your app sleeps
        }
        protected override void OnResume()
        {
            // Handle when your app resumes
        }
    }
}

2 Replies

JO John February 20, 2019 03:03 PM UTC

And the repo which apparently didn't upload correctly...

Attachment: SFXF35Test_91dc999d.zip


GP Gnana Priya Namasivayam Syncfusion Team February 21, 2019 02:35 PM UTC

Hi John, 
 
Thanks for contacting Syncfusion support. 
 
We would like to let you know that `App crashes on android in release mode with Syncfusion 16.4.0.53 and Xamarin Forms 3.5 version` is the bug logged to xamarin team. We are currently following on reported bug with xamarin team regarding this crash. You can track the status of the issue by following below bug report link. Meanwhile, We will let you know once issue has been fixed. We will appreciate your patience until then. 
 
 
We would like to let you know that you can overcome by enabling LinkingOption as None in your android project as of now. 
 
Regards, 
Gnana Priya N 


Loader.
Live Chat Icon For mobile
Up arrow icon