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

UNHANDLED EXCEPTION occurs on back button press if sfRotator EnableAutoPlay =true

I upgraded to the latest version of SfRotator and also using XF  2.3.3193 version with FormsAppCompatActivity. Below is how I implemente my rotator

   SfRotator rotator = new SfRotator()
            {
                NavigationStripMode = NavigationStripMode.Dots,
                NavigationDelay = 2000,
                NavigationDirection = NavigationDirection.Horizontal,
                NavigationStripPosition = NavigationStripPosition.Bottom,
                EnableAutoPlay = true,
                EnableLooping = true,
                EnableSwiping = true,
                Margin = new Thickness(30, 10),
                VerticalOptions = LayoutOptions.Start,
                HorizontalOptions = LayoutOptions.Center,
                HeightRequest = Device.Idiom == TargetIdiom.Phone ? 300 : 500,
                WidthRequest = Device.Idiom == TargetIdiom.Phone ? 300 : 500

            };

If I click   soft/hard back button and navigate to page before, I am getting exception below. It looks like something to do with the SfRotator.get_SelectedIndex and Rotator.SfRotator+ISelectionChangedListenerImplementor.SelectionChanged , I tried to handle SelectionChanged event in my code behind but it didnt help. 

I tried this enabling and disabling linker as I use linker. I also use Proguard included in my application

02-26 02:42:00.090 I/MonoDroid(22004): UNHANDLED EXCEPTION:
02-26 02:42:00.106 I/MonoDroid(22004): System.ArgumentException: Handle must be valid.
02-26 02:42:00.106 I/MonoDroid(22004): Parameter name: instance
02-26 02:42:00.106 I/MonoDroid(22004):   at Java.Interop.JniEnvironment+InstanceMethods.CallIntMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method) [0x00017] in /Users/builder/data/lanes/4009/9578cdcd/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:11452 
02-26 02:42:00.106 I/MonoDroid(22004):   at Android.Runtime.JNIEnv.CallIntMethod (System.IntPtr jobject, System.IntPtr jmethod) [0x00000] in /Users/builder/data/lanes/4009/9578cdcd/source/monodroid/src/Mono.Android/JNIEnv.g.cs:186 
02-26 02:42:00.106 I/MonoDroid(22004):   at Com.Syncfusion.Rotator.SfRotator.get_SelectedIndex () [0x00043] in <18c74aaa7c904130be9a742a5f9f7879>:0 
02-26 02:42:00.106 I/MonoDroid(22004):   at Syncfusion.SfRotator.XForms.Droid.SfRotatorRenderer.SelectionChangedEvent (System.Object sender, Com.Syncfusion.Rotator.SfRotator+SelectionChangedEventArgs e) [0x00000] in <30178b71eba84f91bda8d2d9fe95b67e>:0 
02-26 02:42:00.106 I/MonoDroid(22004):   at Com.Syncfusion.Rotator.SfRotator+ISelectionChangedListenerImplementor.SelectionChanged (Java.Lang.Object p0, Java.Lang.Object p1) [0x00018] in <18c74aaa7c904130be9a742a5f9f7879>:0 
02-26 02:42:00.106 I/MonoDroid(22004):   at Com.Syncfusion.Rotator.SfRotator+ISelectionChangedListenerInvoker.n_SelectionChanged_Ljava_lang_Object_Ljava_lang_Object_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_p0, System.IntPtr native_p1) [0x00017] in <18c74aaa7c904130be9a742a5f9f7879>:0 
02-26 02:42:00.106 I/MonoDroid(22004):   at (wrapper dynamic-method) System.Object:d097901e-003d-481c-b3a8-ded719dcf805 (intptr,intptr,intptr,intptr)
02-26 02:42:00.153 W/Xamarin.Insights(22004): Warning: Unhandled exception: System.ArgumentException: Handle must be valid.
02-26 02:42:00.153 W/Xamarin.Insights(22004): Parameter name: instance
02-26 02:42:00.153 W/Xamarin.Insights(22004):   at Java.Interop.JniEnvironment+InstanceMethods.CallIntMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method) [0x00017] in /Users/builder/data/lanes/4009/9578cdcd/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:11452 
02-26 02:42:00.153 W/Xamarin.Insights(22004):   at Android.Runtime.JNIEnv.CallIntMethod (System.IntPtr jobject, System.IntPtr jmethod) [0x00000] in /Users/builder/data/lanes/4009/9578cdcd/source/monodroid/src/Mono.Android/JNIEnv.g.cs:186 
02-26 02:42:00.153 W/Xamarin.Insights(22004):   at Com.Syncfusion.Rotator.SfRotator.get_SelectedIndex () [0x00043] in <18c74aaa7c904130be9a742a5f9f7879>:0 
02-26 02:42:00.153 W/Xamarin.Insights(22004):   at Syncfusion.SfRotator.XForms.Droid.SfRotatorRenderer.SelectionChangedEvent (System.Object sender, Com.Syncfusion.Rotator.SfRotator+SelectionChangedEventArgs e) [0x00000] in <30178b71eba84f91bda8d2d9fe95b67e>:0 
02-26 02:42:00.153 W/Xamarin.Insights(22004):   at Com.Syncfusion.Rotator.SfRotator+ISelectionChangedListenerImplementor.SelectionChanged (Java.Lang.Object p0, Java.Lang.Object p1) [0x00018] in <18c74aaa7c904130be9a742a5f9f7879>:0 
02-26 02:42:00.153 W/Xamarin.Insights(22004):   at Com.Syncfusion.Rotator.SfRotator+ISelectionChangedListenerInvoker.n_SelectionChanged_Ljava_lang_Object_Ljava_lang_Object_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_p0, System.IntPtr native_p1) [0x00017] in <18c74aaa7c904130be9a742a5f9f7879>:0 
02-26 02:42:00.153 W/Xamarin.Insights(22004):   at (wrapper dynamic-method) System.Object:d097901e-003d-481c-b3a8-ded719dcf805 (intptr,intptr,intptr,intptr)
02-26 02:42:00.300 W/rkout.myworkout(22004): type=1400 audit(0.0:1105267): avc: denied { read } for name="mem" dev="debugfs" ino=41248514 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:debugfs:s0 tclass=file permissive=0 ppid=441 pcomm="main" tgid=441 tgcomm="main"
02-26 02:42:00.349 D/Mono    (22004): DllImport searching in: '__Internal' ('(null)').
02-26 02:42:00.300 W/rkout.myworkout(22004): type=1400 audit(0.0:1105268): avc: denied { read } for name="mem" dev="debugfs" ino=41248514 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:debugfs:s0 tclass=file permissive=0 ppid=441 pcomm="main" tgid=441 tgcomm="main"
02-26 02:42:00.349 D/Mono    (22004): Searching for 'java_interop_jnienv_get_long_field'.
02-26 02:42:00.349 D/Mono    (22004): Probing 'java_interop_jnienv_get_long_field'.
02-26 02:42:00.349 D/Mono    (22004): Found as 'java_interop_jnienv_get_long_field'.
02-26 02:42:00.425 D/Mono    (22004): DllImport searching in: '__Internal' ('(null)').
02-26 02:42:00.425 D/Mono    (22004): Searching for 'java_interop_jnienv_call_long_method_a'.
02-26 02:42:00.425 D/Mono    (22004): Probing 'java_interop_jnienv_call_long_method_a'.
02-26 02:42:00.426 D/Mono    (22004): Found as 'java_interop_jnienv_call_long_method_a'.
02-26 02:42:00.480 D/Mono    (22004): Assembly Ref addref HockeySDK.AndroidBindings[0xaa577ac0] -> System[0x976780c0]: 25
02-26 02:42:00.493 W/art     (22004): JNI RegisterNativeMethods: attempt to register 0 native methods for android.runtime.JavaProxyThrowable


4 Replies

EM Emil February 26, 2017 02:00 AM UTC

I forgot to mention it doesnt happen if I set     EnableAutoPlay = false,  EnableLooping = false,


RG Rajkumar Ganesamoorthy Syncfusion Team February 27, 2017 12:13 PM UTC

 Hi Emil,

Thank you for contacting Syncfusion Support.

We were able to reproduce the reported issue " UNHANDLED EXCEPTION occurs on back button press if sfRotator EnableAutoPlay =true". We have created a separate incident under your customer id to track the status of the issue.
Please log on to our support website to check the details regard this.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

Regards,
Rajkumar G 



SH Shashidhar May 19, 2017 06:30 AM UTC

Hi,

I am also facing the same problem how to fix it?

Thanks in advance


RK Rathana Kumar Sekar Syncfusion Team May 22, 2017 09:21 AM UTC

Hi Shashidhar,

Thanks for contacting Syncfusion Support.

We have checked the reported issue "
UNHANDLED EXCEPTION occurs on back button press if sfRotator EnableAutoPlay =true" with latest version and we were unable to reproduce the reported issue from our side and we have attached the sample which we have checked the reported issue from our side. Please download our latest version of Essential Studio from the below link.
 

So could you please check the reported issue with our  latest version and if the reported issue persist from your side, could you please provide modified sample which replicates the reported issue.

It will help us to provide appropriate solution on this.

Regards,

Rathanakumar S.


Loader.
Live Chat Icon For mobile
Up arrow icon