Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 25939 [details]
Project to reproduce the issue
On UWP with Xamarin.Forms pushing and then popping a page with stacklayouts on it to the navigation stack several times will leak memory. This is quite possibly not a replicate of 45593, but instead that exact same error that was never fixed. The Xamarin.Forms version mentioned in that leaks memory just as 126.96.36.199934.
=== STEPS TO REPRODUCE
Either take the sample project attached, or create a simple one with the following setup:
- The main app should have a NavigationPage with the main page wrapped inside
- That main page should have a listview of elements
- Clicking on any of those elements should take the user to another page (call it details page), by pushing it to the stack
- Details page should have a back button that will pop the top of the navigation stack and taking it back to the main page
This navigation back-and-forth has to be done several times to see the memory usage increase. The problem is that the memory will never be released, GC will not collect it, even by forcing from either code or from the profiler.
You can take a snapshot in the profiler when the app starts and then navigate to a page and then back maybe 20, 30 times. Take another snapshot again, and then let VS analyse the difference.
Over longer periods of time this leads to crashes in every single UWP app with Xamarin.Forms.
This seems to be an UWP-only problem, I could not get this to be reproduced in iOS
=== EXPECTED BEHAVIOUR
Memory usage should normalise.
=== Visual Studio
Microsoft Visual Studio Enterprise 2017 (Enterpricy)
Microsoft .NET Framework
Installed Version: Enterprise
Visual Basic 2017 00369-60000-00001-AA750
Microsoft Visual Basic 2017
Visual C# 2017 00369-60000-00001-AA750
Microsoft Visual C# 2017
Visual F# 4.1 00369-60000-00001-AA750
Microsoft Visual F# 4.1
Application Insights Tools for Visual Studio Package 8.9.00809.2
Application Insights Tools for Visual Studio
ASP.NET and Web Tools 2017 15.0.30925.0
ASP.NET and Web Tools 2017
ASP.NET Core Razor Language Services 1.0
Provides languages services for ASP.NET Core Razor.
Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
Merq 1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.
Microsoft Visual Studio VC Package 1.0
Microsoft Visual Studio VC Package
Mono Debugging for Visual Studio 4.7.4-pre (c2d89eb)
Support for debugging Mono processes with Visual Studio.
NuGet Package Manager 4.4.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
TypeScript tools for Visual Studio
Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
Visual Studio Tools for Universal Windows Apps 15.0.27004.2008
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.
Package with IoT components for Visual Studio
Mac Extension for Visual Studio
Xamarin 188.8.131.52 (34c1b6c)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin.Android SDK 184.108.40.206 (HEAD/c2a33d8ea)
Xamarin.Android Reference Assemblies and MSBuild support.
Xamarin.iOS and Xamarin.Mac SDK 220.127.116.11 (51128b8)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
Thank you for your submission. At this time, all new reports should be made on the Xamarin.Forms GitHub Issues repository. Please resubmit this report at https://github.com/xamarin/Xamarin.Forms/issues. This Bugzilla report will now be closed and will not be monitored.