HHC.exe Unexpectedly crashes

Aug 15, 2008 at 12:37 AM
This morning and for the last 4 weeks my SHFB project has been working fine. I'm building a HtmlHelp1.x file only.
This afternoon, I went to do a build and hhc.exe keeps crashing. I get the old "Microsoft HTML Help Compiler has stopped working" dialog about 4 minutes into the build.
I haven't changed any settings that I'm aware of, however I noticed that Windows Update installed some goodies last night (I have Vista Ultimate).
Thinking I needed to reinstall HtmlHelp again, I downloaded the latest version from microsoft's site, tried installing it and got a "your computer has a more recent version of HtmlHelp".

So I'm stuck.

Is there anywhere to see what the problem is? There is nothing in the SHFB logs that indicates a failure. Could it be some malformed/illegal Xml that hhc is choking on?

Any help would be greatly appreciated. 

Aug 15, 2008 at 2:56 AM
I'm running Vista Ultimate and have all the current OS updates and don't have any problems building Help 1 projects.  You might try a different project to see if it happens to others and also try building on a different PC if that's an option.  That should help isolate it to either the PC or the project.  If it's a multi-assembly project, you might try removing assemblies to see if one in particular causes the problem.  You can also use the API filter to eliminate namespaces and/or classes to see if there's something in particular that causes the issue.

Aug 15, 2008 at 3:42 AM
That there is no error message will make it difficult for Eric to help. Please try this....

I think SHFB will generate a HtmlHelp 1.x project file. Go to the working directory, open
this project file in the Microsoft Help Workshop and build it directly.

Best regards,
Aug 15, 2008 at 5:49 AM
Hi Eric,

So here's what I've discovered:
I can build my project as a website or in HtmlHelp2.x format, but hhc.exe crashes when I try to build a HtmlHelp1.
I created a simple 'Hello World' app and documented it using HtmlHelp1. It worked.
I tried building my original project on another PC (WinXP) and hhc.exe crashed!
So it must be my project and not a corrupt install of HtmlHelp.
In SHFB I enabled the 'Additional Content Only' plugin. It still crashed.
I created a new project, and added the same assemblies I am documenting, but did not add the conceptual content. It did NOT crash.
So must be something in my conceptual help. I'm in the process now of unwinding every topic I've added. Very frustrating, but intriguing as well.
I'll let you know what I find.


Aug 15, 2008 at 5:19 PM
I figured out what is causing my problem, but I still don't understand why...
It turns out I had an image called "Phoenix.HttpHandlers.png" that was causing hhc to crash. I thought maybe the extra period might have something
to do with it, so I renamed it to "Phoenix_HttpHandlers.png" and voila it worked.
But I have several images that have periods in the filenames. "Phoenix.DAL.png", "Phoenix.Utilities.png" etc. and they all work fine.
So I don't know why just that one would be a problem.

But anyways, the HtmlHelp1 compiles now so I'm happy.

If anyone else notices hhc mysteriously crashing, check the filenames of your images!  :)


Aug 15, 2008 at 8:13 PM
Thanks for the info.  I'll add it to the FAQ.  There's a known issue where if your path contains a folder name that ends with ".help" or ".hlp", it can cause lots of spurious HHC3002 and HHC3004 errors.  The fix is the same (change the period to an underscore in the folder name).  This may be related but in this case a filename with ".H" in it causes it to crash rather than generate errors.