Skip to main content
Inspiring
May 9, 2008
Question

Fatal Error: Unexpected error from Microsoft HTML compiler.

  • May 9, 2008
  • 24 replies
  • 9596 views

Although I get a happy message in a dialog box that says HTML Help has been sucessfully generated, the Output view tells a different story: Fatal Error: Unexpected error from Microsoft HTML compiler.

And, it does create a CHM, but when I try to open, it gives a Cannot Open File error. Then, when I try to compile again, I get an error that says "Cannot create compiled file. It may be open in another window...", which of course it is not, because I cannot open it.

So....I close everything down, restart, and try again - have done this about 6 times with no better result.

I am having way more problems with RH in the last 2 days than I have had with any software I can remember : ( - My company is building a V1 Enterprise level product, still in Alpha testing, and it's more stable. Arggggh....


Should I reinstall RH? Scrap the project and start from scratch? (no......too many hours investing in TOCs, settings, importing, templates, css, ect)

Any insights? Suggestions? Going home now....

Thanks.
This topic has been closed for replies.

24 replies

albertos30552938
Participant
July 24, 2015

Same issue for me.

I have a book with referenced images: it turned out that some .png names were too long and Microsoft help generator was crashing due to filename length issue.

So basically the filename/path length issue does apply not only to project path but also to single filenames. Quite obvious once you realize it, but since this is a legacy project it took some time to find the solution.

HTH,

    Alberto

Participating Frequently
July 11, 2012

Hi everyone!

I've just faced with the same problem working with RH 9. I've investigated all replies to this post and would like to share a few comments from my side.

In my situation, the compiler shows the fatal error message when it starts processing the .hhc file. (Still the file is fine,) I would really appreciate if RH development team rewrites the message, because the "Fatal Error: Unexpected error from Microsoft HTML compiler.", in fact means nothing.

Well, let us get back to the problem. I've managed to fix it. First of all, it looks like the CPD file does not cause the problem. I've renamed it (deleted it), but it did not actually help. I've checked names of files and folders and eliminated all spaces and dots. It didn't help either. Finally I've placed the folder with source project files to the root of partition, and it DID help. So, I suspect, the problem is with a path length. But in my situation it is even less than 256 characters. It is only 127 (along with names of .hhx, xpj. and other files.) Even path to the default destination folder is less than 256 characters.

I would also thank all for you for your advises and thoughts.

Jeff_Coatsworth
Community Expert
Community Expert
July 11, 2012

Best practices dictate keeping the path as short a possible - c:\projects\[project_name]\ is the recommended structure.

Known Participant
January 9, 2014

Hi Everyone,

I have some more info on this:

I had a situation yesterday where I had moved a project to a high level folder to try and get around the fatal compiler error, but it was still failing to compile.

So after an "interesting" couple of hours investogation, I'm happy to report that I eventually resolved it.

As mentioned in an earlier post, the html file just before the fatal error message in the Output View window tells you which topic is causing the problem:

Then it turns out that the problem was caused by some weird "broken" links in that topic.
They were quite hard to find because they weren't showing up as broken links, and the link tooltip confusingly suggested that the link was ok:

In this example, the link "Taking measurements" appears to be linked to "Taking_Measurements.htm".
However, upon opening the edit link dialog, you can see that something is wrong here:
Even though the link appears to be pointing at the correct topic file, there is no topic preview in the right pane.

When I looked at the html, the link was pointing to "Taking_Measuremnts.htm" outside of the moved project.

I think what has happened here is that even though I am using relative links in my project, having renamed this topic file at some stage, Robohelp has updated some (not all) links with explicit links. Then when I moved the project to a higher level folder to get around the compiler error, these explicit links still existed and were a) too long, and b) acting as weird half-broken links.

Once I correctred these links, I was able to compile the moved project ok.

Hope that helps.

Cheers,

Andy

Known Participant
July 21, 2011

Hi Everyone. Just thought I should add my experience here. Had exactly the same issue myself today and came here looking for the solution. Eventually solved it myself - for me it was caused by renaming the project - the .hhc and .hhk files still had the old project name. As soon as I renamed them -> hey presto, it compiled ok. Apologies if this was already explained elsewhere. IMHO renaming the project in Robohelp ought to take care of this really, since it cause such an unfriendly error.

Peter Grainge
Community Expert
Community Expert
July 21, 2011

If you rename a project in RoboHelp it does rename those files. Usually such problems are where people have changed the name in Windows Explorer.


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
Known Participant
July 21, 2011

Thank you Peter. I thought I had used the RH rename function, but in truth I'm not 100% sure (it was a long time ago - I've been using Webhelp, but now a colleague needs a chm version). Also I can compile locally but not on the network, so my "solution" is clearly not the full picture.

Participant
December 10, 2010

Hi, Folks!

I had the same problem and just wanted to mention how I solved it -in case it helps anybody. I followed the suggestion above of noting in the compiler output view what files caused the compiler to fail and then deactivating those files until I could determine exactly which file caused the problem.

-My first failure was in the TOC (.hhc) so I renamed it so the compiler would skip it -avoiding that failure.

-On the next compile it failed with the Index (.hhk) file, so I renamed the Index so it would not compile.

-On the next compile it began compiling the topics (having skipped the renamed TOC and Index) but it failed when it reached a particular topic.

-I continued disabling failed topics until I determined they all had links to one topic that had some suspicious problems. When I removed all references and links to that suspicious topic the compilation succeeded, and it said the one suspicious topic "was not compiled". I replaced that problem topic and restored its links to other topics, the TOC, the Index and the Context Sensitive map file. Then everything worked fine.

-I believe the problem in the topic was caused during the conversion of the project from WinHelp. The topic had a very long title in the body of the text including an ampersand and carriage return. Maybe that caused a problem with an XML file somewhere.

-Note that the references to the bad topic caused the TOC and Index files to fail to compile at first, even though there was nothing wrong with the TOC or Index itself.

Thank you to everyone above who provided helpful suggestions!

Inspiring
May 20, 2009

We had the same problem happening on one computer. We ran the MJ's Help Diagnostics utility on both computers and found that the one causing the Fatal Error had "HTML Help Workshop" installed on it. It was uninstalled and the fatal error is no longer occurring.

Debbie Sarig

Participant
May 19, 2009

I had come to this forum with a hope of resolving the issue. But even after trying out all the suggestions by all ( thanks to all ), I could not get this error out. Instead, I feel

I can help someone by posting my answer which worked for my project which compiled successfully.

Ok, back to the point..

Starting with, I installed all the patches/upgrades released for RoboHelp 7.

1. Keep an eye on the last .htm page that is shown just before the error message "Fatal Error: Unexpected error from Microsoft HTML compiler" that appears in "Output view"

2. Open the .htm file and remove all the images you have inserted if any. Save and compile. If you are able to compile without any error,

     a. it means you image file name is too lengthy

     b. the image file is too deep in its path.

Fix: 1. Try to reduce the image name length

      2. Try to place the Image file in the outer-most folder instead of placing it inside a "deep" folder.

I was able to troubleshoot and by following these steps, was able to compile my help project without any errors.

Please try this and post your replies.. Good Luck !

Thank you

Peter Grainge
Community Expert
Community Expert
May 19, 2009

Always appreciated when someone takes the trouble to come back and post their solution. Thanks for posting that


See www.grainge.org for RoboHelp and Authoring tips

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
Participant
August 25, 2008
We found that we have 'Fatal Error: Unexpected error from Microsoft HTML compiler.' when one of our *.h files contains comments like /* something */
Participant
September 2, 2008
Thanks Denis !
Removing comments from header files really solved the problem !
Participant
November 13, 2008
I just got past this problem yesterday. I was able to determine the problem file by examining the HTML file that appeared immediately before the "Fatal Error: Unexpected error from Microsoft HTML compiler" message in the Output View. In my case, the problem was caused by broken links within the HTML file (the topic had been imported into the project from a previous issue with a predecessor project). While it may not be relevant, the broken links all pointed to files 4-5 levels deep in the directory structure. The only reason I point this out is that I know there are other bad links within the project, but these were the only ones that seemed to cause a problem.
TechWriterKat2
Inspiring
May 23, 2008
Hi Z,

I too have suffered with this problem, and was never able to find any one file that was causing it. I had a HUGE project that compiled like a dream in RH 5, and failed with exactly the same error you got after I upgraded it to RH 7. One of the things that MAY have helped was moving my project to the root directory on C, and simplifying its name. When it ran in RH 5, it was several directories deep on my computer, and it never complained. RH7 seems to like it better in C:projectname.

I too spent hours with Adobe support, sent them my files, and they were able to re-create the problem -- then it mysteriously disappeared for both them and me. Now I work on it, and every so often I generate a CHM file after clicking my heels three times on a day with a full moon, and praying to whoever will listen. So far, it is still building, and I can only hope it will continue to do so.

Good luck to you!

--Kat
Peter Grainge
Community Expert
Community Expert
May 21, 2008
Kathleen

The quotes problem sounds like you upgraded before applying the 7.0.1 patch.

There's some information on my site under Using RH7.

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
RoboColum_n_
Legend
May 20, 2008
You are not alone in experienceing a slow response (or occasionally no response at all) on these forums.

BTW Adobe tend to leave us alone on these forums. They do occasionally pop their heads in but they certainly don't monitor it.
Known Participant
May 21, 2008
Thanks Colum for verifying my experiences here. In other news, I have tracked down the source of my problem. It has to do with the mapping of Framemaker paragraph styles to RoboHelp styles. I felt it was my humanitarian duty to struggle through another twenty near death experiences to let you all know.

Best Regards,

Z.