Bug 55016 - Mono 5.0 in XS/VS not compatible with Fody - out of memory exception when building
Summary: Mono 5.0 in XS/VS not compatible with Fody - out of memory exception when bui...
Status: RESOLVED ANSWERED
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2017-04-11 10:56 UTC by Stefan de Vogelaere
Modified: 2017-04-11 11:15 UTC (History)
2 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 GitHub or 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 ANSWERED

Description Stefan de Vogelaere 2017-04-11 10:56:00 UTC
The 5.0 version of mono used in the latest preview release of Visual Studio for Mac and Xamarin Studio is incompatible with Fody (https://github.com/Fody/Fody). When using this the compiler runs out of memory:

Error: Fody: An unhandled exception occurred:
Exception:
Out of memory
StackTrace:
  at (wrapper alloc) System.Object:AllocVector (intptr,intptr)
  at Microsoft.Cci.Pdb.MsfDirectory..ctor (Microsoft.Cci.Pdb.PdbReader reader, Microsoft.Cci.Pdb.PdbFileHeader head, Microsoft.Cci.Pdb.BitAccess bits) [0x000a5] in <d39e61ae2787473a851567b860d13696>:0 
  at Microsoft.Cci.Pdb.PdbFile.LoadFunctions (System.IO.Stream read, System.Collections.Generic.Dictionary`2[System.UInt32,Microsoft.Cci.Pdb.PdbTokenLine]& tokenToSourceMapping, System.String& sourceServerData, System.Int32& age, System.Guid& guid) [0x00027] in <d39e61ae2787473a851567b860d13696>:0 
  at Mono.Cecil.Pdb.PdbReader.PopulateFunctions () [0x00008] in <d39e61ae2787473a851567b860d13696>:0 
  at Mono.Cecil.Pdb.PdbReader.ProcessDebugHeader (Mono.Cecil.Cil.ImageDebugDirectory directory, System.Byte[] header) [0x00048] in <d39e61ae2787473a851567b860d13696>:0 
  at Mono.Cecil.ModuleDefinition.ProcessDebugHeader () [0x00012] in <b5a52cab1f0046ce9f68342127787868>:0 
  at Mono.Cecil.ModuleDefinition.ReadSymbols (Mono.Cecil.Cil.ISymbolReader reader) [0x00015] in <b5a52cab1f0046ce9f68342127787868>:0 
  at Mono.Cecil.ModuleReader.ReadSymbols (Mono.Cecil.ModuleDefinition module, Mono.Cecil.ReaderParameters parameters) [0x00047] in <b5a52cab1f0046ce9f68342127787868>:0 
  at Mono.Cecil.ModuleReader.CreateModuleFrom (Mono.Cecil.PE.Image image, Mono.Cecil.ReaderParameters parameters) [0x00076] in <b5a52cab1f0046ce9f68342127787868>:0 
  at Mono.Cecil.ModuleDefinition.ReadModule (System.IO.Stream stream, Mono.Cecil.ReaderParameters parameters) [0x00028] in <b5a52cab1f0046ce9f68342127787868>:0 
  at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x0000a] in <b5a52cab1f0046ce9f68342127787868>:0 
  at InnerWeaver.ReadModule () [0x00052] in <f6f9069078364b4db60945017a527c4a>:0 
  at InnerWeaver.Execute () [0x00019] in <f6f9069078364b4db60945017a527c4a>:0 
 ([Solution's Name])

Current solution is to revert to 4.8 in XS/VSforMac.
Comment 1 Marek Safar 2017-04-11 11:15:47 UTC
This is Mono.Cecil bug, please report the issue at https://github.com/jbevain/cecil/issues