• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Fatal Error: Unexpected error from Microsoft HTML compiler.

Participant ,
May 08, 2008 May 08, 2008

Copy link to clipboard

Copied


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.

Views

8.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 25, 2008 Aug 25, 2008

Copy link to clipboard

Copied

We found that we have 'Fatal Error: Unexpected error from Microsoft HTML compiler.' when one of our *.h files contains comments like /* something */

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 02, 2008 Sep 02, 2008

Copy link to clipboard

Copied

Thanks Denis !
Removing comments from header files really solved the problem !

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 13, 2008 Nov 13, 2008

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 19, 2009 May 19, 2009

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 19, 2009 May 19, 2009

Copy link to clipboard

Copied

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

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 19, 2009 May 19, 2009

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 10, 2010 Dec 10, 2010

Copy link to clipboard

Copied

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 21, 2011 Jul 21, 2011

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 21, 2011 Jul 21, 2011

Copy link to clipboard

Copied

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

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 21, 2011 Jul 21, 2011

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 21, 2011 Jul 21, 2011

Copy link to clipboard

Copied

Me again - clearly not giving up actually...

I don't know if this helps, but I've just observed one compilation that worked and one that failed - both on the C: drive. The difference between them is the length of the path name to the destination folder. The really long one failed. I hope this helps. Cheers.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 21, 2011 Jul 21, 2011

Copy link to clipboard

Copied

Yes, there is a windows limit of 256 characters. If something is in your profile, that takes a whole chunk of characters.


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 11, 2012 Jul 11, 2012

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 11, 2012 Jul 11, 2012

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 09, 2014 Jan 09, 2014

Copy link to clipboard

Copied

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:

OutputView.jpg

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:
Tooltip.jpg
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:HyperlinkDialog.jpg
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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 18, 2014 Aug 18, 2014

Copy link to clipboard

Copied

It took me awhile reading through the thread, but my solution for the Fatal Error: Unexpected error from Microsoft HTML compiler, error message, was to simply move my entire project to a new path location with a shorter path. No errors.

Thanks to all above.

James

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 01, 2015 May 01, 2015

Copy link to clipboard

Copied

Yes, that cracked it for me too. Thank you.

I checked the last topic shown before the fatal error message in the compiler. And then checked all the links. I also removed the topic from the project and tried to compile it. That worked. I then imported the topic back into the project and compiled it OK. So if fixing the links doesn't work you might want to try that too.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 24, 2015 Jul 24, 2015

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp