Bug 36285 - Android App (Always) Crashes After Navigating Away From Page With A ScrollView In HeaderTemplate of ListView
Summary: Android App (Always) Crashes After Navigating Away From Page With A ScrollVie...
Status: RESOLVED DUPLICATE of bug 32462
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.0.0
Hardware: PC Windows
: Normal blocker
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-11-26 10:01 UTC by Ahmed Alejo
Modified: 2016-03-18 17:54 UTC (History)
8 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED DUPLICATE of bug 32462

Description Ahmed Alejo 2015-11-26 10:01:20 UTC
My boss is almost going crazy on the amount of bugs i report as reason for not moving forward

# Steps to reproduce
Xamarin 4, Xamarin.Forms 2.0
Two Pages
1) NavigationPage(MastarDetaiPagel) -> ContentPage

ContentPage has a 
  -- ListView with enough items for scrolling
      -- headerTemplate
          -- ScrollView[Orientation] = Horizontal
              -- some contents in a StackLayout[Orientation] = Horizontal

2) Scroll past the HeaderTemplate and navigate back

# Expected behavior
Should navigate back without error.

# Actual behavior

App crashes with a System.NotSupportedException contained in the following stacktrace:
NOTE: error doesn´t occur when ListView is scrolltotop i.e if HeaderTemplate is in view.
11-26 12:49:19.289 D/AbsListView(16271): onDetachedFromWindow
An unhandled exception occurred.

11-26 12:49:22.429 D/Mono    (16271): DllImport attempting to load: '/system/lib/liblog.so'.
11-26 12:49:22.437 D/Mono    (16271): DllImport loaded library '/system/lib/liblog.so'.
11-26 12:49:22.437 D/Mono    (16271): DllImport searching in: '/system/lib/liblog.so' ('/system/lib/liblog.so').
11-26 12:49:22.437 D/Mono    (16271): Searching for '__android_log_print'.
11-26 12:49:22.437 D/Mono    (16271): Probing '__android_log_print'.
11-26 12:49:22.437 D/Mono    (16271): Found as '__android_log_print'.
11-26 12:49:22.445 I/MonoDroid(16271): UNHANDLED EXCEPTION:
11-26 12:49:22.484 I/MonoDroid(16271): System.NotSupportedException: Unable to activate instance of type Xamarin.Forms.Platform.Android.ScrollViewRenderer from native handle 0x5c40001d (key_handle 0x42374490). ---> System.MissingMethodException: No constructor found for Xamarin.Forms.Platform.Android.ScrollViewRenderer::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown.
11-26 12:49:22.484 I/MonoDroid(16271): Java.Lang.Error: Exception of type 'Java.Lang.Error' was thrown.
11-26 12:49:22.484 I/MonoDroid(16271):   --- End of managed exception stack trace ---
11-26 12:49:22.484 I/MonoDroid(16271): java.lang.Error: Java callstack:
11-26 12:49:22.492 I/MonoDroid(16271): 	at md5b60ffeb829f638581ab2bb9b1a7f4f3f.ScrollViewRenderer.n_onDetachedFromWindow(Native Method)
11-26 12:49:22.492 I/MonoDroid(16271): 	at md5b60ffeb829f638581ab2bb9b1a7f4f3f.ScrollViewRenderer.onDetachedFromWindow(ScrollViewRenderer.java:89)
11-26 12:49:22.492 I/MonoDroid(16271): 	at android.view.View.dispatchDetachedFromWindow(View.java:12888)
11-26 12:49:22.492 I/MonoDroid(16271): 	at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2759)
11-26 12:49:22.492 I/MonoDroid(16271): 	at android.view.ViewGroup.removeAllViewsInLayout(ViewGroup.java:4012)
11-26 12:49:22.492 I/MonoDroid(16271): 	at android.view.ViewGroup.removeAllViews(ViewGroup.java:3958)
11-26 12:49:22.492 I/MonoDroid(16271): 	at md5270abb39e60627f0f200893b490a1ade.FragmentContainer.n_onDestroyView(Native Method)
11-26 12:49:22.492 I/MonoDroid(16271): 	at md5270abb39e60627f0f200893b490a1ade.FragmentContainer.onDestroyView(FragmentContainer.java:38)
11-26 12:49:22.492 I/MonoDroid(16271): 	at android.support.v4.app.Fragment.performDestroyView(Fragment.java:2167)
11-26 12:49:22.492 I/MonoDroid(16271): 	at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1100)
11-26 12:49:22.492 I/MonoDroid(16271): 	at android.support.v4.app.FragmentManagerImpl.removeFragment(FragmentManager.java:1304)
11-26 12:49:22.500 I/MonoDroid(16271): 	at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:708)
11-26 12:49:22.500 I/MonoDroid(16271): 	at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1572)
11-26 12:49:22.500 I/MonoDroid(16271): 	at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:493)
11-26 12:49:22.500 I/MonoDroid(16271): 	at android.os.Handler.handleCallback(Handler.java:725)
11-26 12:49:22.500 I/MonoDroid(16271): 	at android.os.Handler.dispatchMessage(Handler.java:92)
11-26 12:49:22.500 I/MonoDroid(16271): 	at android.os.Looper.loop(Looper.java:176)
11-26 12:49:22.500 I/MonoDroid(16271): 	at android.app.ActivityThread.main(ActivityThread.java:5365)
11-26 12:49:22.500 I/MonoDroid(16271): 	at java.lang.reflect.Method.invokeNative(Native Method)
11-26 12:49:22.500 I/MonoDroid(16271): 	at java.lang.reflect.Method.invoke(Method.java:511)
11-26 12:49:22.500 I/MonoDroid(16271): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
11-26 12:49:22.500 I/MonoDroid(16271): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
11-26 12:49:22.500 I/MonoDroid(16271): 	at dalvik.system.NativeStart.main(Native Method)
11-26 12:49:22.500 I/MonoDroid(16271):   --- End of inner exception stack trace ---
11-26 12:49:22.500 I/MonoDroid(16271):   at Java.Interop.TypeManager.CreateProxy (System.Type type, IntPtr handle, JniHandleOwnership transfer) [0x00039] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Java.Interop/TypeManager.cs:299 
11-26 12:49:22.500 I/MonoDroid(16271):   at Java.Interop.TypeManager.CreateInstance (IntPtr handle, JniHandleOwnership transfer, System.Type targetType) [0x0012c] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Java.Interop/TypeManager.cs:277 
11-26 12:49:22.500 I/MonoDroid(16271):   --- End of inner exception stack trace ---
11-26 12:49:22.500 I/MonoDroid(16271):   at Java.Interop.TypeManager.CreateInstance (IntPtr handle, JniHandleOwnership transfer, System.Type targetType) [0x0017a] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Java.Interop/TypeManager.cs:284 
11-26 12:49:22.500 I/MonoDroid(16271):   at Java.Lang.Object.GetObject (IntPtr handle, JniHandleOwnership transfer, System.Type type) [0x000e5] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:371 
11-26 12:49:22.500 I/MonoDroid(16271):   at Java.Lang.Object._GetObject[T] (IntPtr handle, JniHandleOwnership transfer) [0x0001a] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:342 
11-26 12:49:22.507 I/MonoDroid(16271):   at Java.Lang.Object.GetObject[T] (IntPtr handle, JniHandleOwnership transfer) [0x00000] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:334 
11-26 12:49:22.507 I/MonoDroid(16271):   at Java.Lang.Object.GetObject[T] (IntPtr jnienv, IntPtr handle, JniHandleOwnership transfer) [0x00006] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:328 
11-26 12:49:22.507 I/MonoDroid(16271):   at Android.Views.View.n_OnDetachedFromWindow (IntPtr jnienv, IntPtr native__this) [0x00000] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Views.View.cs:16087 
11-26 12:49:22.507 I/MonoDroid(16271):   at (wrapper dynamic-method) System.Object:fb305f93-bb11-48d5-a02b-df31c1ee3b3d (intptr,intptr)
11-26 12:49:22.585 W/Xamarin.Insights(16271): Warning: Unhandled exception: System.NotSupportedException: Unable to activate instance of type Xamarin.Forms.Platform.Android.ScrollViewRenderer from native handle 0x5c40001d (key_handle 0x42374490). ---> System.MissingMethodException: No constructor found for Xamarin.Forms.Platform.Android.ScrollViewRenderer::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown.
11-26 12:49:22.585 W/Xamarin.Insights(16271): Java.Lang.Error: Exception of type 'Java.Lang.Error' was thrown.
11-26 12:49:22.585 W/Xamarin.Insights(16271): 
11-26 12:49:22.585 W/Xamarin.Insights(16271):   --- End of managed exception stack trace ---
11-26 12:49:22.585 W/Xamarin.Insights(16271): java.lang.Error: Java callstack:
11-26 12:49:22.585 W/Xamarin.Insights(16271): 	at md5b60ffeb829f638581ab2bb9b1a7f4f3f.ScrollViewRenderer.n_onDetachedFromWindow(Native Method)
11-26 12:49:22.585 W/Xamarin.Insights(16271): 	at md5b60ffeb829f638581ab2bb9b1a7f4f3f.ScrollViewRenderer.onDetachedFromWindow(ScrollViewRenderer.java:89)
11-26 12:49:22.585 W/Xamarin.Insights(16271): 	at android.view.View.dispatchDetachedFromWindow(View.java:12888)
11-26 12:49:22.585 W/Xamarin.Insights(16271): 	at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2759)
11-26 12:49:22.585 W/Xamarin.Insights(16271): 	at android.view.ViewGroup.removeAllViewsInLayout(ViewGroup.java:4012)
11-26 12:49:22.585 W/Xamarin.Insights(16271): 	at android.view.ViewGroup.removeAllViews(ViewGroup.java:3958)
11-26 12:49:22.585 W/Xamarin.Insights(16271): 	at md5270abb39e60627f0f200893b490a1ade.FragmentContainer.n_onDestroyView(Native Method)
11-26 12:49:22.585 W/Xamarin.Insights(16271): 	at md5270abb39e60627f0f200893b490a1ade.FragmentContainer.onDestroyView(FragmentContainer.java:38)
11-26 12:49:22.585 W/Xamarin.Insights(16271): 	at android.support.v4.app.Fragment.performDestroyView(Fragment.java:2167)
11-26 12:49:22.585 W/Xamarin.Insights(16271): 	at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1100)
11-26 12:49:22.585 W/Xamarin.Insights(16271): 	at android.support.v4.app.FragmentManagerImpl.removeFragment(FragmentManager.java:1304)
11-26 12:49:22.585 W/Xamarin.Insights(16271): 	at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:708)
11-26 12:49:22.585 W/Xamarin.Insights(16271): 	at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1572)
11-26 12:49:22.585 W/Xamarin.Insights(16271): 	at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:493)
11-26 12:49:22.585 W/Xamarin.Insights(16271): 	at android.os.Handler.handleCallback(Handler.java:725)
11-26 12:49:22.585 W/Xamarin.Insights(16271): 	at android.os.Handler.dispatchMessage(Handler.java:92)
11-26 12:49:22.585 W/Xamarin.Insights(16271): 	at android.os.Looper.loop(Looper.java:176)
11-26 12:49:22.585 W/Xamarin.Insights(16271): 	at android.app.ActivityThread.main(ActivityThread.java:5365)
11-26 12:49:22.585 W/Xamarin.Insights(16271): 	at java.lang.reflect.Method.invokeNative(Native Method)
11-26 12:49:22.585 W/Xamarin.Insights(16271): 	at java.lang.reflect.Method.invoke(Method.java:511)
11-26 12:49:22.585 W/Xamarin.Insights(16271): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
11-26 12:49:22.585 W/Xamarin.Insights(16271): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
11-26 12:49:22.585 W/Xamarin.Insights(16271): 	at dalvik.system.NativeStart.main(Native Method)
11-26 12:49:22.585 W/Xamarin.Insights(16271): 
11-26 12:49:22.585 W/Xamarin.Insights(16271):   --- End of inner exception stack trace ---
11-26 12:49:22.585 W/Xamarin.Insights(16271):   at Java.Interop.TypeManager.CreateProxy (System.Type type, IntPtr handle, JniHandleOwnership transfer) [0x00039] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Java.Interop/TypeManager.cs:299 
11-26 12:49:22.585 W/Xamarin.Insights(16271):   at Java.Interop.TypeManager.CreateInstance (IntPtr handle, JniHandleOwnership transfer, System.Type targetType) [0x0012c] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Java.Interop/TypeManager.cs:277 
11-26 12:49:22.585 W/Xamarin.Insights(16271):   --- End of inner exception stack trace ---
11-26 12:49:22.585 W/Xamarin.Insights(16271):   at Java.Interop.TypeManager.CreateInstance (IntPtr handle, JniHandleOwnership transfer, System.Type targetType) [0x0017a] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Java.Interop/TypeManager.cs:284 
11-26 12:49:22.585 W/Xamarin.Insights(16271):   at Java.Lang.Object.GetObject (IntPtr handle, JniHandleOwnership transfer, System.Type type) [0x000e5] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:371 
11-26 12:49:22.585 W/Xamarin.Insights(16271):   at Java.Lang.Object._GetObject[T] (IntPtr handle, JniHandleOwnership transfer) [0x0001a] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:342 
11-26 12:49:22.585 W/Xamarin.Insights(16271):   at Java.Lang.Object.GetObject[T] (IntPtr handle, JniHandleOwnership transfer) [0x00000] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:334 
11-26 12:49:22.585 W/Xamarin.Insights(16271):   at Java.Lang.Object.GetObject[T] (IntPtr jnienv, IntPtr handle, JniHandleOwnership transfer) [0x00006] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:328 
11-26 12:49:22.585 W/Xamarin.Insights(16271):   at Android.Views.View.n_OnDetachedFromWindow (IntPtr jnienv, IntPtr native__this) [0x00000] in /Users/builder/data/lanes/2098/3ef
11-26 12:49:22.625 D/Mono    (16271): [0x661f4518] hill climbing, change max number of threads 7
11-26 12:49:22.843 I/dalvikvm(16271): Could not find method java.lang.Throwable.<init>, referenced from method md52ce486a14f4bcd95899665e9d932190b.JavaProxyThrowable.<init>
11-26 12:49:22.843 W/dalvikvm(16271): VFY: unable to resolve direct method 17747: Ljava/lang/Throwable;.<init> (Ljava/lang/String;Ljava/lang/Throwable;ZZ)V
11-26 12:49:22.843 D/dalvikvm(16271): VFY: replacing opcode 0x70 at 0x0000
An unhandled exception occured.

11-26 12:49:24.367 I/MonoDroid(16271): UNHANDLED EXCEPTION:
11-26 12:49:24.414 I/MonoDroid(16271): System.NotSupportedException: Unable to activate instance of type Xamarin.Forms.Platform.Android.ScrollViewRenderer from native handle 0x5c40001d (key_handle 0x42374490). ---> System.MissingMethodException: No constructor found for Xamarin.Forms.Platform.Android.ScrollViewRenderer::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown.
11-26 12:49:24.414 I/MonoDroid(16271): Java.Lang.Error: Exception of type 'Java.Lang.Error' was thrown.
11-26 12:49:24.414 I/MonoDroid(16271):   --- End of managed exception stack trace ---
11-26 12:49:24.414 I/MonoDroid(16271): java.lang.Error: Java callstack:
11-26 12:49:24.414 I/MonoDroid(16271): 	at md5b60ffeb829f638581ab2bb9b1a7f4f3f.ScrollViewRenderer.n_onDetachedFromWindow(Native Method)
11-26 12:49:24.414 I/MonoDroid(16271): 	at md5b60ffeb829f638581ab2bb9b1a7f4f3f.ScrollViewRenderer.onDetachedFromWindow(ScrollViewRenderer.java:89)
11-26 12:49:24.414 I/MonoDroid(16271): 	at android.view.View.dispatchDetachedFromWindow(View.java:12888)
11-26 12:49:24.414 I/MonoDroid(16271): 	at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2759)
11-26 12:49:24.414 I/MonoDroid(16271): 	at android.view.ViewGroup.removeAllViewsInLayout(ViewGroup.java:4012)
11-26 12:49:24.414 I/MonoDroid(16271): 	at android.view.ViewGroup.removeAllViews(ViewGroup.java:3958)
11-26 12:49:24.414 I/MonoDroid(16271): 	at md5270abb39e60627f0f200893b490a1ade.FragmentContainer.n_onDestroyView(Native Method)
11-26 12:49:24.414 I/MonoDroid(16271): 	at md5270abb39e60627f0f200893b490a1ade.FragmentContainer.onDestroyView(FragmentContainer.java:38)
11-26 12:49:24.414 I/MonoDroid(16271): 	at android.support.v4.app.Fragment.performDestroyView(Fragment.java:2167)
11-26 12:49:24.414 I/MonoDroid(16271): 	at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1100)
11-26 12:49:24.414 I/MonoDroid(16271): 	at android.support.v4.app.FragmentManagerImpl.removeFragment(FragmentManager.java:1304)
11-26 12:49:24.414 I/MonoDroid(16271): 	at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:708)
11-26 12:49:24.414 I/MonoDroid(16271): 	at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1572)
11-26 12:49:24.414 I/MonoDroid(16271): 	at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:493)
11-26 12:49:24.414 I/MonoDroid(16271): 	at android.os.Handler.handleCallback(Handler.java:725)
11-26 12:49:24.414 I/MonoDroid(16271): 	at android.os.Handler.dispatchMessage(Handler.java:92)
11-26 12:49:24.414 I/MonoDroid(16271): 	at android.os.Looper.loop(Looper.java:176)
11-26 12:49:24.414 I/MonoDroid(16271): 	at android.app.ActivityThread.main(ActivityThread.java:5365)
11-26 12:49:24.414 I/MonoDroid(16271): 	at java.lang.reflect.Method.invokeNative(Native Method)
11-26 12:49:24.414 I/MonoDroid(16271): 	at java.lang.reflect.Method.invoke(Method.java:511)
11-26 12:49:24.414 I/MonoDroid(16271): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
11-26 12:49:24.414 I/MonoDroid(16271): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
11-26 12:49:24.414 I/MonoDroid(16271): 	at dalvik.system.NativeStart.main(Native Method)
11-26 12:49:24.414 I/MonoDroid(16271):   --- End of inner exception stack trace ---
11-26 12:49:24.414 I/MonoDroid(16271):   at Java.Interop.TypeManager.CreateProxy (System.Type type, IntPtr handle, JniHandleOwnership transfer) [0x00039] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Java.Interop/TypeManager.cs:299 
11-26 12:49:24.414 I/MonoDroid(16271):   at Java.Interop.TypeManager.CreateInstance (IntPtr handle, JniHandleOwnership transfer, System.Type targetType) [0x0012c] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Java.Interop/TypeManager.cs:277 
11-26 12:49:24.414 I/MonoDroid(16271):   --- End of inner exception stack trace ---
11-26 12:49:24.414 I/MonoDroid(16271):   at (wrapper dynamic-method) System.Object:fb305f93-bb11-48d5-a02b-df31c1ee3b3d (intptr,intptr)
11-26 12:49:24.414 I/MonoDroid(16271):   at (wrapper native-to-managed) System.Object:fb305f93-bb11-48d5-a02b-df31c1ee3b3d (intptr,intptr)
11-26 12:49:24.414 I/MonoDroid(16271):   at (wrapper managed-to-native) System.Object:wrapper_native_0x409ccbe1 (intptr,intptr,intptr,intptr)
11-26 12:49:24.414 I/MonoDroid(16271):   at (wrapper delegate-invoke) <Module>:invoke_void_intptr_intptr_intptr_intptr (intptr,intptr,intptr,intptr)
11-26 12:49:24.414 I/MonoDroid(16271):   at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (IntPtr jobject, IntPtr jclass, IntPtr jmethod) [0x00060] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:1006 
11-26 12:49:24.414 I/MonoDroid(16271):   at Android.Views.ViewGroup.RemoveAllViews () [0x00058] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Views.ViewGroup.cs:4601 
11-26 12:49:24.414 I/MonoDroid(16271):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Dispose (Boolean disposing) [0x0008c] in <filename unknown>:0 
11-26 12:49:24.414 I/MonoDroid(16271):   at Java.Lang.Object.Dispose () [0x00000] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:115 
11-26 12:49:24.414 I/MonoDroid(16271):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Dispose (Boolean disposing) [0x0007f] in <filename unknown>:0 
11-26 12:49:24.414 I/MonoDroid(16271):   at Java.Lang.Object.Dispose () [0x00000] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:115 
11-26 12:49:24.414 I/MonoDroid(16271):   at Xamarin.Forms.Platform.Android.ListViewRenderer.Dispose (Boolean disposing) [0x00017] in <filename unknown>:0 
11-26 12:49:24.414 I/MonoDroid(16271):   at Java.Lang.Object.Dispose () [0x00000] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:115 
11-26 12:49:24.414 I/MonoDroid(16271):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Dispose (Boolean disposing) [0x0007f] in <filename unknown>:0 
11-26 12:49:24.414 I/MonoDroid(16271):   at Java.Lang.Object.Dispose () [0x00000] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:115 
11-26 12:49:24.414 I/MonoDroid(16271):   at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Dispose (Boolean disposing) [0x0007f] in <filename unknown>:0 
11-26 12:49:24.414 I/MonoDroid(16271):   at Java.Lang.Object.Dispose () [0x00000] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:115 
11-26 12:49:24.414 I/MonoDroid(16271):   at Xamarin.Forms.Platform.Android.AppCompat.FragmentContainer.OnDestroyView () [0x00066] in <filename unknown>:0 
11-26 12:49:24.414 I/MonoDroid(16271):   at Android.Support.V4.App.Fragment.n_OnDestroyView (IntPtr jnienv, IntPtr native__this) [0x00009] in <filename unknown>:0 
11-26 12:49:24.414 I/MonoDroid(16271):   at (wrapper dynamic-method) System.Object:7d1cb69a-855c-47cb-bdda-dfe5c9829439 (intptr,intptr)
11-26 12:49:24.414 W/dalvikvm(16271): JNI WARNING: JNI method called with exception pending
11-26 12:49:24.421 W/dalvikvm(16271):              in Lmd5b60ffeb829f638581ab2bb9b1a7f4f3f/ScrollViewRenderer;.n_onDetachedFromWindow:()V (NewString)
11-26 12:49:24.421 W/dalvikvm(16271): Pending exception is:
11-26 12:49:24.421 I/dalvikvm(16271): md52ce486a14f4bcd95899665e9d932190b.JavaProxyThrowable: System.NotSupportedException: Unable to activate instance of type Xamarin.Forms.Platform.Android.ScrollViewRenderer from native handle 0x5c40001d (key_handle 0x42374490). ---> System.MissingMethodException: No constructor found for Xamarin.Forms.Platform.Android.ScrollViewRenderer::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown.
11-26 12:49:24.421 I/dalvikvm(16271): Java.Lang.Error: Exception of type 'Java.Lang.Error' was thrown.
11-26 12:49:24.421 I/dalvikvm(16271): 
11-26 12:49:24.421 I/dalvikvm(16271):   --- End of managed exception stack trace ---
11-26 12:49:24.421 I/dalvikvm(16271): java.lang.Error: Java callstack:
11-26 12:49:24.421 I/dalvikvm(16271): 	at md5b60ffeb829f638581ab2bb9b1a7f4f3f.ScrollViewRenderer.n_onDetachedFromWindow(Native Method)
11-26 12:49:24.421 I/dalvikvm(16271): 	at md5b60ffeb829f638581ab2bb9b1a7f4f3f.ScrollViewRenderer.onDetachedFromWindow(ScrollViewRenderer.java:89)
11-26 12:49:24.421 I/dalvikvm(16271): 	at android.view.View.dispatchDetachedFromWindow(View.java:12888)
11-26 12:49:24.421 I/dalvikvm(16271): 	at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2759)
11-26 12:49:24.421 I/dalvikvm(16271): 	at android.view.ViewGroup.
11-26 12:49:24.421 I/dalvikvm(16271): 	at md5b60ffeb829f638581ab2bb9b1a7f4f3f.ScrollViewRenderer.n_onDetachedFromWindow(Native Method)
11-26 12:49:24.421 I/dalvikvm(16271): 	at md5b60ffeb829f638581ab2bb9b1a7f4f3f.ScrollViewRenderer.onDetachedFromWindow(ScrollViewRenderer.java:89)
11-26 12:49:24.421 I/dalvikvm(16271): 	at android.view.View.dispatchDetachedFromWindow(View.java:12888)
11-26 12:49:24.421 I/dalvikvm(16271): 	at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2759)
11-26 12:49:24.421 I/dalvikvm(16271): 	at android.view.ViewGroup.removeAllViewsInLayout(ViewGroup.java:4012)
11-26 12:49:24.421 I/dalvikvm(16271): 	at android.view.ViewGroup.removeAllViews(ViewGroup.java:3958)
11-26 12:49:24.421 I/dalvikvm(16271): 	at md5270abb39e60627f0f200893b490a1ade.FragmentContainer.n_onDestroyView(Native Method)
11-26 12:49:24.421 I/dalvikvm(16271): 	at md5270abb39e60627f0f200893b490a1ade.FragmentContainer.onDestroyView(FragmentContainer.java:38)
11-26 12:49:24.421 I/dalvikvm(16271): 	at android.support.v4.app.Fragment.performDestroyView(Fragment.java:2167)
11-26 12:49:24.421 I/dalvikvm(16271): 	at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1100)
11-26 12:49:24.421 I/dalvikvm(16271): 	at android.support.v4.app.FragmentManagerImpl.removeFragment(FragmentManager.java:1304)
11-26 12:49:24.421 I/dalvikvm(16271): 	at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:708)
11-26 12:49:24.421 I/dalvikvm(16271): 	at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1572)
11-26 12:49:24.421 I/dalvikvm(16271): 	at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:493)
11-26 12:49:24.421 I/dalvikvm(16271): 	at android.os.Handler.handleCallback(Handler.java:725)
11-26 12:49:24.421 I/dalvikvm(16271): 	at android.os.Handler.dispatchMessage(Handler.java:92)
11-26 12:49:24.421 I/dalvikvm(16271): 	at android.os.Looper.loop(Looper.java:176)
11-26 12:49:24.421 I/dalvikvm(16271): 	at android.app.ActivityThread.main(ActivityThread.java:5365)
11-26 12:49:24.421 I/dalvikvm(16271): 	at java.lang.reflect.Method.invokeNative(Native Method)
11-26 12:49:24.421 I/dalvikvm(16271): 	at java.lang.reflect.Method.invoke(Method.java:511)
11-26 12:49:24.421 I/dalvikvm(16271): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
11-26 12:49:24.421 I/dalvikvm(16271): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
11-26 12:49:24.421 I/dalvikvm(16271): 	at dalvik.system.NativeStart.main(Native Method)
11-26 12:49:24.421 I/dalvikvm(16271): "main" prio=5 tid=1 NATIVE
11-26 12:49:24.421 I/dalvikvm(16271):   | group="main" sCount=0 dsCount=0 obj=0x41a979a0 self=0x41a84b28
11-26 12:49:24.421 I/dalvikvm(16271):   | sysTid=16271 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=1074222556
11-26 12:49:24.421 I/dalvikvm(16271):   | state=R schedstat=( 0 0 0 ) utm=2264 stm=387 core=0
11-26 12:49:24.445 I/dalvikvm(16271):   #00  pc 000012a0  /system/lib/libcorkscrew.so (unwind_backtrace_thread+27)
11-26 12:49:24.445 I/dalvikvm(16271):   #01  pc 0005fd1c  /system/lib/libdvm.so (dvmDumpNativeStack(DebugOutputTarget const*, int)+35)
11-26 12:49:24.445 I/dalvikvm(16271):   #02  pc 00053ba8  /system/lib/libdvm.so (dvmDumpThreadEx(DebugOutputTarget const*, Thread*, bool)+303)
11-26 12:49:24.445 I/dalvikvm(16271):   #03  pc 00053c42  /system/lib/libdvm.so (dvmDumpThread(Thread*, bool)+25)
11-26 12:49:24.445 I/dalvikvm(16271):   #04  pc 00038bba  /system/lib/libdvm.so
11-26 12:49:24.445 I/dalvikvm(16271):   #05  pc 0003c3d6  /system/lib/libdvm.so
11-26 12:49:24.445 I/dalvikvm(16271):   at md5b60ffeb829f638581ab2bb9b1a7f4f3f.ScrollViewRenderer.n_onDetachedFromWindow(Native Method)
11-26 12:49:24.445 I/dalvikvm(16271):   at md5b60ffeb829f638581ab2bb9b1a7f4f3f.ScrollViewRenderer.onDetachedFromWindow(ScrollViewRenderer.java:89)
11-26 12:49:24.445 I/dalvikvm(16271):   at android.view.View.dispatchDetachedFromWindow(View.java:12888)
11-26 12:49:24.445 I/dalvikvm(16271):   at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2759)
11-26 12:49:24.445 I/dalvikvm(16271):   at android.view.ViewGroup.removeAllViewsInLayout(ViewGroup.java:4012)
11-26 12:49:24.445 I/dalvikvm(16271):   at android.view.ViewGroup.removeAllViews(ViewGroup.java:3958)
11-26 12:49:24.445 I/dalvikvm(16271):   at md5270abb39e60627f0f200893b490a1ade.FragmentContainer.n_onDestroyView(Native Method)
11-26 12:49:24.445 I/dalvikvm(16271):   at md5270abb39e60627f0f200893b490a1ade.FragmentContainer.onDestroyView(FragmentContainer.java:38)
11-26 12:49:24.445 I/dalvikvm(16271):   at android.support.v4.app.Fragment.performDestroyView(Fragment.java:2167)
11-26 12:49:24.445 I/dalvikvm(16271):   at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1100)
11-26 12:49:24.445 I/dalvikvm(16271):   at android.support.v4.app.FragmentManagerImpl.removeFragment(FragmentManager.java:1304)
11-26 12:49:24.445 I/dalvikvm(16271):   at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:708)
11-26 12:49:24.445 I/dalvikvm(16271):   at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1572)
11-26 12:49:24.445 I/dalvikvm(16271):   at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:493)
11-26 12:49:24.445 I/dalvikvm(16271):   at android.os.Handler.handleCallback(Handler.java:725)
11-26 12:49:24.445 I/dalvikvm(16271):   at android.os.Handler.dispatchMessage(Handler.java:92)
11-26 12:49:24.445 I/dalvikvm(16271):   at android.os.Looper.loop(Looper.java:176)
11-26 12:49:24.445 I/dalvikvm(16271):   at android.app.ActivityThread.main(ActivityThread.java:5365)
11-26 12:49:24.445 I/dalvikvm(16271):   at java.lang.reflect.Method.invokeNative(Native Method)
11-26 12:49:24.445 I/dalvikvm(16271):   at java.lang.reflect.Method.invoke(Method.java:511)
11-26 12:49:24.445 I/dalvikvm(16271):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
11-26 12:49:24.445 I/dalvikvm(16271):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
11-26 12:49:24.453 I/dalvikvm(16271):   at dalvik.system.NativeStart.main(Native Method)
11-26 12:49:24.453 I/dalvikvm(16271): 
11-26 12:49:24.453 E/dalvikvm(16271): VM aborting
11-26 12:49:24.453 E/mono-rt (16271): Stacktrace:
11-26 12:49:24.453 E/mono-rt (16271): 
11-26 12:49:24.453 E/mono-rt (16271):   at <unknown> <0xffffffff>
11-26 12:49:24.453 E/mono-rt (16271):   at (wrapper managed-to-native) object.wrapper_native_0x409ca3b1 (intptr,intptr,int) <IL 0x0002b, 0xffffffff>
11-26 12:49:24.453 E/mono-rt (16271):   at Android.Runtime.JNIEnv.NewString (string) [0x00017] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.cs:791
11-26 12:49:24.453 E/mono-rt (16271):   at Java.Lang.Throwable..ctor (string) [0x00022] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Java.Lang.Throwable.cs:55
11-26 12:49:24.453 E/mono-rt (16271):   at Android.Runtime.JavaProxyThrowable..ctor (System.Exception) [0x00000] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Runtime/JavaProxyThrowable.cs:10
11-26 12:49:24.453 E/mono-rt (16271):   at Java.Lang.Throwable.FromException (System.Exception) [0x00023] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Java.Lang/Throwable.cs:148
11-26 12:49:24.453 E/mono-rt (16271):   at Android.Runtime.AndroidEnvironment.UnhandledException (System.Exception) [0x0007e] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Runtime/AndroidEnvironment.cs:114
11-26 12:49:24.453 E/mono-rt (16271):   at (wrapper dynamic-method) object.7d1cb69a-855c-47cb-bdda-dfe5c9829439 (intptr,intptr) <IL 0x00029, 0x0008b>
11-26 12:49:24.453 E/mono-rt (16271):   at (wrapper native-to-managed) object.7d1cb69a-855c-47cb-bdda-dfe5c9829439 (intptr,intptr) <IL 0x00026, 0xffffffff>
11-26 12:49:24.453 E/mono-rt (16271): 
11-26 12:49:24.453 E/mono-rt (16271): Attempting native Android stacktrace:
11-26 12:49:24.453 E/mono-rt (16271): 
11-26 12:49:24.453 E/mono-rt (16271):   at dvmAbort+75 [0x409d3cd0]
11-26 12:49:24.453 E/mono-rt (16271):   at ???+246743 [0x409ca3d7]
11-26 12:49:24.453 E/mono-rt (16271):   at ???+38936 [0x63ab7818]
11-26 12:49:24.453 E/mono-rt (16271): 
11-26 12:49:24.453 E/mono-rt (16271): =================================================================
11-26 12:49:24.453 E/mono-rt (16271): Got a SIGSEGV while executing native code. This usually indicates
11-26 12:49:24.453 E/mono-rt (16271): a fatal error in the mono runtime or one of the native libraries 
11-26 12:49:24.453 E/mono-rt (16271): used by your application.
11-26 12:49:24.453 E/mono-rt (16271): =================================================================
11-26 12:49:24.453 E/mono-rt (16271): 
11-26 12:49:24.460 F/libc    (16271): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1), thread 16271 (itz.<My-App-Package>)
# Supplemental info (logs, images, videos)


# Test environment (full version information)
---XAMARAIN STUDIO---

Version 5.10 (build 871)
Installation UUID: 377bd14f-3531-45ab-ba3f-7c1970039f93
Runtime:
	Microsoft .NET 4.0.30319.42000
	GTK+ 2.24.23 (MS-Windows theme)
	GTK# 2.12.30

Xamarin.Profiler
Not Installed

Xamarin.Android
Version: 6.0.0 (Business Edition)
Android SDK: C:\android-sdk
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
		6.0    (API level 23)

SDK Tools Version: 24.4.0
SDK Platform Tools Version: 23.0.1

SDK Build Tools Version: 23.0.1


Java SDK: C:\Program Files (x86)\Java\jdk1.7.0_55
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) Client VM (build 24.55-b03, mixed mode, sharing)

Xamarin Android Player
Version: 0.6.5
Location: C:\Program Files\Xamarin Android Player\DeviceManager.exe

Xamarin Inspector
Version: 0.3.2.3
Hash: 1b526e6
Branch: master
Build date: Tue Nov 17 20:54:41 UTC 2015

Build Information
Release ID: 510000871
Git revision: 4e9c5abb5ffdae12ba02ac49da83f8b2011dbb88
Build date: 2015-11-12 07:16:34-05
Xamarin addins: 55007ed0e56436f385d8e26394a45be563abc7e8
Build lane: monodevelop-windows-cycle6


----VISUAL STUDIO----

Operating System
Windows 6.1.7601.65536 (64-bit)

Microsoft Visual Studio Professional 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00081

Installed Version: Professional

Xamarin   4.0.0.1689 (f860fe4)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Inspector Support   0.3.2.3 (1b526e6)
Adds support for inspecting Xamarin and WPF apps.

Xamarin.Android   6.0.0.34 (3efa14c)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   9.2.1.51 (3c0ec35)
Visual Studio extension to enable development for Xamarin.iOS.

Also confirmed in Bug 32462
Comment 1 Ahmed Alejo 2015-11-26 10:03:22 UTC
This can be marked as duplicate, i don´t care, just get it fixed, please.
Comment 2 Ahmed Alejo 2015-11-28 12:58:11 UTC
[WORKAROUND|SOLUTION] i won´t explain a lot i didn´t get much either, but i will share what helped me

Add the following renderer:

using System;
using Android.Runtime;
using Xamarin.Forms;

[assembly: ExportRenderer(typeof(Xamarin.Forms.ScrollView), typeof(ScrollViewRenderer))]
/// <summary>
/// This renderer was added to resolve a bug that crashed the application in known case
/// Bug 36285 - Android App (Always) Crashes After Navigating Away From Page With A ScrollView In HeaderTemplate of ListView
/// <seealso cref="https://bugzilla.xamarin.com/show_bug.cgi?id=36285"/>
/// and 
/// Bug 32462 - Crash after a page disappeared if a ScrollView is in the HeaderTemplate property of a ListView
/// <seealso cref="https://bugzilla.xamarin.com/show_bug.cgi?id=32462"/>
/// </summary>
public class ScrollViewRenderer : Xamarin.Forms.Platform.Android.ScrollViewRenderer
{
    public ScrollViewRenderer()
    { }

    public ScrollViewRenderer(IntPtr javaReference, JniHandleOwnership transfer)
    { }
}
Comment 3 Ahmed Alejo 2015-11-28 13:05:19 UTC
This issue also exist in 
    - Xamarin.Forms 1.5.1
    - Xamarin.Forms 2.0

And are solved by this SIMPLE fix.  

Why hasn´t this been done Xamarin?.

Like we say here in Brazil: "Assim você me quebra as pernas" - "This way you break my legs(cripple me)"
Comment 4 Parmendra Kumar 2015-12-03 14:49:47 UTC
@Ahmed Alego,

I have tried to reproduce this issue and not able to reproduce it.
Could you please provide us a sample project? so that I can reproduce this issue at my end.


Thanks.
Comment 5 Ahmed Alejo 2015-12-07 11:06:55 UTC
@Parmendra Kumar, like i said this has been fixed, the Android ScollViewRenderer lacked the somewhat necessary 

public ScrollViewRenderer(IntPtr javaReference, JniHandleOwnership transfer)

constructor.

and an a sample project has already been attached by in this bug which is highly related:

https://bugzilla.xamarin.com/show_bug.cgi?id=32462#attach_12259
Comment 6 Ahmed Alejo 2015-12-09 13:32:43 UTC
So what´s the next step?
Comment 7 Samantha Houts [MSFT] 2016-03-18 17:54:35 UTC

*** This bug has been marked as a duplicate of bug 32462 ***