Closed Flyinmorning closed 7 years ago
Which version of forms are you using? The latest release of Forms that wotks is 2.3.9.107 with Xamarin.Android 6.1.2
Its not the Carousel control itself. Latest Forms released are really bad. I am shppinh an update today. Please tell me you enviroment configuration.
Thanks for your quick response. @alexrainman
This is my packages.config: `<?xml version="1.0" encoding="utf-8"?>
The latest Forms version i confirm that works without any issue is 2.3.0.107
In any other version over that, if you put a listview in one of the views, it will crash because a bug in Forms core.
Latest two version of Forms are buggy.
Expect a new package by tomorrow.
@Flyinmorning do you still having this crash with latest release?
With Xamarin.Forms 2.3.2.127, CarouselView.FormsPlugin=2.3.0, remain have the same issue. It's random crash, have to try swiping many times.
System.ObjectDisposedException: Cannot access a disposed object. Object name: 'Android.Views.GestureDetector'. at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00030] in /Users/builder/data/lanes/3819/96c7ba6c/source/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.cs:153 at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualBooleanMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00002] in /Users/builder/data/lanes/3819/96c7ba6c/source/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethods_Invoke.cs:57 at Android.Views.GestureDetector.OnTouchEvent (Android.Views.MotionEvent ev) [0x0002c] in /Users/builder/data/lanes/3819/96c7ba6c/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Views.GestureDetector.cs:1546 at Xamarin.Forms.Platform.Android.VisualElementRenderer
1[TElement].Android.Views.View.IOnTouchListener.OnTouch (Android.Views.View v, Android.Views.MotionEvent e) [0x0003f] in C:\BuildAgent2\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:101
at Android.Views.View+IOnTouchListenerInvoker.n_OnTouch_Landroid_view_View_Landroid_viewMotionEvent (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_v, System.IntPtr native_e) [0x00019] in /Users/builder/data/lanes/3819/96c7ba6c/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Views.View.cs:3558
at at (wrapper dynamic-method) System.Object:7bbea1d4-489c-494d-a37c-c0ecb5738d95 (intptr,intptr,intptr,intptr)
`
Even with the nearly same code in the Demo from this github, it also can crash. May I send you the source code of the demo, it's copied from this github repo with few modification. May I know your email address? Thank you in advance.
10-12 14:15:29.500 I/MonoDroid( 5395): UNHANDLED EXCEPTION:
10-12 14:15:29.530 D/InputReader( 933): Input event: value=0
10-12 14:15:29.530 I/InputReader( 933): Touch event's action is 0x1 (deviceType=0) [pCnt=1, s=] when=609887177331000
10-12 14:15:29.530 I/InputDispatcher( 933): Delivering touch to (5395): action: 0x1, toolType: 1
10-12 14:15:29.550 I/MonoDroid( 5395): System.ObjectDisposedException: Cannot access a disposed object.
10-12 14:15:29.550 I/MonoDroid( 5395): Object name: 'Android.Views.GestureDetector'.
10-12 14:15:29.550 I/MonoDroid( 5395): at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00030] in 1[TElement].Android.Views.View.IOnTouchListener.OnTouch (Android.Views.View v, Android.Views.MotionEvent e) [0x0004a] in <95895bcb439e42ebb8e7134a545f1acc>:0 10-12 14:15:29.550 I/MonoDroid( 5395): at Android.Views.View+IOnTouchListenerInvoker.n_OnTouch_Landroid_view_View_Landroid_view_MotionEvent_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_v, System.IntPtr native_e) [0x00019] in <148efd2f7a03496fb40611cf5f4f0bb1>:0 10-12 14:15:29.550 I/MonoDroid( 5395): at (wrapper dynamic-method) System.Object:a96996d0-2c84-4c0f-a89a-6a9f202874f3 (intptr,intptr,intptr,intptr) 10-12 14:15:29.560 W/art ( 5395): JNI RegisterNativeMethods: attempt to register 0 native methods for android.runtime.JavaProxyThrowable 10-12 14:15:29.560 D/Mono ( 5395): DllImport searching in: '__Internal' ('(null)'). 10-12 14:15:29.570 D/Mono ( 5395): Searching for 'java_interop_jnienv_throw'. 10-12 14:15:29.570 D/Mono ( 5395): Probing 'java_interop_jnienv_throw'. 10-12 14:15:29.570 D/Mono ( 5395): Found as 'java_interop_jnienv_throw'. 10-12 14:15:29.570 I/MonoDroid( 5395): UNHANDLED EXCEPTION: 10-12 14:15:29.580 I/MonoDroid( 5395): System.ObjectDisposedException: Cannot access a disposed object. 10-12 14:15:29.580 I/MonoDroid( 5395): Object name: 'Android.Views.GestureDetector'. 10-12 14:15:29.580 I/MonoDroid( 5395): at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00030] in <a043032cf94a485190047a14918b9f60>:0 10-12 14:15:29.580 I/MonoDroid( 5395): at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualBooleanMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00001] in <a043032cf94a485190047a14918b9f60>:0 10-12 14:15:29.580 I/MonoDroid( 5395): at Android.Views.GestureDetector.OnTouchEvent (Android.Views.MotionEvent ev) [0x00036] in <148efd2f7a03496fb40611cf5f4f0bb1>:0 10-12 14:15:29.580 I/MonoDroid( 5395): at Xamarin.Forms.Platform.Android.VisualElementRenderer
1[TElement].Android.Views.View.IOnTouchListener.OnTouch (Android.Views.View v, Android.Views.MotionEvent e) [0x0004a] in <95895bcb439e42ebb8e7134a545f1acc>:0
10-12 14:15:29.580 I/MonoDroid( 5395): at Android.Views.View+IOnTouchListenerInvoker.n_OnTouch_Landroid_view_View_Landroid_viewMotionEvent (System.IntPtr jnienv, System.IntPtr nativethis, System.IntPtr native_v, System.IntPtr native_e) [0x00019] in <148efd2f7a03496fb40611cf5f4f0bb1>:0
10-12 14:15:29.580 I/MonoDroid( 5395): at (wrapper dynamic-method) System.Object:a96996d0-2c84-4c0f-a89a-6a9f202874f3 (intptr,intptr,intptr,intptr)
10-12 14:15:29.580 I/MonoDroid( 5395): --- End of stack trace from previous location where exception was thrown ---
10-12 14:15:29.580 I/MonoDroid( 5395): at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <368820a9888f43ddb85d18e87189adbf>:0
10-12 14:15:29.580 I/MonoDroid( 5395): at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualBooleanMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x000a8] in
I am not supporting the last two xamarin forms releases as both of them are full of bugs. Downgrade to 2.3.0.107
Thanks
Hi, @alexrainman
I'm sorry to say that after downgrade Xamarin.Forms to 2.3.0.107, it crash too, with same reason.
<package id="Xamarin.Forms" version="2.3.0.107" targetFramework="monoandroid60" />
:(
Will try to reproduce this. Thanks
@Flyinmorning I had a crash too. Can u remove the line from the assembly.cs [assembly: XamlCompilation(XamlCompilationOptions.Compile)]
and see if the crash still happens?
Please, let me know if this solve the issue.
@shah-smit I don't have such line in my assembly.cs from the beginning, it crash too. @alexrainman You have to swipe it fast, left to right and right to left, as fast as you can, soon or later, it will crash.
Thanks.
Will give it a try tomorrow.
Will give it a try too.
I released a new version with lot of fixes and improvements, including support for latest Forms.
Does latest release solve this?
If my work is helping you, please help me back: https://xamarinhq.wufoo.com/forms/nominate-a-xamarin-mvp/
This is what i have done that is community visible:
It's a random issue, but easy to reproduce with NuGet v2.2.0.
The demo project in the github repo can also reproduce it.
When you swipe left to right or right to left between pages(>=3 pages) in CarouselView, the app will crash randomly, IOS has no such issue, only Android can reproduce it.
The exception looks like this:
09-27 17:46:02.868 I/InputReader( 933): Touch event's action is 0x0 (deviceType=0) [pCnt=1, s=0.4543 ] when=507385318680000 09-27 17:46:02.878 I/InputDispatcher( 933): Delivering touch to (1187): action: 0x4, toolType: 1 09-27 17:46:02.878 I/InputDispatcher( 933): Delivering touch to (19593): action: 0x0, toolType: 1 09-27 17:46:02.878 V/BitmapFactory(19593): DecodeImagePath(decodeResourceStream3) : res/drawable-xxhdpi-v4/swing_i_q_mark_blurred.png 09-27 17:46:02.888 D/InputDispatcher( 933): Waiting for application to become ready for input: xxxx Reason: Waiting to send non-key event because the touched window has not finished processing certain input events that were delivered to it over 500.0ms ago. Wait queue length: 29. Wait queue head age: 506.6ms. 09-27 17:46:02.918 D/AutomaticBrightnessController( 933): applyLightSensorMeasurementSEC : mIsLockZone = false 09-27 17:46:02.938 D/ViewRootImpl(19593): ViewPostImeInputStage ACTION_DOWN 09-27 17:46:02.948 D/Mono (19593): DllImport attempting to load: '/system/lib/liblog.so'. 09-27 17:46:02.948 D/Mono (19593): DllImport loaded library '/system/lib/liblog.so'. 09-27 17:46:02.948 D/Mono (19593): DllImport searching in: '/system/lib/liblog.so' ('/system/lib/liblog.so'). 09-27 17:46:02.948 D/Mono (19593): Searching for 'android_log_print'. 09-27 17:46:02.948 D/Mono (19593): Probing 'android_log_print'. 09-27 17:46:02.948 D/Mono (19593): Found as 'android_log_print'. 09-27 17:46:02.948 I/MonoDroid(19593): UNHANDLED EXCEPTION: 09-27 17:46:02.978 I/MonoDroid(19593): System.ObjectDisposedException: Cannot access a disposed object. 09-27 17:46:02.978 I/MonoDroid(19593): Object name: 'Android.Views.GestureDetector'. 09-27 17:46:02.978 I/MonoDroid(19593): at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00030] in:0
09-27 17:46:02.978 I/MonoDroid(19593): at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualBooleanMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00001] in :0
09-27 17:46:02.978 I/MonoDroid(19593): at Android.Views.GestureDetector.OnTouchEvent (Android.Views.MotionEvent ev) [0x00036] in <2092df06fb0f41af8ef155ac7920eea4>:0
09-27 17:46:02.978 I/MonoDroid(19593): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Android.Views.View.IOnTouchListener.OnTouch (Android.Views.View v, Android.Views.MotionEvent e) [0x0004a] in <95895bcb439e42ebb8e7134a545f1acc>:0
09-27 17:46:02.978 I/MonoDroid(19593): at Android.Views.View+IOnTouchListenerInvoker.n_OnTouch_Landroid_view_View_Landroid_viewMotionEvent (System.IntPtr jnienv, System.IntPtr native this, System.IntPtr native_v, System.IntPtr native_e) [0x00019] in <2092df06fb0f41af8ef155ac7920eea4>:0
09-27 17:46:02.978 I/MonoDroid(19593): at (wrapper dynamic-method) System.Object:79304763-5567-4133-9faf-996d577d65b2 (intptr,intptr,intptr,intptr)
09-27 17:46:03.018 D/CrashlyticsCore(19593): Crashlytics is handling uncaught exception "java.lang.Throwable: Cannot access a disposed object.
09-27 17:46:03.018 D/CrashlyticsCore(19593): Object name: 'Android.Views.GestureDetector'." from thread main
09-27 17:46:03.018 D/Answers (19593): Logged crash
09-27 17:46:03.038 D/CrashlyticsCore(19593): No log data to include with this event.
0