OutofMemory Exception

Oct 28, 2008 at 8:00 PM
I looked through the Forums and only saw one other person mention this issue, but I've also been experiencing this issue.  I'm building several assemblies (26), and the machine has 4 GBs of RAM and when it throws the exception it is only using about 2GBs.  The BuildAssembler.exe is what program is running when the exception is thrown.  I'm using the SandCastle Help File Builder UI, but it doesn't appear to have anything to do with that.


Oct 28, 2008 at 10:09 PM
Edited Oct 28, 2008 at 10:11 PM
Hi Geoff,

There is a limit to the amount of RAM a process can use.  .NET might impose some of its own restrictions as well.  There's also the potential issue of memory fragmentation that can cause an OutOfMemoryException when a contiguous block of memory that's large enough to fit a particular structure (like an array) isn't available.

Unfortunately, the only solution seems to be building documentation for smaller groups of assemblies instead of building one large documentation set.

- Dave
Oct 29, 2008 at 1:32 AM
If building from within the help file builder GUI, try turning off the verbose logging option in the User Preferences so that it only shows the build steps when building the project.  On a large project, there is a lot of output from BuildAssembler and it can overwhelm the rich text box that is used to display it at the bottom of the main form.  You could also try building from the command line to see if that makes any difference.

Oct 29, 2008 at 1:11 PM
Thanks Dave and Eric for the suggestions.  Looks like I'm going to have to split out my assemblies into smaller groups/projects; even after trying Eric's suggestions I continued to get the OutofMemory exception.  We currently build with the assemblies all split out in the tool we use now, just wanted to see if we could try and build them all together in one big project using SandCastle.

Thanks again.