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

SfDataGrid.XForms.Droid.VirtualizingCellControlRenderer.OnTouchEvent Exception

Hi,

i am seeing often this exception in my release logs. what could be the reason? It is difficult to reproduce. it could be for specific phones

Android: 5.1 Android Build: LMY47D Manufacturer: LENOVO Model: Lenovo P1ma40  
Xamarin Exception Stack: System.NullReferenceException: Object reference not set to an instance of an object at Syncfusion.SfDataGrid.XForms.Droid.VirtualizingCellControlRenderer.OnTouchEvent (Android.Views.MotionEvent e) <0xd8dce08c + 0x003fc> in <ed8cb811ab264610b7152ebe0ab9dcde>:0 at Android.Views.View.n_OnTouchEvent_Landroid_view_MotionEvent_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_e) <0xdb1b8958 + 0x0006f> in <d4a4ef5377774a22b79f7c82f2d83849>:0 at (wrapper dynamic-method) System.Object.56(intptr,intptr,intptr) Thread 1: 0 dalvik.system.VMStack.getThreadStackTrace(VMStack.java:-2) 1 java.lang.Thread.getStackTrace(Thread.java:580) 2 java.lang.Thread.getAllStackTraces(Thread.java:522) 3 com.microsoft.appcenter.crashes.Crashes.saveUncaughtException(Crashes.java:943) 4 com.microsoft.appcenter.crashes.WrapperSdkExceptionManager.saveWrapperException(WrapperSdkExceptionManager.java:50) 5 md55905bdc51c98ae8c07a47cb6530c7ba7.VirtualizingCellControlRenderer.n_onTouchEvent(VirtualizingCellControlRenderer.java:-2) 6 md55905bdc51c98ae8c07a47cb6530c7ba7.VirtualizingCellControlRenderer.onTouchEvent(VirtualizingCellControlRenderer.java:54) 7 android.view.View.dispatchTouchEvent(View.java:8593) 8 android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2482) 9 android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2157) 10 md51558244f76c53b6aeda52c8a337f2c37.VisualElementRenderer_1.n_dispatchTouchEvent(VisualElementRenderer_1.java:-2) 11 md51558244f76c53b6aeda52c8a337f2c37.VisualElementRenderer_1.dispatchTouchEvent(VisualElementRenderer_1.java:65) 12 android.view.ViewGroup.cancelTouchTarget(ViewGroup.java:2395) 13 android.view.ViewGroup.removeViewInternal(ViewGroup.java:4347) 14 android.view.ViewGroup.removeViewInternal(ViewGroup.java:4327) 15 android.view.ViewGroup.removeView(ViewGroup.java:4258) 16 mono.java.lang.RunnableImplementor.n_run(RunnableImplementor.java:-2) 17 mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:30) 18 android.os.Handler.handleCallback(Handler.java:815) 19 android.os.Handler.dispatchMessage(Handler.java:104) 20 android.os.Looper.loop(Looper.java:194) 21 android.app.ActivityThread.main(ActivityThread.java:5651) 22 java.lang.reflect.Method.invoke(Method.java:-2) 23 java.lang.reflect.Method.invoke(Method.java:372) 24 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959) 25 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)

7 Replies

SP Subburaj Pandian Veluchamy Syncfusion Team February 1, 2019 12:14 PM UTC

Hi Emil, 
 
Thank you for contacting Syncfusion support. 
 
Based on the provided information, we have checked the reported issue “Throws null exception in the output log with SfDataGrid touch event” and it is working fine as expected. We have prepared sample for the same, please find the sample by the following link. 
 
Sample link: GridSample 
 
Note: Since the mentioned exact device not available with us, we have checked with (Lenovo A536 and Samsung S7) 
 
Can you please check the sample with your device (Lenovo P1ma40) and let us the issue still persist in the provided sample as well? If not kindly modify the sample based on your scenario and revert to us with the details. It will be helpful for us to check on it and provide you the solution. 
 
Regards,  
Subburaj Pandian V  



EM Emil June 1, 2019 11:07 PM UTC

Hi,

I am not able to reproduce this error as i cant know the steps to reproduce it. it only happens in production for some devices. I have just got this error also Samsung Galaxy S7 with Android: 8.0.0
I dont know which action is below OnTouchEvent. You can give me a hint about it maybe? Obviously there is something null in this event and since i dont have source code,
i cannot guess what it could be. if I had to source code, i could at least guess what might cause the null exception.

Syncfusion.SfDataGrid.XForms.Droid.VirtualizingCellControlRenderer.OnTouchEvent


SP Subburaj Pandian Veluchamy Syncfusion Team June 3, 2019 01:31 PM UTC

Hi Emil, 
  
Thank you for your update. 
  
We prepared a sample based on the details you shared "NullReferenceException is raised in Syncfusion. SfDataGrid. XForms. Droid. VirtualizingCellControlRenderer. OnTouchEvent" and checked the possibilities of null objects in that method. We handle swiping actions in this method, we tried to replicate the null reference exception with the same device, but the issue is not reproduced on our side. We attached the tested sample for your reference in the following link, 
   
  
Use case tested: 
·       Tested with both left swipe and right swipe. 
·       Tested scrolling after swiping completed. 
·       Tested swiping cancels use cases. 
 
Please check the sample and let us know if you still face the same problem. If so, please get back to us with the Syncfusion product version, Xamarin forms version, and share the details of your application's DataGrid settings, it will be helpful for us to provide the solution earlier. 
 
Regards,
Subburaj Pandian V
 



TV Thanh Vu August 5, 2019 07:33 AM UTC

I'm facing same problem, and still don't know how to reproduce the exception in production.


BS Balasubramani Sundaram Syncfusion Team August 6, 2019 02:25 PM UTC

Hi Thanh Vu, 
   
Thank you for your update. 
 
We have tried to replicate the issue same, but its working fine in our side, also we have placed the null check in possible case of touch related action in “VirtualizingCellControlRenderer” class and provided a patch. If the patch works fine in your application, we will include the code change in our upcoming release. 
 
Please find the patch for the issue from following link. 
 
Recommended approach - exe will perform automatic configuration    
Please find the patch setup from following location: 
 
Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment 
Please find the patch assemblies alone from following location 
 
Please find the NuGet alone from the following location:  
 
Clear NuGet cache by using the following link:   
 
The dependency assembly of SfDatagrid “Syncfusion.Xamarin.Data” didn’t include in the patch, so please find the Syncfusion.Xamarin.Data assembly from the following link. 
 
After included the assemblies in your application still the issue persist, please share the video to us its will help us to assist to more. 
 
We hope this helps. Please let us know, if need any further assistance. 
  
Regards,
Balasubramani Sundaram.
 



EM Emil December 27, 2020 10:07 PM UTC

I believe this crash is happening when you try to reorder rows by drag and drop. Its difficult to reproduce on debug but still happening on production. I am seeing it in my appcenter logs


KK Karthikraja Kalaimani Syncfusion Team December 29, 2020 05:06 AM UTC

Hi Emil,

Could you please confirm the same crash is reproduce with the provided the patch and let us know the details?

Regards,
Karthik Raja


Loader.
Live Chat Icon For mobile
Up arrow icon