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

App crash while backpressed before page load finishes

Hi,
I came across a situation while using SFlistview.On pressing backbutton while a page with sflistview loads(an api call happening), the app crashes. It shows some sort of null reference exception. The stacktrace is given.

  This issue is absent while using a normal listview.








08-16 14:32:02.132 I/MonoDroid( 4161): UNHANDLED EXCEPTION:
08-16 14:32:02.143 I/MonoDroid( 4161): System.NullReferenceException: Object reference not set to an instance of an object.
08-16 14:32:02.143 I/MonoDroid( 4161):   at Syncfusion.ListView.XForms.Android.MeasureSize.Convert (Xamarin.Forms.View view, Xamarin.Forms.VisualElement valid) [0x0002d] in <db97687ea11d48428e621981a1455cc9>:0 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Syncfusion.ListView.XForms.Android.MeasureSize.CalculateSize (Syncfusion.ListView.XForms.SfListView listview, Xamarin.Forms.View content, Xamarin.Forms.Size viewSize) [0x0000a] in <db97687ea11d48428e621981a1455cc9>:0 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Syncfusion.ListView.XForms.LayoutBase.GetAutoFitItemSize (Syncfusion.ListView.XForms.ListViewItemInfoBase itemInfo, System.Double& itemSize, System.Double itemSpacing, System.Int32 spanCount) [0x000a1] in <3d88d4c273d540778a5d17522ab6cd46>:0 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Syncfusion.ListView.XForms.LinearLayout.GetAutoFitItemSize (Syncfusion.ListView.XForms.ListViewItemInfoBase itemInfo, System.Double& itemSize, System.Double itemSpacing) [0x00000] in <3d88d4c273d540778a5d17522ab6cd46>:0 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Syncfusion.ListView.XForms.LinearLayout.SetRowHeight (Syncfusion.ListView.XForms.ListViewItemInfo itemInfo, System.Int32 index, System.Double& size, System.Double itemSpacing) [0x00011] in <3d88d4c273d540778a5d17522ab6cd46>:0 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Syncfusion.ListView.XForms.LinearLayout.SetRowHeight (Syncfusion.ListView.XForms.ListViewItemInfo itemInfo, System.Double itemSpacing) [0x0008e] in <3d88d4c273d540778a5d17522ab6cd46>:0 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Syncfusion.ListView.XForms.LinearLayout.EnsureItems (Syncfusion.GridCommon.ScrollAxis.VisibleLinesCollection visibleLines) [0x002ab] in <3d88d4c273d540778a5d17522ab6cd46>:0 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Syncfusion.ListView.XForms.VisualContainer.EnsureItems () [0x0002b] in <3d88d4c273d540778a5d17522ab6cd46>:0 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Syncfusion.ListView.XForms.VisualContainer.OnSizeAllocated (System.Double width, System.Double height) [0x0003f] in <3d88d4c273d540778a5d17522ab6cd46>:0 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Core\VisualElement.cs:629 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Xamarin.Forms.Layout.ForceLayout () [0x00000] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Core\Layout.cs:104 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Syncfusion.ListView.XForms.SfListView.RefreshView () [0x00036] in <3d88d4c273d540778a5d17522ab6cd46>:0 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Syncfusion.ListView.XForms.SfListView.OnItemsSourceChanged (Xamarin.Forms.BindableObject bindable, System.Object oldValue, System.Object newValue) [0x00052] in <3d88d4c273d540778a5d17522ab6cd46>:0 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.BindableObject+SetValueFlags attributes, System.Boolean silent) [0x00108] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:584 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.BindableObject+SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x0014b] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:378 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Xamarin.Forms.BindingExpression.ApplyCore (System.Object sourceObject, Xamarin.Forms.BindableObject target, Xamarin.Forms.BindableProperty property, System.Boolean fromTarget) [0x001f9] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindingExpression.cs:173 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Xamarin.Forms.BindingExpression.Apply (System.Boolean fromTarget) [0x0003e] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindingExpression.cs:55 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Xamarin.Forms.BindingExpression+BindingExpressionPart.<PropertyChanged>b__47_0 () [0x00000] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindingExpression.cs:542 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0 
08-16 14:32:02.143 I/MonoDroid( 4161):   at (wrapper dynamic-method) System.Object:1bd37b26-35f0-4ef1-8c59-fa3db8eb56af (intptr,intptr)
08-16 14:32:02.153 W/art     ( 4161): JNI RegisterNativeMethods: attempt to register 0 native methods for android.runtime.JavaProxyThrowable
08-16 14:32:02.154 D/Mono    ( 4161): DllImport searching in: '__Internal' ('(null)').
08-16 14:32:02.154 D/Mono    ( 4161): Searching for 'java_interop_jnienv_throw'.
08-16 14:32:02.154 D/Mono    ( 4161): Probing 'java_interop_jnienv_throw'.
08-16 14:32:02.154 D/Mono    ( 4161): Found as 'java_interop_jnienv_throw'.
InspectorDebugSession(5): HandleTargetEvent: UnhandledException
An unhandled exception occured.

InspectorDebugSession(5): HandleTargetEvent: TargetHitBreakpoint
08-16 14:32:05.243 I/art     ( 4161): Thread[2,tid=4166,WaitingInMainSignalCatcherLoop,Thread*=0xaee42000,peer=0x22c070a0,"Signal Catcher"]: reacting to signal 3
08-16 14:32:05.411 I/art     ( 4161): Wrote stack traces to '/data/anr/traces.txt'
InspectorDebugSession(5): Disposed
08-16 14:32:09.583 E/mono-rt ( 4161): [ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object.referenceTable GDEF length=814 1

18 Replies

DB Dinesh Babu Yadav Syncfusion Team August 18, 2017 01:23 AM UTC

Hi Samir, 
 
Sorry for the inconvenience.      
     
Based on the provided information, we have analyzed all possible scenarios to replicate the reported issue “Exception throws when AutoFitMode is Height in SfListView while navigating in MasterDetailPage” at our end. But, we are unable to reproduce the issue at our end. We have created a support incident under your account to provide a workaround with custom assemblies and hold the meeting if the issue still presist. Please log on to our support website to check for further updates.           
     
     
Regards,     
Dinesh Babu Yadav   
  



JB Jeff Bowman replied to Samir Asaf August 26, 2017 10:33 PM UTC

Hi,
I came across a situation while using SFlistview.On pressing backbutton while a page with sflistview loads(an api call happening), the app crashes. It shows some sort of null reference exception. The stacktrace is given.

  This issue is absent while using a normal listview.








08-16 14:32:02.132 I/MonoDroid( 4161): UNHANDLED EXCEPTION:
08-16 14:32:02.143 I/MonoDroid( 4161): System.NullReferenceException: Object reference not set to an instance of an object.
08-16 14:32:02.143 I/MonoDroid( 4161):   at Syncfusion.ListView.XForms.Android.MeasureSize.Convert (Xamarin.Forms.View view, Xamarin.Forms.VisualElement valid) [0x0002d] in <db97687ea11d48428e621981a1455cc9>:0 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Syncfusion.ListView.XForms.Android.MeasureSize.CalculateSize (Syncfusion.ListView.XForms.SfListView listview, Xamarin.Forms.View content, Xamarin.Forms.Size viewSize) [0x0000a] in <db97687ea11d48428e621981a1455cc9>:0 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Syncfusion.ListView.XForms.LayoutBase.GetAutoFitItemSize (Syncfusion.ListView.XForms.ListViewItemInfoBase itemInfo, System.Double& itemSize, System.Double itemSpacing, System.Int32 spanCount) [0x000a1] in <3d88d4c273d540778a5d17522ab6cd46>:0 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Syncfusion.ListView.XForms.LinearLayout.GetAutoFitItemSize (Syncfusion.ListView.XForms.ListViewItemInfoBase itemInfo, System.Double& itemSize, System.Double itemSpacing) [0x00000] in <3d88d4c273d540778a5d17522ab6cd46>:0 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Syncfusion.ListView.XForms.LinearLayout.SetRowHeight (Syncfusion.ListView.XForms.ListViewItemInfo itemInfo, System.Int32 index, System.Double& size, System.Double itemSpacing) [0x00011] in <3d88d4c273d540778a5d17522ab6cd46>:0 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Syncfusion.ListView.XForms.LinearLayout.SetRowHeight (Syncfusion.ListView.XForms.ListViewItemInfo itemInfo, System.Double itemSpacing) [0x0008e] in <3d88d4c273d540778a5d17522ab6cd46>:0 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Syncfusion.ListView.XForms.LinearLayout.EnsureItems (Syncfusion.GridCommon.ScrollAxis.VisibleLinesCollection visibleLines) [0x002ab] in <3d88d4c273d540778a5d17522ab6cd46>:0 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Syncfusion.ListView.XForms.VisualContainer.EnsureItems () [0x0002b] in <3d88d4c273d540778a5d17522ab6cd46>:0 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Syncfusion.ListView.XForms.VisualContainer.OnSizeAllocated (System.Double width, System.Double height) [0x0003f] in <3d88d4c273d540778a5d17522ab6cd46>:0 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Core\VisualElement.cs:629 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Xamarin.Forms.Layout.ForceLayout () [0x00000] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Core\Layout.cs:104 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Syncfusion.ListView.XForms.SfListView.RefreshView () [0x00036] in <3d88d4c273d540778a5d17522ab6cd46>:0 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Syncfusion.ListView.XForms.SfListView.OnItemsSourceChanged (Xamarin.Forms.BindableObject bindable, System.Object oldValue, System.Object newValue) [0x00052] in <3d88d4c273d540778a5d17522ab6cd46>:0 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.BindableObject+SetValueFlags attributes, System.Boolean silent) [0x00108] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:584 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.BindableObject+SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x0014b] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:378 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Xamarin.Forms.BindingExpression.ApplyCore (System.Object sourceObject, Xamarin.Forms.BindableObject target, Xamarin.Forms.BindableProperty property, System.Boolean fromTarget) [0x001f9] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindingExpression.cs:173 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Xamarin.Forms.BindingExpression.Apply (System.Boolean fromTarget) [0x0003e] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindingExpression.cs:55 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Xamarin.Forms.BindingExpression+BindingExpressionPart.<PropertyChanged>b__47_0 () [0x00000] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindingExpression.cs:542 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0 
08-16 14:32:02.143 I/MonoDroid( 4161):   at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0 
08-16 14:32:02.143 I/MonoDroid( 4161):   at (wrapper dynamic-method) System.Object:1bd37b26-35f0-4ef1-8c59-fa3db8eb56af (intptr,intptr)
08-16 14:32:02.153 W/art     ( 4161): JNI RegisterNativeMethods: attempt to register 0 native methods for android.runtime.JavaProxyThrowable
08-16 14:32:02.154 D/Mono    ( 4161): DllImport searching in: '__Internal' ('(null)').
08-16 14:32:02.154 D/Mono    ( 4161): Searching for 'java_interop_jnienv_throw'.
08-16 14:32:02.154 D/Mono    ( 4161): Probing 'java_interop_jnienv_throw'.
08-16 14:32:02.154 D/Mono    ( 4161): Found as 'java_interop_jnienv_throw'.
InspectorDebugSession(5): HandleTargetEvent: UnhandledException
An unhandled exception occured.

InspectorDebugSession(5): HandleTargetEvent: TargetHitBreakpoint
08-16 14:32:05.243 I/art     ( 4161): Thread[2,tid=4166,WaitingInMainSignalCatcherLoop,Thread*=0xaee42000,peer=0x22c070a0,"Signal Catcher"]: reacting to signal 3
08-16 14:32:05.411 I/art     ( 4161): Wrote stack traces to '/data/anr/traces.txt'
InspectorDebugSession(5): Disposed
08-16 14:32:09.583 E/mono-rt ( 4161): [ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object.referenceTable GDEF length=814 1

Hi Samir,

Were you able to get around this issue? We are seeing the same exact issues, if we have a command that updates the listview, and we navigate way before it finishes loading, we get this crash.

In order to get around this, I had to do some pretty convoluted stuff, where I am creating a CancellationTokenSource for each command that executes and adding to a list. When the command finishes, I remove it from the list and dispose it but if the command doesn't finish before the page disappears I go through the current list and cancel all current commands. This seemed to workaround the issue for us.

-Jeff



DB Dinesh Babu Yadav Syncfusion Team August 28, 2017 11:09 AM UTC

Hi Jeff, 
 
Thanks for the update. 
 
We have provided the response to the support incident which was already created regarding the same query under your account to provide a workaround with custom assemblies which was provided to Samir too and hold the meeting if the issue still persist. Please log on to our support website to check for further updates.             
 
 
Please let us know if you require further assistance. 
 
Regards, 
Dinesh Babu Yadav 
 



EM Emil October 16, 2017 10:32 PM UTC

This is exactly the same issue I reported other day https://www.syncfusion.com/forums/133192/autofitmode-quotheightquot-crash-on-back-button-pressed-when-sflistview-is-dispossed 

We cant find a workaround with this, Solution must be provided by syncfusion. It is an obvious bug. Only thing you can do prevent your app to be crashing, Just put a try catch around your InitializeComponent of your view. Please provide a fix with this issue. It is very obvious crash and you should be able to reproduce it easily.

  try

            {

                InitializeComponent();             

            }

            catch (Exception ex)

            {



MK Muthu Kumaran Gnanavinayagam Syncfusion Team October 17, 2017 04:13 PM UTC

Hi Emil, 
 
We have provided the custom assemblies for the reported issue in the support incident created under your account. Can you please log on to our support website to check for further updates.       
    
 
Regards, 
G.Muthu Kumaran. 



GN Guido Neele replied to Muthu Kumaran Gnanavinayagam October 24, 2017 03:17 PM UTC

Hi Emil, 
 
We have provided the custom assemblies for the reported issue in the support incident created under your account. Can you please log on to our support website to check for further updates.       
    
 
Regards, 
G.Muthu Kumaran. 


Is it possible for me to try these new assemblies? I'm experiencing the exact same problem.



EM Emil October 24, 2017 03:20 PM UTC

Hi,

Assemblies doesnt work. I already reported back but It is requested that I provide a reproduction sample but I dont have time for it. If you have a reproduction sample, please provide. Currently, I handled this issue myself with a workaround with some boolean control.

thanks,

Emil



GN Guido Neele October 24, 2017 03:47 PM UTC

It only occurs on iOS after changing orientation from portrait to landscape. Will see if I can reproduce it with a sample application. Tomorrow I won't be in so will probably do it come Thursday.



EM Emil October 24, 2017 03:55 PM UTC

No, it happens also for Android. Repro is very simple indeed as others also wrote above. when you navigate to page, SfListview is already immediately there as empty but you may have expensive getData function takes 10secs lets assume, so after 10 secs your obversableCollection is raised as itemsource. If User presses backbutton before 10secs, lets say 9secs, sfListview is disposed and ObservableCollection is raised right after that for a null SfListview which causes null exception. StackTrace is very clear about it. 

In IOS or general Orientation change causes SfListView to be disposed I believe and if you are raising PropertyChanged on your sourceItem collection, you get same error. You can prevent it by checking with some condition and not raise propertychanged. Of course this is just a workaround. Syncfusion team should do a null check in their assembly. 



GN Guido Neele October 24, 2017 03:55 PM UTC

Yep that sounds right.



MK Muthu Kumaran Gnanavinayagam Syncfusion Team October 25, 2017 02:38 PM UTC

Hi Guido, 
 
As Emil stated, we have loaded huge collection of data(say 10000 items) while navigating to the page containing SfListView. We have tried to navigate back to the page before items are loaded into the View. But the reported issue does not occur at our end. For your reference we have attached the sample link below. 
 
 
Can you please check whether you have initialized the SfListViewRenderers in AppDelegate.cs file as mentioned in the below documentation. 
 
 
We have tried all the possibilities of replicating the issue from our side. But we couldn’t able to reproduce the issue. So can you please replicate the issue in a simple sample and revert us back which helps to resolve the issue at our end. 
 
Regards, 
G.Muthu Kumaran. 



GN Guido Neele October 26, 2017 11:02 AM UTC

Got a sample for you guys. Open attached solution and run the iOS project. Scroll down and up. When scrolling up the app will crash.


Attachment: Grouping_b30c79f5.zip


MK Muthu Kumaran Gnanavinayagam Syncfusion Team October 30, 2017 08:58 AM UTC

Hi Guido, 
 
A support incident has been created under your account to track the status of the reported query. Please log on to our support website to check for further updates.      
   
 
Regards, 
G.Muthu Kumaran. 



CH Chris November 29, 2017 02:24 AM UTC

Hello, I'm having a similar problem.

11-29 09:06:39.475 I/MonoDroid(27665): System.NullReferenceException: Object reference not set to an instance of an object.
11-29 09:06:39.475 I/MonoDroid(27665):   at Syncfusion.ListView.XForms.LayoutBase.GetAutoFitItemSize (Syncfusion.ListView.XForms.ListViewItemInfoBase itemInfo, System.Double& itemSize, System.Double itemSpacing, System.Int32 spanCount) [0x000a1] in <7b64eff13b884e1fba2d546debf8599c>:0 

However, my issue happens when trying to load the page - before the screen ever appear to the user.

Very frustrating. Can you guys not just add a null check in Syncfusion.ListView.XForms.LayoutBase.GetAutoFitItemSize?


***Edit***
Nevermind, the newest version (15.4) seems to have fixed the problem - thanks!



MK Muthu Kumaran Gnanavinayagam Syncfusion Team November 29, 2017 04:22 AM UTC

Hi Chris, 
 
Thanks for the update. 
 
Regards, 
G.Muthu Kumaran. 



MP massimo pasquali January 2, 2024 02:51 PM UTC

Hello,

I have used SfListview in xamarin projet ad I have te same error on UWP, but only if I lunch my app in release version. In IOS I haven' t any problem

This is may XAML


  <syncfusion:SfListView

                        x:Name="tipoRiga"

                        ItemsSource="{Binding Results}"

                        SelectedItem="{Binding SelectedItem, Mode=TwoWay}"

                        ItemTemplate="{StaticResource TipoRigaTemplateSelector}"

                        Grid.Row="1"

                        AutoFitMode="DynamicHeight"

                        VerticalOptions="FillAndExpand"

                        SelectionMode="Single"

                        Loaded="tipoRiga_Loaded"

                        PropertyChanged="tipoRiga_PropertyChanged"

                        LoadMoreOption="AutoOnScroll"

                        LayoutManager="{Binding IlMioLayout}"

                        LoadMoreCommand="{Binding LoadMoreCommand}"

                        BackgroundColor="White">

                    </syncfusion:SfListView>

Can you sugget me a solution?




SY Suthi Yuvaraj Syncfusion Team January 3, 2024 03:06 PM UTC

Hi Massimo Pasquali,

We have analyzed the reported query, we are able to replicate the issue at our end. We are in need of two more business days to validate the issue properly. We will update you with further details on or before January 8, 2024. We will appreciate your patience until then.

Regards,

Suthi Yuvaraj



AK Ananthalakshmi Kannan Syncfusion Team January 5, 2024 01:54 PM UTC

Hi Massimo Pasquali,


The reported issue is a known issue in the UWP platform. The problem can be resolved by initializing the SfListView assemblies in App.xaml.cs in the UWP project. Please make the following changes in your App.xaml.cs file:


protected override void OnLaunched(LaunchActivatedEventArgs e)

{

    …

 

    rootFrame.NavigationFailed += OnNavigationFailed;

       

    // you'll need to add `using System.Reflection;`

    List<Assembly> assembliesToInclude = new List<Assembly>();

 

    //Now, add all the assemblies your app uses

    assembliesToInclude.Add(typeof(SfListViewRenderer).GetTypeInfo().Assembly);

 

    // replaces Xamarin.Forms.Forms.Init(e);       

    Xamarin.Forms.Forms.Init(e, assembliesToInclude);

       

    …    

}


For further details, please refer to the following guideline: https://help.syncfusion.com/xamarin/listview/getting-started#releasemode-issue-in-uwp-platform


Loader.
Live Chat Icon For mobile
Up arrow icon