Bug 14197 - OutOfMemoryException when building projects on Windows 8.1
Summary: OutOfMemoryException when building projects on Windows 8.1
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: unspecified
Hardware: PC Windows
: High critical
Target Milestone: master
Assignee: Bugzilla
URL:
: 14860 15043 ()
Depends on:
Blocks:
 
Reported: 2013-08-22 20:46 UTC by Martin
Modified: 2016-09-16 06:27 UTC (History)
4 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:
VERIFIED FIXED

Description Martin 2013-08-22 20:46:20 UTC
Xamarin Studio version: 4.1.9 (build 6)
OS: Windows 8.1 Professional Preview (64-bit)
Steps to reproduce: Build/re-build a project and a System.OutOfMemoryException is thrown (sometimes it happens the first time, other times it takes several builds to reproduce the bug) - sometimes Xamarin Studio just hard crashes and attaching a debugger shows an AccessViolationException happening at System.String.MakeSeperatorList which is being called by System.String.SplitInternal.

At the time being, I have only managed to reproduce the bug on Windows 8.1.

Exception information:
    System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
       at System.String.SplitInternal(Char[] separator, Int32 count, StringSplitOptions options)
       at System.String.Split(Char[] separator)
       at MonoDevelop.Ide.ImageService.GetStockIdForImageSpec(RuntimeAddin addin, String filename, IconSize size)
       at MonoDevelop.Ide.ImageService.GetStockIdForImageSpec(String filename, IconSize size)
       at MonoDevelop.Ide.ImageService.IsAnimation(String iconId, IconSize size)
       at MonoDevelop.Components.MainToolbar.StatusArea.LoadPixbuf(IconId image)
       at MonoDevelop.Components.MainToolbar.StatusArea.ShowMessageInner(IconId image, String message, Boolean isMarkup)
       at MonoDevelop.Components.MainToolbar.StatusArea.<ShowMessageInner>b__24()
       at GLib.Timeout.TimeoutProxy.Handler()

After looking at stack traces, it seems that sometimes a really really really huge string (with a length of 286.804.248, sometimes more, sometimes less) is passed to the String.Split method for some unknown reason.

At the time of the crash, Xamarin Studio is using around 1.2 GB of RAM.
Comment 1 Mikayla Hutchinson [MSFT] 2013-09-10 12:57:26 UTC
I can repro this.
Comment 2 Mikayla Hutchinson [MSFT] 2013-09-10 13:08:21 UTC
This is EXTREMELY strange. We have a string that appears to be holding a SpecializedStringCollection object. Maybe something is smashing the stack.
Comment 3 Mikayla Hutchinson [MSFT] 2013-09-10 13:17:05 UTC
Actually, it looks like it may be a bug in .NET Remoting. The bad value comes from StatusProgressMonitor, which is a transparent proxy on a MarshalByRefObject.
Comment 4 Mikayla Hutchinson [MSFT] 2013-09-10 13:40:26 UTC
Committed a workaround in https://github.com/mono/monodevelop/commit/7d8866a0f28044b3038ce397c779b97872084aef
Comment 5 Mikayla Hutchinson [MSFT] 2013-09-19 13:20:30 UTC
*** Bug 14860 has been marked as a duplicate of this bug. ***
Comment 6 Mikayla Hutchinson [MSFT] 2013-10-04 11:33:57 UTC
*** Bug 15043 has been marked as a duplicate of this bug. ***
Comment 7 Parmendra Kumar 2016-09-16 06:27:43 UTC
I have checked this issue with latest master build XamarinStudio-6.2.0.494_f6483f8a1c6d0790f2d8033a7e4d55e09b57a8bd and observed this issue has been fixed.


Hence closing this issue