Sometimes, when I scroll left and right using SfDataGrid, I get a Null Object Reference error. It seems to appear at random, and I can't find a way to replicate it.
Here's the stack trace :
Java.Lang.RuntimeException: Attempt to invoke virtual method 'android.content.ContentResolver android.content.Context.getContentResolver()' on a null object reference at Java.Interop.JniEnvironment+InstanceMethods.CallBooleanMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00069] in <18d946a6778041c5bed1afeac1431a8f>:0 at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualBooleanMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0002a] in <18d946a6778041c5bed1afeac1431a8f>:0 at Android.Views.GestureDetector.OnTouchEvent (Android.Views.MotionEvent ev) [0x00031] in <86797e47c1604f7d8bd6ece722fe1cce>:0 at Syncfusion.SfDataGrid.XForms.Droid.GridCellBaseRenderer.OnTouchEvent (Android.Views.MotionEvent e) [0x00011] in <155db380372d4d8488029eb38a874e38>:0 at Syncfusion.SfDataGrid.XForms.Droid.GridCellRenderer.OnTouchEvent (Android.Views.MotionEvent e) [0x00000] in <155db380372d4d8488029eb38a874e38>:0 at Android.Views.View.n_OnTouchEvent_Landroid_view_MotionEvent_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_e) [0x00011] in <86797e47c1604f7d8bd6ece722fe1cce>:0 at (wrapper dynamic-method) System.Object.34(intptr,intptr,intptr) --- End of managed Java.Lang.RuntimeException stack trace ---
SPSubburaj Pandian Veluchamy Syncfusion Team March 27, 2019 05:37 AM
Thank you for contacting Syncfusion support.
Based on the provided information, we have checked the mentioned issue “Throws null exception when horizontally scrolling the DataGrid” Xamarin.Forms (Android) and we unable to replicate the issue from end, it is working fine as expected. We have prepared sample for the same,
We have tested with Syncfusion update version 184.108.40.206 and Xamarin.Forms version 220.127.116.117 in the Samsung S7 device.
Please check the sample and let us know if you still facing the same issue? If not, please modify the sample based on your scenario and revert us back with the following details,
·Device configuration details
·Issue reproducing video (if possible)
·Syncfusion and Xamarin.Forms update version
It will be helpful for us to check on it and provide you the solution at the earliest.
Regards, Subburaj Pandian V
MRMaxence RobergeMarch 27, 2019 07:37 AM
Yes, it seems to be fine for most users of our app, and only happens for a few. As for me, I cannot reproduce it on my device.
Thank you for your time, I will try to come back to you with the information you requested as soon as possible.
EMEmilMarch 27, 2019 06:14 PM
in which syncfusion and xamarin version do you see this error?
SPSubburaj Pandian Veluchamy Syncfusion Team March 28, 2019 03:45 AM
Thank you for the update.
As we mentioned, please share the requested details (Sample, device details, Syncfusion and XF version) to replicate the issue at our end. We will wait until further response hear from you.
Regards, Subburaj Pandian V
MRMaxence RobergeMarch 28, 2019 08:40 AM
Here's the sample modified. I've added another page because I think it could have something to do with the navigation. The crash could happen the first time someone scrolls the list after navigating to a page.
Also, our user is using a Honeywell CN75 running on Android 6.0, and here's our packages versions :
PKPradeep Kumar Balakrishnan Syncfusion Team March 30, 2019 01:43 AM
Thank you for your update.
We have checked the reported issue in shared sample in Samsung s8 and Samsung s6. But the crash is not replicated on our end. Is it possible for you to update the Syncfusion latest product version 18.104.22.168. and Xamarin forms version 22.214.171.1243944. if the issue occurs after updating to mentioned product version. Please revert us we will set up mentioned device environment and test the issue.