HXC3031: Keywords exceeds 4096 bytes

Topics: Developer Forum, User Forum
Feb 11, 2008 at 3:37 PM
I opened a work item on this, but I'm curious if anyone else has seen this behavior on large assemblies:
My project is pretty simple and straightforward. Compile a HtmlHelp2 file from a single DLL+XML file.
No additional content.
The DLL has a bunch of inner classes and static members, a few generics, and is written in C#.

=========================begin log===================
Info: Saving topic 45681: /html/ffecd749-bb99-0849-e584-bd2b7329f125.htm
Info: Saving file: SO.Server.Data.hxc
Info: Saving file: SO.Server.Data.HxF
Info: Saving file: SO.Server.Data.HxT
Info: Saving file: SO.Server.Data_A.HxK
Info: Saving file: SO.Server.Data_K.HxK
Info: Saving file: SO.Server.Data_F.HxK
Info: Saving file: SO.Server.Data_N.HxK
Info: Saving file: SO.Server.Data_S.HxK
Info: Saving file: SO.Server.Data_B.HxK
Info: Saving file: SO.Server.Data_NamedURLIndex.HxK
Error HXC3031: A group of keywords for a single Help link or KTable exceeds 4,096 bytes.
Error HXC3031: A group of keywords for a single Help link or KTable exceeds 4,096 bytes.
Info: Number of Topics: 45681.
Info: Number of URLs: 45681.
Info: Processing complete.
Info: Number of errors: 2.
=========================end log======================
Coordinator
Feb 11, 2008 at 4:23 PM
This has been reported before and it's a Sandcastle issue. The transformations extract keywords and put them in the index keywords in the XML data island. For some reason, your project is producing too many. This was an issue in one of the older CTPs but was fixed. If you aren't doing so, be sure you are using the January 2008 release of Sandcastle. You can search this forum for HXC3031 for the related discussions. If it's still an issue, create a work item in the Sandcastle project at http://www.codeplex.com/Sandcastle.

Eric
Feb 11, 2008 at 5:24 PM
Ok - so there isn't one file I can go look in, but instead I need to check all the generated files and count the keywords in the XML data islands, and see which one crops up too often. Have I understood that right?
Coordinator
Feb 11, 2008 at 8:05 PM
If it produces a help file, you can open it and take a look at the index. In the case of the Sandcastle bug it was somewhat obvious as it was outputing a single entry like ".ctor constructor" instead of naming the constructor for each class thus creating unique entries for each one. It'll probably be something common that occurs in many topics.

Eric
Feb 13, 2008 at 2:12 PM
It produces a tmp HXS file that the FAR H2 viewer can open.
The indexes are busted though.

I made a per script to grovel over the HTML files to generate a report that can tell you who the culprits are:

001 = AcademicTitle property
001 = AcceptAppointment method
001 = ActiveContactId property
001 = ActiveInterestsChanged delegate
...
533 = Restriction property
536 = Implicit operator
545 = CreateNew method
823 = Item property
1358 = UpdateRow method
2146 = GetRelations method
2424 = ArgleBargle method

It would appear that code generation and inheritance are the root cause of this - we have a large number of classes that inherit from the same base classes, and these all have documentation generated for their inherited members.

Turning off the "Document inherited members" flag helped a little, but my assembly has so many generated data-access classes with the same method on it that the problem is still there.

Without inherited members:
0536 = Implicit operator
0545 = CreateNew method
0560 = Item property
1358 = UpdateRow method


Any suggestions or ideas?
Nov 18, 2014 at 12:00 AM
Edited Nov 18, 2014 at 12:33 AM
Hi, I am new to SHFB and using it for the first time, I have installed SHFB Version 2014.5.31.0 I have a .shfbproj file and used SHFB GUI to build the file. I got this below error:

Compiling MS Help 2 file...
[C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe]
C:********\Build2xHelpFile.proj(62,5): error MSB6006: "HXCOMP.EXE" exited with code 2.
Microsoft Help Compiler Version 2.07.61224.0 Copyright (c) Microsoft Corp.

Error HXC3031: A group of keywords for a single Help link or KTable exceeds 4,096 bytes.
Error HXC3031: A group of keywords for a single Help link or KTable exceeds 4,096 bytes.

Last step completed in 00:07:06.6721

SHFB: Error BE0043: Unexpected error detected in last build step. See output above for details.
at SandcastleBuilder.Utils.BuildEngine.BuildProcess.RunProcess(String fileToRun, String args)
at SandcastleBuilder.Utils.BuildEngine.BuildProcess.Build()

=============================================

Please help, how should I proceed from here. Many thanks for your help
Coordinator
Nov 18, 2014 at 9:15 PM
As I recall, this issue is related to what the presentation style generates for certain members. What presentation style are you using? If you switch to a different presentation style does the problem go away? Help 1 doesn't have the problem. Is Help 2 output required?

Eric
Nov 20, 2014 at 12:34 AM
Hi Eric,

Thank you so much for your help. I have not done any coding into the .shfbproj file, so don't know if I could be able to edit it. My job is to only set up the builds on build server and run the builds. I have download the SandCastle from here http://sandcastle.codeplex.com/ (Version 2.6.1062.1) and http://shfb.codeplex.com/ (v2014.5.31.0 ) . After I read your reply, I have unchecked the MS Help2 and selected HTML Help1 and ran the SHGB again, this time the build got successful and all the required files for website got generated successfully. I have attached the screenshot, please look. However, now, how can i do the same thing using the command prompt. I am using Teamcity and the build runner step is : MSBuild

https://drive.google.com/file/d/0B9Ezkm8yCgm2NW5ENHVMM3Azb1E/view?usp=sharing

https://drive.google.com/file/d/0B9Ezkm8yCgm2SGpfQjZQQWEzRms/view?usp=sharing

Is there any way that, I could be able to run shfb using command prompt in such a way that, I can deselect MS Help2

Many thanks,
Sam
Coordinator
Nov 20, 2014 at 2:44 AM
If you don't want Help 2 output, have whoever created the project turn off the option in the project and save it. You don't need the Sandcastle download (v2.6.1062.1) since it is very old. The tools are now all included in the SHFB download so it's the only thing needed. In order to build from the command line or any other build environment that can run MSBuild.exe, see this topic: http://www.ewoodruff.us/shfbdocs/html/8ffc0d37-0215-4609-b6f8-dba53a6c5063.htm

You could supply a HelpFileFormat property override on the command line (/p:HelpFileFormat=HtmlHelp1,Website)

Unfortunately I don't know anything about Team City so I can't help you with that.

Eric
Nov 20, 2014 at 7:39 AM
Thank you Eric for the reply.
I could able to edit the project file and turn off the option for "Help 2" and ran the build in TeamCity Build server and you said the build was successful. However, I would like to know if there are any major differences between Help 1 and Help 2.

My original file contains:
<HelpFileFormat>MSHelpViewer, Website, MSHelp2</HelpFileFormat>

I edited the file to:
<HelpFileFormat>MSHelpViewer, Website, HtmlHelp1</HelpFileFormat>

I would like to know, if there will be any major differences in the output or the document content by changing to HtmlHelp1 from MSHelp2 , or is it only going to affect the displaying part in websites. As long as it wont affect the content, I am not worried and I can go ahead and make my changes permanent to the project file.

Awaiting for your reply.

Once again, many thanks Eric !
Coordinator
Nov 20, 2014 at 4:13 PM
Help 1 produces a standalone .chm file which can be viewed on any system. Help 2 produces a file that must be installed into the Visual Studio 2005/2008 help collection to be viewed. There is a viewer available from HelpWare but it's typically just for testing. The usual intent if producing Help 2 like MS Help Viewer output is to integrate it into Visual Studio. MS Help Viewer output is for integration into VS2010 or later help collections.

Eric
Nov 20, 2014 at 9:23 PM
Hi Eric,
Thank you for the information on both Help 1 and Help 2 file formats. I have spoken to the corresponding developer and told him the same thing. However, as per our requirements we do need MSHelp2 but not HtmlHelp1. Now, how can we resolve this MS Help 2 error (same error from above , I re-posted again )

Compiling MS Help 2 file...
[C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe]
C:********\Build2xHelpFile.proj(62,5): error MSB6006: "HXCOMP.EXE" exited with code 2.
Microsoft Help Compiler Version 2.07.61224.0 Copyright (c) Microsoft Corp.

Error HXC3031: A group of keywords for a single Help link or KTable exceeds 4,096 bytes.
Error HXC3031: A group of keywords for a single Help link or KTable exceeds 4,096 bytes.

Last step completed in 00:07:06.6721

SHFB: Error BE0043: Unexpected error detected in last build step. See output above for details.
at SandcastleBuilder.Utils.BuildEngine.BuildProcess.RunProcess(String fileToRun, String args)
at SandcastleBuilder.Utils.BuildEngine.BuildProcess.Build()

We really got stuck here. Thanks Eric.
Coordinator
Nov 20, 2014 at 11:04 PM
From my first response: What presentation style are you using? If you switch to a different presentation style does the problem go away?

Eric
Nov 21, 2014 at 12:49 AM
I am so sorry Eric, forgive my ignorance. I do not have any knowledge about presentation styles. If you could list me what are available presentation styles, I can go through my project code and find out what presentation style is being used. Once, if I find one... how can I replace it with another, so that I can re-run the build again with new presentation style and check the results.

If you talking about this: I found the below one in my .shfbproj file
<PresentationStyle>VS2010</PresentationStyle>

the same .shfbproj file had been built by cruise control by SHFB long time and the result was successful all these days, but all of a sudden since 2 weeks its started failing with the following error:
Command line 'C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MsBuild.exe C:*******-----.shfbproj' timed out after 3600 seconds.

And, the same .shfbproj when we setup in teamcity build server and ran using MSBuild.exe, gives the following error as I posted earlier:
Error HXC3031: A group of keywords for a single Help link or KTable exceeds 4,096 bytes.


Thank you,
Samuel
Coordinator
Nov 21, 2014 at 2:51 AM
I don't mean to be rude, but why don't you turn it over to the developer to figure out? He should know how to use it and is saves me having to tell you what to do all the time. If it's failing on your build server it should fail on his development PC. If not, then it's down to the installed help 2 compiler components which is outside the scope of SHFB as I don't have control over them.

Eric
Nov 22, 2014 at 10:32 PM
I completely understand you Eric. Thank you so much for your patience. I ran the project file again in both the servers. Both CCnet and Teamcity buildservers are giving the same error again. Actually, this falls under my department and I am new to SHFB. As for now, I made the website available without Help2 Output . Thank you once again for your answers.