This project has moved and is read-only. For the latest updates, please go here.

HTML Help Workshop Crashes with an Access Violation

Topics: Developer Forum, User Forum
Sep 23, 2012 at 4:43 PM
Edited Sep 23, 2012 at 10:54 PM

I've been using SHFB for a long time for creating API docs in CHM format; however now that I've done this again after a while and right after upgrading to SHFB and the current Sandcastle version, I'm encountering a weird problem now: Everything runs fine until the CHM file is compiled. Then Windows pops up a message box saying "Microsoft HTML Help Workshop has stopped working" and "offers" me to kill the process for me.

SHFB's last few lines of build output are as follows:


Generating HTML Help 1 table of contents file...
    Last step completed in 00:00:00.0040
Generating HTML Help 1 index file...
    Last step completed in 00:00:00.0040
Generating HTML Help 1 project file...
    Last step completed in 00:00:00.1220
Compiling HTML Help 1 file...
C:\Users\Florian Haag\Programming\Projects\Lib\TwoLayeredGUI\Repository\doc\Help\Working\Build1xHelpFile.proj(41,5): error MSB6006: "HHC.EXE" exited with code -1073741819.
    Last step completed in 00:04:51.0100
SHFB: Error BE0043: Unexpected error detected in last build step.  See output above for details.

When choosing the "Debug" option in the error message box, VS shows me there's an access violation; apparently somewhere in hha.dll.

I don't know whether this is a problem originally caused by SHFB or whether Sandcastle itself generates an invalid project file or whether it's a downright HTML Help Workshop bug, but with SHFB being my frontend, I hope someone has an idea how to find out what this is caused by.

Update: I've just tried to compile an SHFB project that used to work (i.e. an old version from the repository), and I'm encountering the crash there, too. So, evidently something in the toolchain SHFB - Sandcastle must have been broken when I upgraded to the package.

I really appreciate any clue on how to find out how to fix this; please let me know if I can provide any information to help debugging this. As my project in question is open source, I can also provide a reproducible sample (links currently don't seem to work in this forum, though; the link buttons are disabled).

Thanks in advance!

Update 2: I have downgraded to SHFB and everything works again; yet I'd still like to know how to work around/fix that bug in newer versions.