[wix-users] heat.exe System.OutOfMemoryException help

Shintaro Takechi devst119 at gmail.com
Tue Jul 12 16:37:20 PDT 2016


I tried to run heat.exe with lots of files on the network and it gave me
OutOfMemoryException after waiting for an extended period of time.

heat.exe(0,0): error HEAT0001: Exception of type
'System.OutOfMemoryException' was thrown.
Exception Type: System.OutOfMemoryException
Stack Trace:
  at System.Text.StringBuilder.ExpandByABlock(Int32 minBlockCharCount)
  at System.Text.StringBuilder.Append(Char* value, Int32 valueCount)
  at System.Text.StringBuilder.Append(Char[] value, Int32 startIndex, Int32
charCount)
  at System.IO.StringWriter.Write(Char[] buffer, Int32 index, Int32 count)
  at System.Xml.XmlEncodedRawTextWriter.FlushBuffer()
  at System.Xml.XmlEncodedRawTextWriter.WriteAttributeTextBlock(Char* pSrc,
Char* pSrcEnd)
  at System.Xml.XmlEncodedRawTextWriter.WriteString(String text)
  at System.Xml.XmlEncodedRawTextWriterIndent.WriteString(String text)
  at System.Xml.XmlWellFormedWriter.WriteString(String text)
  at System.Xml.XmlWriter.WriteAttributeString(String localName, String
value)
  at
Microsoft.Tools.WindowsInstallerXml.Serialize.Component.OutputXml(XmlWriter
writer)
  at
Microsoft.Tools.WindowsInstallerXml.Serialize.ComponentGroup.OutputXml(XmlWriter
writer)
  at
Microsoft.Tools.WindowsInstallerXml.Serialize.Fragment.OutputXml(XmlWriter
writer)
  at Microsoft.Tools.WindowsInstallerXml.Serialize.Wix.OutputXml(XmlWriter
writer)
  at Microsoft.Tools.WindowsInstallerXml.Tools.Heat.Run(String[] args)
C:\Program Files (x86)\MSBuild\Microsoft\WiX\v3.x\wix2010.targets(779,5):
error MSB3073: The command ""%WiX%\bin\Heat.exe" dir \\**SOMEWHERE ON
NETWORK** -cg ComponentGroupName -dr APPLICATIONFOLDER -srd -var
var.HarvestPath -ag -out Output.wxs" exited with code 1.

I thought may be its due to copying from network folder. So I modified it
by robocopying it to the local then trying the heap, but problem persisted.

heat.exe(0,0): error HEAT0001: Exception of type
'System.OutOfMemoryException' was thrown.
Exception Type: System.OutOfMemoryException
Stack Trace:
  at System.Text.StringBuilder.ExpandByABlock(Int32 minBlockCharCount)
  at System.Text.StringBuilder.Append(Char* value, Int32 valueCount)
  at System.Text.StringBuilder.Append(Char[] value, Int32 startIndex, Int32
charCount)
  at System.IO.StringWriter.Write(Char[] buffer, Int32 index, Int32 count)
  at System.Xml.XmlEncodedRawTextWriter.FlushBuffer()
  at System.Xml.XmlEncodedRawTextWriter.WriteAttributeTextBlock(Char* pSrc,
Char* pSrcEnd)
  at System.Xml.XmlEncodedRawTextWriter.WriteString(String text)
  at System.Xml.XmlEncodedRawTextWriterIndent.WriteString(String text)
  at System.Xml.XmlWellFormedWriter.WriteString(String text)
  at System.Xml.XmlWriter.WriteAttributeString(String localName, String
value)
  at
Microsoft.Tools.WindowsInstallerXml.Serialize.RegistryValue.OutputXml(XmlWriter
writer)
  at
Microsoft.Tools.WindowsInstallerXml.Serialize.Component.OutputXml(XmlWriter
writer)
  at
Microsoft.Tools.WindowsInstallerXml.Serialize.ComponentGroup.OutputXml(XmlWriter
writer)
  at
Microsoft.Tools.WindowsInstallerXml.Serialize.Fragment.OutputXml(XmlWriter
writer)
  at Microsoft.Tools.WindowsInstallerXml.Serialize.Wix.OutputXml(XmlWriter
writer)
  at Microsoft.Tools.WindowsInstallerXml.Tools.Heat.Run(String[] args)
C:\Program Files (x86)\MSBuild\Microsoft\WiX\v3.x\wix2010.targets(779,5):
error MSB3073: The command "robocopy.exe \\**SOMEWHERE ON NETWORK**
D:\**LOCAL LOCATION** *.* /V /MIR /NP /TEE /LOG:d:\some.log /XD MS_MapTiles
/XF *.ini /XF *.exe.config
"%WiX%\bin\Heat.exe" dir D:\**LOCAL LOCATION** -cg ComponentGroupName -dr
APPLICATIONFOLDER -srd -var var.HarvestPath -ag -out Output.wxs" exited
with code 1.

It is occurring in different file but it is consistently occuring.
The size of whole folder that I am trying to include comes out to be 8.56GB
with 17220 files and 1589 folders.
Would anybody know the solution for this?

Thank you very much.

Shintaro.


More information about the wix-users mailing list