3

We are using Microsoft's HTML Help Workshop, specifically hhc.exe, to assemble a CHM file containing HTML-formatted documentation. Officially there is no limit on the size of a CHM file, but as our doc set has increased in size we have been getting more and more build failures. The error messages aren't great but it appears we are running out of memory; however, increasing the memory hasn't made a difference. (In recent weeks the doc set has increased about 25% in size; we tried doubling the memory.)

Our CHM file is 12MB, which doesn't seem large. Can we tune this, or have we reached the unofficial limits of what this tool can handle, at least on a 32-bit machine?

Edited to add:

The error we get is a pop-up with the following text:

hhc.exe - Application Error
[X] The instruction at "0x453217d8" referenced memory at "0x########".  The
memory could not be "read".
Click on OK to terminate the program.
Click on CANCEL to debug the program.
[OK] [Cancel]

We run this from an automated build that calls an Ant target that uses <exec> to invoke hhc.exe. The build machine is running Windows Server 2003 and has 4GB of memory on it.

A meta-question: my original question about file size has been answered; what should I do with this followup that resulted from the comments? Re-cast the question? Accept the answer to the original question? As you can see from my rep I'm new here.

Journeyman Geek
  • 133,878
Monica Cellio
  • 275
  • 4
  • 18

3 Answers3

4

I was having a similar issue with the HTML Help Workshop failing to compile my CHM, and my CHM was also about 12MB. It was providing the error message:

HTML Help Workshop: hhw.exe - Fatal Application Exit [X]
There is not enough memory available for this task. Quit one or more programs to increase available memory, and then try again.
[OK]

I was checking the logged output for the build process, and saw that in my index file there were too many topics assigned to a single keyword.

In this case, the build was working when a particular keyword had 7132 topics associated with it, but the build was failing when 7140 topics were assigned to that same keyword.

I removed the keyword from the index, and my CHM compiled successfully. This means that it looks like there is a limit on the number of topics that can be associated with a keyword -- I didn't find any reference in the documentation as to what this limit might be, but maybe my experience can help others.

I realise that assigning over 1000 topics to a particular keyword starts to defeat the point of an index anyway, and isn't a good idea!

3

The "bitness" of a machine has nothing to do with this process. Bitness refers to the amount of memory a processor can address. 32 bit machines can address 4GB of memory, far more than you need for this. And even, if you needed more, the machine would simply page memory. Which would slow the process down, but not prevent it from working.

I just downloaded and installed Microsoft's HTML Help Workshop and was able to decompile and recompile a handful of 15+ MB CHM files, including a 25 MB one. The problem is most likely something on the machine that is causing an issue, perhaps a virus scanner. Try disabling any virus scanners before you compile. Have you tried compiling the CHMs on a different machine? And why do you think you are running out of memory?

Keltari
  • 75,447
0

With the inconsistent pattern of the error, have you ruled out corrupt software installations?

I'd test the code on a fresh install.

surfasb
  • 22,896