Bug 50681 - Out of memory while debugging in VS2017 RC
Summary: Out of memory while debugging in VS2017 RC
Status: RESOLVED NORESPONSE
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Debugger ()
Version: unspecified
Hardware: PC Windows
: --- blocker
Target Milestone: ---
Assignee: Joaquin Jares
URL:
Depends on:
Blocks:
 
Reported: 2016-12-22 19:49 UTC by Jerome Laban
Modified: 2017-06-21 15:03 UTC (History)
7 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 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 NORESPONSE

Description Jerome Laban 2016-12-22 19:49:31 UTC
# Steps to reproduce
Build a very large iOS app, with a lot of code, which produces a very large mdb file (> 2.5MB)

# Expected behavior
Breakpoint can be set.

# Actual behavior
OOM when placing a breakpoint.

# Supplemental info (logs, images, videos)
---------------------------
Microsoft Visual Studio
---------------------------
EXCEPTION: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at Mono.Debugging.Soft.SoftDebuggerSession.LoadMdbFile(String mdbFileName)
   at Mono.Debugging.Soft.SoftDebuggerSession.CheckBetterMatch(TypeMirror type, String file, Int32 line, Int32 column, Location found)
   at Mono.Debugging.Soft.SoftDebuggerSession.FindLocationByMethod(MethodMirror method, String file, Int32 line, Int32 column, Boolean& insideTypeRange)
   at Mono.Debugging.Soft.SoftDebuggerSession.FindLocationByType(TypeMirror type, String file, Int32 line, Int32 column, Boolean& genericMethod, Boolean& insideTypeRange)
   at Mono.Debugging.Soft.SoftDebuggerSession.ResolveBreakpoints(TypeMirror type)
   at Mono.Debugging.Soft.SoftDebuggerSession.HandleTypeLoadEvents(TypeLoadEvent[] events)
   at Mono.Debugging.Soft.SoftDebuggerSession.HandleEventSet(EventSet es)
   at Mono.Debugging.Soft.SoftDebuggerSession.EventHandler()

# Test environment (full version information)

Microsoft Visual Studio Enterprise 2017 RC
Version 15.0.26014.0 D15REL
Microsoft .NET Framework
Version 4.6.01586

Installed Version: Enterprise

Architecture Diagrams and Analysis Tools   00369-50000-00000-AA875
Microsoft Architecture Diagrams and Analysis Tools

Visual Basic 2017 RC   00369-50000-00000-AA875
Microsoft Visual Basic 2017 RC

Visual C# 2017 RC   00369-50000-00000-AA875
Microsoft Visual C# 2017 RC

Visual C++ 2017 RC   00369-50000-00000-AA875
Microsoft Visual C++ 2017 RC

Visual F# 4.1   00369-50000-00000-AA875
Microsoft Visual F# 4.1

Application Insights Tools for Visual Studio Package   8.4.01118.2
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2016   15.0.21206.0
ASP.NET and Web Tools 2016

ASP.NET Web Frameworks and Tools 2013   5.2.41123.0
For additional information, visit https://www.asp.net/

Azure App Service Tools v2.9.6   15.0.21130.0
Azure App Service Tools v2.9.6

Command Bus, Event Stream and Async Manager   Merq
Provides ICommandBus, IEventStream and IAsyncManager MEF services for loosely coupled Visual Studio extension components communication and integration.

Common Azure Tools   1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

GitHub.VisualStudio   2.1.1.4
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

JavaScript UWP Project System   2.0
JavaScript UWP Project System

KofePackagePackage Extension   1.0
KofePackagePackage Visual Studio Extension Detailed Info

Microsoft Continuous Delivery Tools for Visual Studio   0.1
Simplifying the configuration of continuous build integration and continuous build delivery from within the Visual Studio IDE.

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio   Mono.Debugging.VisualStudio
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager   4.0.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

SQL Server Data Tools   15.1.61124.0
Microsoft SQL Server Data Tools

TSCPackage Extension   1.0
TSCPackage Visual Studio Extension Detailed Info

TypeScript   2.1.3.0
TypeScript tools for Visual Studio

Visual C++ for Linux Development   1.0.6
Visual C++ for Linux Development

Visual Studio tools for CMake   1.0
Visual Studio tools for CMake

Visual Studio Tools for Universal Windows Apps   15.0.26009.00
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.

Xamarin   4.3.0.459 (7c3dcf2)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   7.1.0.13 (72366f7)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   10.4.0.33 (d93ae7e)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 1 Zoltan Varga 2016-12-22 20:08:16 UTC
-> VS.
Comment 2 Joaquin Jares 2016-12-23 13:39:38 UTC
Hi, Jerome. 

The mdb for the Android runtime is almost 8mb, so I'm thinking that size alone is not an issue. OTOH, you can't really set a breakpoint on that code. Based on the OutOfMemory I'm inclined to think of some kind of recursiveness not working properly. I'm not being able to repro, though. Can you share a brief snippet of the code you're trying to set a breakpoint too? That may give me a proper clue on what's happening. 

The other (better) option is a memory dump of the process at that point, so we can pinpoint exactly where the memory is being consumed.

Also, just in case you know, is this working in VS2015?

Thanks,
joj
Comment 4 Jose Gallardo 2017-06-21 14:48:16 UTC
As we didn't get more information to keep investigating the issue and there were several improvements since the bug was reported, I'm resolving the bug.
If you do still face this issue and think it needs more investigation, please add the requested information and reopen it including updated environment information.

Thanks
Comment 5 Jerome Laban 2017-06-21 15:03:59 UTC
I tried reproducing this issue since then, but could not with latest stable releases. Thanks!