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.

0

3 Answers 3

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?

8
  • We're getting a non-deterministic memory error (memory could not be read), only on some machines and only some of the time. We've tried giving the process 1GB of memory (we normally give it 512MB); I've asked the build person to give it 2GB to see what happens. Isn't 2GB the functional limit on a 32-bit machine? If we comment out a chunk of the doc set then it doesn't happen, but then if we restore that and comment out some other chunk the same is true, suggesting that it's not a problem in the content itself. Aug 31, 2011 at 21:13
  • Thanks for the data on file sizes! So it sounds like overall size isn't our problem here. What platform did you do your tests on? Aug 31, 2011 at 21:14
  • I tested it on a Win 7 32 with 2GB of RAM. The machine has no other software installed on it, as it was a fresh install. Could you provide the exact error?
    – Keltari
    Aug 31, 2011 at 21:20
  • Dont concern yourself with hardware issues. I am certain this is a software issue, not hardware.
    – Keltari
    Aug 31, 2011 at 21:24
  • I added the error to the question (getting kind of verbose for comments). Aug 31, 2011 at 21:40
3

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!

2
  • Can you please provide more clarity on how did you removed the keyword from the index?
    – checho
    Nov 10, 2014 at 8:55
  • The index is defined by the .hhk file in the CHM project. Remove the entries relating to the topic from this file (either manually by editing the text file, or stop them getting there in the first place by whatever process is building the .hhk file).
    – Craig Foot
    Oct 25, 2016 at 15:05
0

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

I'd test the code on a fresh install.

1
  • Good suggestion. We already did a fresh install of the version we were using (1.3) and then the latest patch (1.33) in case that solved the problem. No luck. Sep 1, 2011 at 1:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .