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

Tapping (or double tapping) on row cause crash only on iOS

I am not sure when things broke but this was previously working for me. Even though I have asked for DoubleTap recognition, any tap (single or double) causes the crash

Also, the same code works as expected on Android. I have set the SfListView as follows in regards to this problem.

     SelectionMode = SelectionMode.Single;
     SelectionGesture = TouchGesture.DoubleTap;
     SelectionChanged += OnSelectionChanged;  

I am running
  Syncfusion.Xamarin.SfListView 15.1.0.41
  Xamarin,Forms 2.3.4.231

 Apple Developer Tools
     Xcode 8.2.1 (11766.1)
     Build 8C1002

 Xamarin.iOS
     Version: 10.8.0.175 (Xamarin Studio Community)
     Hash: a04678c2
     Branch: d15-1
     Build date: 2017-03-28 14:05:38-0400

 Xamarin Studio Community
     Version 6.3 (build 863)
     Installation UUID: a4029b53-f67a-4d5f-aba1-58bd0ae9639b
     Runtime:
Mono 4.8.1 (mono-4.8.0-branch/22a39d7) (64-bit)
GTK+ 2.24.23 (Raleigh theme)

Package version: 408010000

and building on a MAC under MacOS 10.11.6

Any one else seeing a problem like this ?

Chris

Stack trace of crash from Xamarin Studio
--------------
System.NullReferenceException: Object reference not set to an instance of an object
  at Syncfusion.ListView.XForms.iOS.ItemRenderer.OnTapped (UIKit.UITapGestureRecognizer tapGestureRecognizer) [0x00028] in <77267c74e8094595963ce1124bb337eb>:0
  at Syncfusion.ListView.XForms.iOS.ItemRenderer.<OnElementChanged>b__19_0 () [0x00000] in <77267c74e8094595963ce1124bb337eb>:0
  at UIKit.UIGestureRecognizer+ParameterlessDispatch.Activated () [0x00000] in /Users/builder/data/lanes/4466/a04678c2/source/xamarin-macios/src/UIKit/UIGestureRecognizer.cs:71
  at at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/4466/a04678c2/source/xamarin-macios/src/UIKit/UIApplication.cs:79
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/4466/a04678c2/source/xamarin-macios/src/UIKit/UIApplication.cs:63
  at pfb.iOS.Application.Main (System.String[] args) [0x00000] in /Users/chris/Dropbox/Projects/PicoFermiBagel/pfb/iOS/Main.cs:17


3 Replies

DB Dinesh Babu Yadav Syncfusion Team May 8, 2017 10:05 AM UTC

Hi Chris,  
  
Sorry for the inconvenience caused. 
 
We have checked the reported issue ”Exception throws while tapping the ListViewItem in iOS platform” at our end with the provided information in SfListView version(v15.1.0.41), Xamarin Forms version(v2.3.4.231), MAC version(v10.11.6) and XCode version(v8.2.1) . Unfortunately, we are unable to reproduce the issue. We have prepared the sample based on your code snippets, but we are not face any issues when Tapped and Double Tapped the item. You can download the sample from the below link,  
   
   
Could you please check with the above sample? If the issue still reproduces at your end, please modify the above sample to reproduce the issue and update us with replication procedure or video link. So, that we could able to analyze the issue better and update you with appropriate solution. And also could you please share the below details?    
 
  • Have you initialized the SfListView renderer in iOS platform?. Please refer the below link to initialize the SfListView in each platform renderers.
  • Have you used any specific scenario in your application?
  • Could you please share that in which layout you have used the SfListView?
  • Whether the issue replicates only in any particular iOS device or in simulator version?.
  • If possible, could you please modify the sample which replicates the issue?
 
 
Please let us know if you require further assistance. 
 
Regards, 
Dinesh Babu Yadav 
 



CM Chris Malachowsky May 11, 2017 08:02 AM UTC

I have not been able to recreate the issue with the sample. Regardless here are the answers to your questions

  • Have you initialized the SfListView renderer in iOS platform?. Please refer the below link to initialize the SfListView in each platform renderers.
            yes I have
  • Have you used any specific scenario in your application? 
           not sure I know what this means. 
  • Could you please share that in which layout you have used the SfListView?
           I used a LinearLayout
  • Whether the issue replicates only in any particular iOS device or in simulator version?.
           issue is the same in the simulator (I have been using iPad Air 2 iOS 10.2) and on iPad and iPad mini's that are fully updated
  • If possible, could you please modify the sample which replicates the issue?
           I have tried but can not get the sample to fail



  • DB Dinesh Babu Yadav Syncfusion Team May 15, 2017 12:26 PM UTC

    Hi Chris,  
        
    Sorry for the inconvenience caused.    
       
    Based on the provided information, we have analyzed all the possible scenarios to replicate the reported issue “Null exception throws on SfListView’s Item Tapped in iOS” at our end and resolved the issue with all existing scenarios in which the exception arises. As this is forum, we cannot provide patch so, a support incident has been created under your account for providing custom assemblies which includes the fix for the reported issue. Please log on to our support website to check for further updates.         
       
       
    Regards,   
    Dinesh Babu Yadav 


    Loader.
    Up arrow icon