Bug 24982 - [iOS/Android] Memory Leaks with ListViews
Summary: [iOS/Android] Memory Leaks with ListViews
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.4.2
Hardware: PC All
: Normal major
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-12-02 06:37 UTC by Prashant Cholachagudda
Modified: 2017-05-26 14:31 UTC (History)
21 users (show)

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


Attachments
Testcase (516.23 KB, application/zip)
2014-12-02 06:37 UTC, Prashant Cholachagudda
Details
UpdatedSampleLeakWith234 (513.07 KB, application/x-zip-compressed)
2017-05-26 14:31 UTC, Rui Marinho
Details


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 FIXED

Description Prashant Cholachagudda 2014-12-02 06:37:05 UTC
Created attachment 8929 [details]
Testcase

It seems that the ListView with its ViewCells are kept in memory even when the page is popped from Navigation stack
After navigating between the pages, the below exception will be thrown:

You can reproduce the bug by navigating a few times from page 1 to page 2 with attached testcase. You may have to do this a few times, please use device or emulator

System.ArgumentException: 'jobject' must not be IntPtr.Zero.

[Mono] GC_MINOR: (Nursery full) pause 49.23ms, total 49.38ms, bridge 95.41ms promoted 1136K major 1392K los 17K
[mono-rt] Stacktrace:
[mono-rt] 
[mono-rt]   at <unknown> <0xffffffff>
[mono-rt]   at (wrapper managed-to-native) object.wrapper_native_0x422201a9 (intptr,intptr,intptr,Android.Runtime.JValue[]) <IL 0x00120, 0xffffffff>
[mono-rt]   at (wrapper delegate-invoke) <Module>.invoke_void_intptr_intptr_intptr_JValue[] (intptr,intptr,intptr,Android.Runtime.JValue[]) <IL 0x00062, 0xffffffff>
[mono-rt]   at Android.Runtime.JNIEnv.CallVoidMethod (intptr,intptr,Android.Runtime.JValue[]) [0x00040] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:504
[mono-rt]   at Android.Views.View.Measure (int,int) [0x0002d] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/Mono.Android/platforms/android-19/src/generated/Android.Views.View.cs:12241
[mono-rt]   at Xamarin.Forms.Platform.Android.ViewRenderer`2.GetDesiredSize (int,int) <IL 0x00011, 0x000b3>
[mono-rt]   at Xamarin.Forms.Platform.Android.LabelRenderer.GetDesiredSize (int,int) <IL 0x00101, 0x008bb>
[mono-rt]   at Xamarin.Forms.Platform.Android.Platform.GetNativeSize (Xamarin.Forms.VisualElement,double,double) <IL 0x00092, 0x004a3>
[mono-rt]   at Xamarin.Forms.VisualElement.OnSizeRequest (double,double) <IL 0x0003b, 0x0027f>
[mono-rt]   at Xamarin.Forms.VisualElement.GetSizeRequest (double,double) <IL 0x00041, 0x002c3>
[mono-rt]   at Xamarin.Forms.StackLayout.SumOfSizeRequests (double,double,int&) <IL 0x001ba, 0x00f77>
[mono-rt]   at Xamarin.Forms.StackLayout.LayoutChildren (double,double,double,double) <IL 0x00006, 0x003e7>
[mono-rt]   at Xamarin.Forms.Layout.UpdateChildrenLayout () <IL 0x000c8, 0x0066f>
[mono-rt]   at Xamarin.Forms.Layout.OnSizeAllocated (double,double) <IL 0x00010, 0x000ab>
[mono-rt]   at Xamarin.Forms.VisualElement.SizeAllocated (double,double) <IL 0x00003, 0x00083>
[mono-rt]   at Xamarin.Forms.Layout.OnChildMeasureInvalidated (object,System.EventArgs) <IL 0x00075, 0x0035f>
[mono-rt]   at Xamarin.Forms.VisualElement.InvalidateMeasure () <IL 0x00014, 0x00083>
[mono-rt]   at Xamarin.Forms.Label.<.cctor>b__0 (Xamarin.Forms.BindableObject,object,object) <IL 0x00006, 0x0007f>
[mono-rt]   at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty,object,bool,bool,bool) <IL 0x000b9, 0x0058f>
[mono-rt]   at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty,object,bool,bool,bool) <IL 0x00213, 0x00aeb>
[mono-rt]   at Xamarin.Forms.BindingExpression.ApplyCore (object,Xamarin.Forms.BindableObject,Xamarin.Forms.BindableProperty,bool) <IL 0x00206, 0x01287>
[mono-rt]   at Xamarin.Forms.BindingExpression.Apply (bool) <IL 0x00041, 0x0018b>
[mono-rt]   at Xamarin.Forms.BindingExpression/BindingExpressionPart.<PropertyChanged>b__12 () <IL 0x00007, 0x00053>
[mono-rt]   at Java.Lang.Thread/RunnableImplementor.Run () [0x0000b] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/Mono.Android/src/Java.Lang/Thread.cs:36
[mono-rt]   at Java.Lang.IRunnableInvoker.n_Run (intptr,intptr) [0x00009] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/Mono.Android/platforms/android-19/src/generated/Java.Lang.IRunnable.cs:71
[mono-rt]   at (wrapper dynamic-method) object.3fd910d4-84bc-46ff-b020-960fedc11029 (intptr,intptr) <IL 0x00011, 0x0003b>
[mono-rt]   at (wrapper native-to-managed) object.3fd910d4-84bc-46ff-b020-960fedc11029 (intptr,intptr) <IL 0x00022, 0xffffffff>
[mono-rt]   at <unknown> <0xffffffff>
[mono-rt]   at (wrapper managed-to-native) object.wrapper_native_0x422201a9 (intptr,intptr,intptr,Android.Runtime.JValue[]) <IL 0x00120, 0xffffffff>
[mono-rt]   at (wrapper delegate-invoke) <Module>.invoke_void_intptr_intptr_intptr_JValue[] (intptr,intptr,intptr,Android.Runtime.JValue[]) <IL 0x00062, 0xffffffff>
[mono-rt]   at Android.Runtime.JNIEnv.CallVoidMethod (intptr,intptr,Android.Runtime.JValue[]) [0x00040] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:504
[mono-rt]   at Android.App.Activity.RunOnUiThread (Java.Lang.IRunnable) [0x0002d] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/Mono.Android/platforms/android-19/src/generated/Android.App.Activity.cs:4160
[mono-rt]   at Android.App.Activity.RunOnUiThread (System.Action) [0x00000] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/Mono.Android/src/Android.App/Activity.cs:23
[mono-rt]   at Xamarin.Forms.Forms/AndroidPlatformServices.BeginInvokeOnMainThread (System.Action) <IL 0x0000b, 0x0008f>
[mono-rt]   at Xamarin.Forms.Device.BeginInvokeOnMainThread (System.Action) <IL 0x00006, 0x0006f>
[mono-rt]   at Xamarin.Forms.BindingExpression/BindingExpressionPart.PropertyChanged (object,System.ComponentModel.PropertyChangedEventArgs) <IL 0x00087, 0x00467>
[mono-rt]   at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs) <IL 0x00027, 0x00067>
[mono-rt]   at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs) <IL 0x00027, 0x00067>
[mono-rt]   at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs) <IL 0x00027, 0x00067>
[mono-rt]   at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs) <IL 0x00027, 0x00067>
[mono-rt]   at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs) <IL 0x00027, 0x00067>
[mono-rt]   at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs) <IL 0x00027, 0x00067>
[mono-rt]   at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs) <IL 0x00027, 0x00067>
[mono-rt]   at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs) <IL 0x00027, 0x00067>
[mono-rt]   at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs) <IL 0x00027, 0x00067>
[mono-rt]   at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs) <IL 0x00059, 0xffffffff>
[mono-rt]   at GalaSoft.MvvmLight.ObservableObject.RaisePropertyChanged<T> (System.Linq.Expressions.Expression`1<System.Func`1<T>>) [0x00011] in c:\MvvmLight\Source\GalaSoft.MvvmLight\GalaSoft.MvvmLight (PCL)\ObservableObject.cs:250
[mono-rt]   at XF_MemoryLeak.Item.set_Name (string) [0x00044] in /Users/prashantvc/Desktop items/Xamarin/108542/XF_MemoryLeak/XF_MemoryLeak/XF_MemoryLeak/Item.cs:30
[mono-rt]   at XF_MemoryLeak.ItemRepository.RefreshItems () [0x00069] in /Users/prashantvc/Desktop items/Xamarin/108542/XF_MemoryLeak/XF_MemoryLeak/XF_MemoryLeak/ItemRepository.cs:29
[mono-rt]   at XF_MemoryLeak.Views.FirstPage.<InitializeLayout>m__0 (object,System.EventArgs) [0x0000b] in /Users/prashantvc/Desktop items/Xamarin/108542/XF_MemoryLeak/XF_MemoryLeak/XF_MemoryLeak/Views/FirstPage.cs:29
[mono-rt]   at Xamarin.Forms.Button.SendClicked () <IL 0x00027, 0x0014f>
[mono-rt]   at Xamarin.Forms.Platform.Android.ButtonRenderer/ButtonClickListener.OnClick (Android.Views.View) <IL 0x00015, 0x0010b>
[mono-rt]   at Android.Views.View/IOnClickListenerInvoker.n_OnClick_Landroid_view_View_ (intptr,intptr,intptr) [0x00011] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/Mono.Android/platforms/android-19/src/generated/Android.Views.View.cs:1840
[mono-rt]   at (wrapper dynamic-method) object.722398ba-9ac4-4c3e-8436-b2f93709dd5d (intptr,intptr,intptr) <IL 0x00017, 0x00043>
[mono-rt]   at (wrapper native-to-managed) object.722398ba-9ac4-4c3e-8436-b2f93709dd5d (intptr,intptr,intptr) <IL 0x00023, 0xffffffff>
[mono-rt] 
[mono-rt] =================================================================
[mono-rt] Got a SIGSEGV while executing native code. This usually indicates
[mono-rt] a fatal error in the mono runtime or one of the native libraries 
[mono-rt] used by your application.
Comment 1 Parmendra Kumar 2014-12-19 12:05:22 UTC
I have checked this issue with attached sample project. I am also getting memory leak exception.
Please check the screencast and application output and let we know if I have missed anything.

Screencast: http://www.screencast.com/t/eDiOqBRlbE2

Applicationoutput Log: https://gist.github.com/Parmendrak/637cf6f86f6ef2be3e2b

Ide Log: https://gist.github.com/Parmendrak/49ab1ceacf5fd16343b7

Environment info:
=== Xamarin Studio ===

Version 5.5.4 (build 15)
Installation UUID: 1a096c6f-0678-402e-89b2-a2c10f7e80e4
Runtime:
	Mono 3.10.0 ((detached/92c4884)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000031

=== Xamarin.Android ===

Version: 4.20.0.28 (Business Edition)
Android SDK: /Users/360_macmini/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		3.2    (API level 13)
		4.0    (API level 14)
		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)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Apple Developer Tools ===

Xcode 6.1 (6602)
Build 6A1052c

=== Xamarin.iOS ===

Version: 8.4.0.47 (Business Edition)
Hash: 7244769
Branch: 
Build date: 2014-12-11 14:54:30-0500

=== Xamarin.Mac ===

Version: 1.10.0.18 (Business Edition)

=== Build Information ===

Release ID: 505040015
Git revision: f93940a35458a18052f1a25e106e62ca970d9c40
Build date: 2014-11-19 15:32:41-05
Xamarin addins: dc23cbd91a3a0e1d326328e1229e86c942a49ec8

=== Operating System ===

Mac OS X 10.9.4
Darwin ShrutiMac.local 13.3.0 Darwin Kernel Version 13.3.0
    Tue Jun  3 21:27:35 PDT 2014
    root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64
Comment 2 GeniusInPyjamas 2015-04-02 17:36:18 UTC
Error still exists in Xamarin.Forms 1.4.2.6353-pre2

 Unhandled Exception:
System.ArgumentException: 'jobject' must not be IntPtr.Zero.
Parameter name: jobject
at Android.Runtime.JNIEnv.CallVoidMethod (IntPtr jobject, IntPtr jmethod, Android.Runtime.JValue[] parms) [0x00010] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.21-series/38ac51a9/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:500 
at Android.Widget.AdapterView.set_OnItemClickListener (IOnItemClickListener value) [0x00043] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.21-series/38ac51a9/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Android.Widget.AdapterView.cs:944 
at Xamarin.Forms.Platform.Android.ListViewAdapter.Dispose (Boolean disposing) [0x00000] in <filename unknown>:0 
at Java.Lang.Object.Finalize () [0x00056] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.21-series/38ac51a9/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:61
Comment 3 Parmendra Kumar 2015-04-03 06:02:04 UTC
I have checked this issue with 1.4.2.6353-pre2 and getting same behavior mentioned in the bug description.

Hence confirm this issue.
Comment 4 GeniusInPyjamas 2015-04-03 06:05:46 UTC
I think i resolve the issue using http://blog.cloush.com/?p=12
I will do more tests checking if the issue is gone.
Comment 5 m.satzer 2015-04-03 07:13:36 UTC
Same crash in 1.4.2.6353-pre2 for me, confirming too.
The workaround suggested by GeniusInPyjamas is quite harsh, since i can forget my whole xaml this way... at least it seems to work
Comment 6 Steve Resnick 2015-04-28 08:17:00 UTC
I'm hitting the same issue on Xamarin Forms 1.4.0.6341. It's a showstopper for me, as the app is unstable. The workaround suggested by GeniusInPyjamas didn't help on this build.

=====================

04-24 16:24:11.262 E/mono    (19479): Unhandled Exception:
04-24 16:24:11.262 E/mono    (19479): System.ArgumentException: 'jobject' must not be IntPtr.Zero.
04-24 16:24:11.262 E/mono    (19479): Parameter name: jobject
04-24 16:24:11.262 E/mono    (19479):   at Android.Runtime.JNIEnv.CallVoidMethod (IntPtr jobject, IntPtr jmethod, Android.Runtime.JValue[] parms) [0x00010] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.21-series/38ac51a9/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:500 
In mgmain JNI_OnLoad
04-24 16:24:11.262 E/mono    (19479):   at Android.Widget.AdapterView.set_OnItemClickListener (IOnItemClickListener value) [0x00043] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.21-series/38ac51a9/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Android.Widget.AdapterView.cs:944 
04-24 16:24:11.262 E/mono    (19479):   at Xamarin.Forms.Platform.Android.ListViewAdapter.Dispose (Boolean disposing) [0x00000] in <filename unknown>:0 
04-24 16:24:11.262 E/mono    (19479):   at Java.Lang.Object.Finalize () [0x00056] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.21-series/38ac51a9/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:61 
04-24 16:24:11.328 F/libc    (19479): bionic/libstdc++/src/pure_virtual.cpp:6: void __cxa_pure_virtual(): assertion "!"Pure virtual function called. Are you calling virtual methods from a destructor?"" failed
04-24 16:24:11.331 F/libc    (19479): Fatal signal 6 (SIGABRT) at 0x00004c17 (code=-6), thread 19479 (hefrontpack.app)
Comment 7 peter cresswell 2015-05-14 20:00:59 UTC
Think this is a duplicate of https://bugzilla.xamarin.com/show_bug.cgi?id=25845 perhaps?
Comment 8 Eric Maupin 2015-05-27 17:57:05 UTC
Please note that there are two separate exceptions listed here. The initial bug report is aboug one coming from GetDesiredSize. The one mentioned by other commenters coming from set_OnItemClickListener is a different issue and is tracked by bug 25845.

"System.ArgumentException: 'jobject' must not be IntPtr.Zero." is a general exception not dissimilar to NullReferenceException in that each time it shows up, you have to look at the stack trace to see if it is the same bug or not.
Comment 9 Paul Diston 2016-04-14 13:35:36 UTC
I am running into a very similar, if not the same issue as described here. When will this be addressed? Is there anything I can do to stop this exception crashing my app as it doesn't seem to be caught in standard try/catch code?
Comment 10 Paul Diston 2016-04-14 13:37:16 UTC
For reference this is the exception that I can see in Logcat :-

04-14 13:30:54.738: E/mono-rt(5002): Stacktrace:
04-14 13:30:54.738: E/mono-rt(5002):   at <unknown> <0xffffffff>
04-14 13:30:54.738: E/mono-rt(5002):   at (wrapper managed-to-native) object.wrapper_native_0x41560533 (intptr,intptr,intptr,Android.Runtime.JValue*) <0xffffffff>
04-14 13:30:54.738: E/mono-rt(5002):   at (wrapper delegate-invoke) <Module>.invoke_void_intptr_intptr_intptr_JValue* (intptr,intptr,intptr,Android.Runtime.JValue*) <0xffffffff>
04-14 13:30:54.738: E/mono-rt(5002):   at Android.Runtime.JNIEnv.CallVoidMethod (intptr,intptr,Android.Runtime.JValue*) <0x00097>
04-14 13:30:54.738: E/mono-rt(5002):   at Android.Views.View.Measure (int,int) <0x00193>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.Platform.Android.ViewRenderer`2<TKey_REF, TValue_REF>.GetDesiredSize (int,int) <0x0005b>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.Platform.Android.LabelRenderer.GetDesiredSize (int,int) <0x00363>
04-14 13:30:54.738: E/mono-rt(5002):   at Skillweb.Tracking.Droid.Controls.MyLabelRenderer.GetDesiredSize (int,int) <0x000c7>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.Platform.Android.Platform.Xamarin.Forms.IPlatform.GetNativeSize (Xamarin.Forms.VisualElement,double,double) <0x00247>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.VisualElement.OnSizeRequest (double,double) <0x00203>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.VisualElement.GetSizeRequest (double,double) <0x0018f>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.VisualElement,Xamarin.Forms.Rectangle) <0x00297>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.Grid.LayoutChildren (double,double,double,double) <0x0046b>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.Layout.UpdateChildrenLayout () <0x002f7>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.Layout.OnSizeAllocated (double,double) <0x00037>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.VisualElement.SizeAllocated (double,double) <0x00053>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.Layout.OnChildMeasureInvalidated (Xamarin.Forms.VisualElement,Xamarin.Forms.InvalidationTrigger) <0x0029b>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.Layout.OnChildMeasureInvalidated (object,System.EventArgs) <0x000b3>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.VisualElement.InvalidateMeasure (Xamarin.Forms.InvalidationTrigger) <0x00053>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.Label.OnTextPropertyChanged (Xamarin.Forms.BindableObject,object,object) <0x000ff>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty,Xamarin.Forms.BindableObject/BindablePropertyContext,object,bool,Xamarin.Forms.BindableObject/SetValueFlags,bool) <0x0029f>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty,object,Xamarin.Forms.BindableObject/SetValueFlags,Xamarin.Forms.BindableObject/SetValuePrivateFlags) <0x002eb>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.BindingExpression.ApplyCore (object,Xamarin.Forms.BindableObject,Xamarin.Forms.BindableProperty,bool) <0x00703>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.BindingExpression.Apply (object,Xamarin.Forms.BindableObject,Xamarin.Forms.BindableProperty) <0x0011b>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.Binding.Apply (object,Xamarin.Forms.BindableObject,Xamarin.Forms.BindableProperty) <0x000cb>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.BindableObject.ApplyBindings (object,bool) <0x000b7>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.BindableObject.ApplyBindings (object) <0x0001f>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.BindableObject.SetInheritedBindingContext (Xamarin.Forms.BindableObject,object) <0x000af>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.Element.OnBindingContextChanged () <0x0006f>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.View.OnBindingContextChanged () <0x000e3>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.Grid.OnBindingContextChanged () <0x0001b>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.BindableObject.SetInheritedBindingContext (Xamarin.Forms.BindableObject,object) <0x000bf>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.Element.OnBindingContextChanged () <0x0006f>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.Cell.OnBindingContextChanged () <0x00013>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.BindableObject.BindingContextPropertyBindingPropertyChanged (Xamarin.Forms.BindableObject,object,object) <0x00057>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty,Xamarin.Forms.BindableObject/BindablePropertyContext,object,bool,Xamarin.Forms.BindableObject/SetValueFlags,bool) <0x0029f>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty,object,Xamarin.Forms.BindableObject/SetValueFlags,Xamarin.Forms.BindableObject/SetValuePrivateFlags) <0x002eb>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty,object,bool,bool) <0x00113>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty,object) <0x00033>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.BindableObject.set_BindingContext (object) <0x00027>
04-14 13:30:54.738: E/mono-rt(5002):   at Xamarin.Forms.TemplatedItemsList`2/<UnhookItem>d__119<TKey_REF, TValue_REF>.MoveNext () <0x001f7>
04-14 13:30:54.738: E/mono-rt(5002):   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start<Xamarin.Forms.TemplatedItemsList`2/<UnhookItem>d__119<Xamarin.Forms.ItemsView`1<Xamarin.Forms.Cell>, Xamarin.Forms.Cell>> (Xamarin.Forms.TemplatedItemsList`2/<UnhookItem>d__119<Xamarin.Forms.ItemsView`1<Xamarin.Forms.Cell>, Xamarin.Forms.Cell>&) <0x0012b>
04-14 13:30:54.738: E/mono-rt(5002):   at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start<Xamarin.Forms.TemplatedItemsList`2/<UnhookItem>d__119<Xamarin.Forms.ItemsView`1<Xamarin.Forms.Cell>, Xamarin.Forms.Cell>> (Xamarin.Forms.TemplatedItemsList`2/<UnhookItem>d__119<Xamarin.Forms.ItemsView`1<Xamarin.Forms.Cell>, Xamarin.Forms.Cell>&) <0x0001f>
04-14 13:30:54.748: E/mono-rt(5002):   at Xamarin.Forms.TemplatedItemsList`2<TKey_REF, TValue_REF>.UnhookItem (TValue_REF) <0x001ab>
04-14 13:30:54.748: E/mono-rt(5002):   at Xamarin.Forms.TemplatedItemsList`2<TKey_REF, TValue_REF>.OnProxyCollectionChanged (object,System.Collections.Specialized.NotifyCollectionChangedEventArgs,bool) <0x00f47>
04-14 13:30:54.748: E/mono-rt(5002):   at Xamarin.Forms.TemplatedItemsList`2<TKey_REF, TValue_REF>.OnProxyCollectionChanged (object,System.Collections.Specialized.NotifyCollectionChangedEventArgs) <0x00027>
04-14 13:30:54.748: E/mono-rt(5002):   at Xamarin.Forms.TemplatedItemsList`2<TKey_REF, TValue_REF>.OnItemsSourceChanged (bool) <0x0021b>
04-14 13:30:54.748: E/mono-rt(5002):   at Xamarin.Forms.TemplatedItemsList`2<TKey_REF, TValue_REF>.BindableOnPropertyChanged (object,System.ComponentModel.PropertyChangedEventArgs) <0x0006b>
04-14 13:30:54.748: E/mono-rt(5002):   at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs) <0xffffffff>
04-14 13:30:54.748: E/mono-rt(5002):   at Xamarin.Forms.BindableObject.OnPropertyChanged (string) <0x0004f>
04-14 13:30:54.748: E/mono-rt(5002):   at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty,Xamarin.Forms.BindableObject/BindablePropertyContext,object,bool,Xamarin.Forms.BindableObject/SetValueFlags,bool) <0x0026b>
04-14 13:30:54.748: E/mono-rt(5002):   at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty,object,Xamarin.Forms.BindableObject/SetValueFlags,Xamarin.Forms.BindableObject/SetValuePrivateFlags) <0x002eb>
04-14 13:30:54.748: E/mono-rt(5002):   at Xamarin.Forms.BindingExpression.ApplyCore (object,Xamarin.Forms.BindableObject,Xamarin.Forms.BindableProperty,bool) <0x00703>
04-14 13:30:54.748: E/mono-rt(5002):   at Xamarin.Forms.BindingExpression.Apply (bool) <0x000a7>
04-14 13:30:54.748: E/mono-rt(5002):   at Xamarin.Forms.BindingExpression/BindingExpressionPart.<PropertyChanged>b__38_0 () <0x00023>
04-14 13:30:54.748: E/mono-rt(5002):   at Java.Lang.Thread/RunnableImplementor.Run () <0x0003f>
04-14 13:30:54.748: E/mono-rt(5002):   at Java.Lang.IRunnableInvoker.n_Run (intptr,intptr) <0x0003f>
04-14 13:30:54.748: E/mono-rt(5002):   at (wrapper dynamic-method) object.72d5c967-989a-43b7-afcb-35081869631a (intptr,intptr) <0x0003b>
04-14 13:30:54.748: E/mono-rt(5002):   at (wrapper native-to-managed) object.72d5c967-989a-43b7-afcb-35081869631a (intptr,intptr) <0xffffffff>
04-14 13:30:54.748: E/mono-rt(5002):   at <unknown> <0xffffffff>
04-14 13:30:54.748: E/mono-rt(5002):   at (wrapper managed-to-native) object.wrapper_native_0x41560533 (intptr,intptr,intptr,Android.Runtime.JValue*) <0xffffffff>
04-14 13:30:54.748: E/mono-rt(5002):   at (wrapper delegate-invoke) <Module>.invoke_void_intptr_intptr_intptr_JValue* (intptr,intptr,intptr,Android.Runtime.JValue*) <0xffffffff>
04-14 13:30:54.748: E/mono-rt(5002):   at Android.Runtime.JNIEnv.CallVoidMethod (intptr,intptr,Android.Runtime.JValue*) <0x00097>
04-14 13:30:54.748: E/mono-rt(5002):   at Android.App.Activity.RunOnUiThread (Java.Lang.IRunnable) <0x00137>
04-14 13:30:54.748: E/mono-rt(5002):   at Android.App.Activity.RunOnUiThread (System.Action) <0x00033>
04-14 13:30:54.748: E/mono-rt(5002):   at Xamarin.Forms.Forms/AndroidPlatformServices.BeginInvokeOnMainThread (System.Action) <0x00053>
04-14 13:30:54.748: E/mono-rt(5002):   at Xamarin.Forms.Device.BeginInvokeOnMainThread (System.Action) <0x0002b>
04-14 13:30:54.748: E/mono-rt(5002):   at Xamarin.Forms.BindingExpression/BindingExpressionPart.PropertyChanged (object,System.ComponentModel.PropertyChangedEventArgs) <0x001c7>
04-14 13:30:54.748: E/mono-rt(5002):   at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs) <0xffffffff>
04-14 13:30:54.748: E/mono-rt(5002):   at GalaSoft.MvvmLight.ObservableObject.RaisePropertyChanged (string) <0x0005b>
04-14 13:30:54.748: E/mono-rt(5002):   at Skillweb.Tracking.ViewModel.ExtendedViewModelBase.RaisePropertyChanged (string) <0x00027>
04-14 13:30:54.748: E/mono-rt(5002):   at Skillweb.Tracking.ViewModel.ExtendedViewModelBase.set_PushNotifications (System.Collections.ObjectModel.ObservableCollection`1<Skillweb.Tracking.ViewModel.PushNotificationViewModel>) <0x0003b>
04-14 13:30:54.748: E/mono-rt(5002):   at Skillweb.Tracking.ViewModel.PushNotificationsViewModel.RefreshPushNotifications () <0x00017>
04-14 13:30:54.748: E/mono-rt(5002):   at Skillweb.Tracking.ViewModel.ExtendedViewModelBase.ProcessRefreshPushNotifications (Skillweb.Tracking.ViewModel.MessageResponse) <0x000eb>
04-14 13:30:54.748: E/mono-rt(5002):   at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object (object,intptr,intptr,intptr) <0xffffffff>
04-14 13:30:54.748: E/mono-rt(5002):   at <unknown> <0xffffffff>
04-14 13:30:54.748: E/mono-rt(5002):   at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) <0xffffffff>
04-14 13:30:54.748: E/mono-rt(5002):   at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x000ab>
04-14 13:30:54.748: E/mono-rt(5002):   at System.Reflection.MethodBase.Invoke (object,object[]) <0x00047>
04-14 13:30:54.748: E/mono-rt(5002):   at GalaSoft.MvvmLight.Helpers.WeakAction`1<T_REF>.Execute (T_REF) <0x000e7>
04-14 13:30:54.748: E/mono-rt(5002):   at GalaSoft.MvvmLight.Helpers.WeakAction`1<T_REF>.ExecuteWithObject (object) <0x00037>
04-14 13:30:54.748: E/mono-rt(5002):   at GalaSoft.MvvmLight.Messaging.Messenger.SendToList<T_REF> (T_REF,System.Collections.Generic.IEnumerable`1<GalaSoft.MvvmLight.Messaging.Messenger/WeakActionAndToken>,System.Type,object) <0x0026f>
04-14 13:30:54.748: E/mono-rt(5002):   at GalaSoft.MvvmLight.Messaging.Messenger.SendToTargetOrType<T_REF> (T_REF,System.Type,object) <0x0032f>
04-14 13:30:54.748: E/mono-rt(5002):   at GalaSoft.MvvmLight.Messaging.Messenger.Send<T_REF> (T_REF,object) <0x00037>
04-14 13:30:54.748: E/mono-rt(5002):   at Skillweb.Tracking.ViewModel.ExtendedViewModelBase.SendActionMessage<T_REF> (Skillweb.Tracking.ViewModel.ActionMessageType) <0x00097>
04-14 13:30:54.748: E/mono-rt(5002):   at Skillweb.Tracking.ViewModel.ManifestViewModel.ExecuteDisplayPushNotifications () <0x0002b>
04-14 13:30:54.748: E/mono-rt(5002):   at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <0xffffffff>
04-14 13:30:54.748: E/mono-rt(5002):   at <unknown> <0xffffffff>
04-14 13:30:54.748: E/mono-rt(5002):   at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) <0xffffffff>
04-14 13:30:54.748: E/mono-rt(5002):   at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x000ab>
04-14 13:30:54.748: E/mono-rt(5002):   at System.Reflection.MethodBase.Invoke (object,object[]) <0x00047>
04-14 13:30:54.748: E/mono-rt(5002):   at GalaSoft.MvvmLight.Helpers.WeakAction.Execute () <0x0008f>
04-14 13:30:54.748: E/mono-rt(5002):   at GalaSoft.MvvmLight.Command.RelayCommand.Execute (object) <0x0008b>
04-14 13:30:54.748: E/mono-rt(5002):   at Skillweb.Core.ViewModel.AnalyticRelayCommand.Execute (object) <0x000af>
04-14 13:30:54.748: E/mono-rt(5002):   at Xamarin.Forms.MenuItem.Activate () <0x0005f>
04-14 13:30:54.748: E/mono-rt(5002):   at Xamarin.Forms.Platform.Android.GenericMenuClickListener.OnMenuItemClick (Android.Views.IMenuItem) <0x00027>
04-14 13:30:54.748: E/mono-rt(5002):   at Android.Views.IMenuItemOnMenuItemClickListenerInvoker.n_OnMenuItemClick_Landroid_view_MenuItem_ (intptr,intptr,intptr) <0x00063>
04-14 13:30:54.748: E/mono-rt(5002):   at (wrapper dynamic-method) object.c98ee390-cc24-4e6d-be7f-8b0f3c358533 (intptr,intptr,intptr) <0x0004b>
04-14 13:30:54.748: E/mono-rt(5002):   at (wrapper native-to-managed) object.c98ee390-cc24-4e6d-be7f-8b0f3c358533 (intptr,intptr,intptr) <0xffffffff>
04-14 13:30:54.748: E/mono-rt(5002): Attempting native Android stacktrace:
04-14 13:30:54.768: E/mono-rt(5002):   at android_atomic_inc+8 [0x400f35d8]
04-14 13:30:54.768: E/mono-rt(5002):   at SkPaint::operator=(SkPaint const&)+10 [0x404d473b]
04-14 13:30:54.768: E/mono-rt(5002):   at dvmPlatformInvoke+112 [0x4153134c]
04-14 13:30:54.768: E/mono-rt(5002):   at dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+398 [0x41561fcf]
04-14 13:30:54.768: E/mono-rt(5002):   at ???+169952 [0x4153a7e0]
04-14 13:30:54.768: E/mono-rt(5002):   at dvmMterpStd(Thread*)+76 [0x41541c6c]
04-14 13:30:54.768: E/mono-rt(5002):   at dvmInterpret(Thread*, Method const*, JValue*)+184 [0x4153f304]
04-14 13:30:54.768: E/mono-rt(5002):   at dvmCallMethodA(Thread*, Method const*, Object*, bool, JValue*, jvalue const*)+354 [0x415742c7]
04-14 13:30:54.768: E/mono-rt(5002):   at ???+324969 [0x41560569]
04-14 13:30:54.768: E/mono-rt(5002):   at ???+182164 [0x6281c794]
Comment 11 Paul Diston 2017-02-17 13:06:51 UTC
Has there been any progress made on this issue? We are now seeing this issue 10 months on.
Comment 12 Rui Marinho 2017-05-26 14:28:51 UTC
Thank you for taking the time to submit this report. After reviewing the description of this bug, we believe it no longer affects the current version of Xamarin.Forms. If you are still experiencing the issue after updating your packages, please reopen this report with an attached reproduction.
Comment 13 Rui Marinho 2017-05-26 14:31:22 UTC
Created attachment 22504 [details]
UpdatedSampleLeakWith234

I updated the sample with Xamarin 2.3.4 and the issue doesn0't appear even after going to the page with the list 100 times.