[TC 11.00rc1] Crash when using Help > Index > Keyword

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.00rc1] Crash when using Help > Index > Keyword

Post by *white »

The file htmlhelp.chm from the Microsoft docs mentioned earlier contains some info about it:
htmlhelp.chm from the Microsoft wrote:
To create an index that uses a site map
  1. On the File menu, click New, and then click Index.
  2. Add keywords, and then save the index file.
Notes
  • To work on a Web site this file does not need to be compiled. If you compile it (for use in a compiled help file), and want to use the site map format, open your project file, and then click Change Project Options. Click the Compiler tab, and then clear the Create a binary index check box.
  • If you are authoring an index for a Web site, make sure you add the HTML Help ActiveX control to the topic files you want the index to appear in. Specify Index as the command, and then specify the name and location for your index file.
  • An index compiled using the binary format will not work on a Web site. You can use a site map index for both a Web site and a compiled help file.
  • If you compile a help file and set the compatibility to version 1.0, a site map index will be created.

htmlhelp.chm from the Microsoft wrote:
The difference between binary and site map indexes
There are two types of indexes available for help authors to use, a binary index or a site map index. Each type of index has its own unique features.

Binary index
This type of index is used only with compiled help (.chm) files. The following are some characteristics a binary index:
  • Good for large indexes because its compiled size is very small.
  • Is automatically sorted during compile. A help author cannot customize how a binary index is sorted.
  • Can be merged with other indexes. All indexes are then sorted at compile time as one.
  • Can be used with KLinks to create links to specific topics.
  • Will automatically merge keywords added to HTML files with Keyword links (KLinks) added to the index file.
site map index
This type of index must be used when authoring an index for a Web site. It can also be used with compiled help files. The following are some characteristics of a site map index:
  • Works on a Web site.
  • Help author has complete control over how the index is sorted.
  • Works without being compiled (but can also be compiled).
  • Same index can be used for Web site and compiled help file.
  • Is better to use with smaller indexes because site map indexes are larger than binary indexes.
  • Keywords are not merged with other indexes or sorted during compile.
  • KLinks do not work with site map indexes.
Note
The method you use for creating keywords depends on whether you are creating an index that will be used in a compiled help file, on a Web site, or in a situation where there are multiple indexes.


User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.00rc1] Crash when using Help > Index > Keyword

Post by *white »

brahman wrote: 2023-07-23, 20:49 UTC Hooray, it works!

I thought all along the crash had something to do with a problem in the index.
Nice! Can you confirm that this version also crashes?
Then we know for sure that it happens when the index uses a site map and not because of (other) compatibility characteristics for HTML Help 1.0.
brahman wrote: 2023-07-23, 20:49 UTC I hope Christian can implement this in the next RC of TC11.
It would be nice if AntonyD can also confirm that it works.
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.00rc1] Crash when using Help > Index > Keyword

Post by *petermad »

My compiled version can be downloaded here. Can you test it?
https://www.dropbox.com/s/u0qny3o43vk9isw/totalcmd_1.1.chm?dl=1
https://www.dropbox.com/s/iou1yxw3shqoo4k/totalcmd_1.1_sitemap.chm?dl=1

I tested the two versions here above under Windows 7 and 10 - and the right (content) window is empty - see: https://tcmd.madsenworld.dk/totalcmd_1_1_chm.png

Notice, I have no problems with any totalcmd.chm files shipped with TC.

EDIT:
It was the because of Window's protection for downloaded files that the downloaded files did not work correctly - after removing the zone identifier then it works.

EDIT2:
I have now also tested totalcmd_1.1.chm under Windows XP - and it works here too, but is does not seem that a .chw file is generated under this OS.
Also totalcmd_1.1_sitemap.chm works under Windows XP.


EDIT3:
After changing the configuration of the CHMDir plugin, I can also make dark versions of the .chm files: https://tcmd.madsenworld.dk/totalcmd1.1.zip - It would be nice if AntonyD and brahman could also test them.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
AntonyD
Power Member
Power Member
Posts: 1249
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: [TC 11.00rc1] Crash when using Help > Index > Keyword

Post by *AntonyD »

2white
confirm - totalcmd_1.1 - it does work. and " this version also crashes"(totalcmd_1.1_sitemap) - confirm too: it crashes...
2petermad
confirm - files with suffixes "_sitemap" do no generate .chw file and crash.
Files without suffixes "_sitemap" - works!
But what about coloring: https://ibb.co/5GjMJYn ?
is that - what you expected to get from the dark theme?
it's the TotalcmdDark2.chm. Its "brother" - simple TotalcmdDark.chm - has white content of Tab "Content" - this is more-or-less suitable variant, but this "black-and-white" content.....

Moderator message from: white » 2023-07-26, 09:22 UTC

The posts about dark help were moved to this thread.
Last edited by AntonyD on 2023-07-24, 07:23 UTC, edited 1 time in total.
#146217 personal license
User avatar
AntonyD
Power Member
Power Member
Posts: 1249
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: [TC 11.00rc1] Crash when using Help > Index > Keyword

Post by *AntonyD »

And 2[white] - can you provide me with ALL of yours working tools and sources which created for you this finally working chm file?
The fact is that I also came to the conclusion that "the bottleneck" is precisely in these moments - in the types of indexes.
And I tried to change these values accordingly in my chm file builds, but I was never able to get a working version of the file.
I would really like to understand what moment did not work with my case. The wrong version of the compiler, by any chance the wrong additional condition/option of something?....
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.00rc1] Crash when using Help > Index > Keyword

Post by *ghisler(Author) »

So do I only need to change Compatibility to 1.1, e.g.
Compatibility=1.1
or are there other things I need to change? I can confirm that a .CHW file is being created when I open the help for the first time on Windows 11.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.00rc1] Crash when using Help > Index > Keyword

Post by *white »

AntonyD wrote: 2023-07-24, 07:23 UTC And 2[white] - can you provide me with ALL of yours working tools and sources which created for you this finally working chm file?
The sources were given by Mr. Ghisler:
ghisler(Author) wrote: 2023-07-23, 09:21 UTC If you want to experiment with the index, you can get the source of the help here:
https://www.totalcommander.ch/help/totalcmd_chm_src.zip
To compile, edit the path to hhc.exe in build.bat and then run build.bat.
Download tools: Checksums SHA256:
  • Code: Select all

    b2b3140d42a818870c1ab13c1c7b8d4536f22bd994fa90aade89729a6009a3ae *htmlhelp.exe
    f72a08e093603e1cb6ed068db6575c30dc1a7a51fbe3222b3fb1057c6ec1ed2a *helpdocs.zip
    
I would skip trying to install Microsoft HTML Help Workshop 1.3, but rather use a few of its files. Installing it will register the itcc.dll file, which you can do by hand. I use the following batch file instead of Mr. Ghisler's build.bat:

Filename: build_admin.bat

Code: Select all

@Echo off
Rem  Compile help file - without installing HTML Help Workshop 1.3
Rem
Rem  Unpack hhc.exe, hha.dll and itcc.dll from htmlhelp.exe (HTML Help Workshop)
Rem  Put these files in your project folder in a subfolder called "hhc"
Rem  Adjust the name of the .hhp project file in this batch file to your project file
Rem  Run this batch file as Administrator - needed for (un)registering itcc.dll
Rem

Rem  Change working folder to the folder of this batch file
cd %~dp0

Rem  Register itcc.dll
Regsvr32 /s hhc\itcc.dll

Rem  Compile the help file - change this line to your own project file
hhc\hhc.exe hsc6C4.hhp

Rem  Unregister itcc.dll
Regsvr32 /u /s hhc\itcc.dll

Echo.
Pause
Handy references:
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.00rc1] Crash when using Help > Index > Keyword

Post by *white »

ghisler(Author) wrote: 2023-07-24, 09:20 UTC So do I only need to change Compatibility to 1.1, e.g.
Compatibility=1.1
Correct.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.00rc1] Crash when using Help > Index > Keyword

Post by *ghisler(Author) »

I have checked the files hhc.exe and itcc.dll in htmlhelp.exe, they are the same as the ones I'm already using, so it should work with Compatibility=1.1.
The changed help also works on Windows 98, and the old one didn't work on Windows 95 (the user gets a message to download and install the HLP files), so there shouldn't be any new compatibility issues.
Author of Total Commander
https://www.ghisler.com
User avatar
AntonyD
Power Member
Power Member
Posts: 1249
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: [TC 11.00rc1] Crash when using Help > Index > Keyword

Post by *AntonyD »

2white
Unbelievable, but I have and I used absolutely the same stuff like you and I register this dll even for all time - not for a current building session.
And I used Compatibility=1.1 string - but I could not get working chm... And you could... What's wrong on my comp? Hmmmmm.....
#146217 personal license
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.00rc1] Crash when using Help > Index > Keyword

Post by *white »

ghisler(Author) wrote: 2023-07-24, 09:53 UTC I have checked the files hhc.exe and itcc.dll in htmlhelp.exe, they are the same as the ones I'm already using..
For your information, the version of HTML Help Workshop you can download from the site of HelpScribble is exactly the same version. But that installer htmlhelpsetup.exe is resigned by the author of HelpScribble. Checksum SHA256:
  • Code: Select all

    90d26653abe2cb81322f5e8903dba5c4305451e67120d94f910953f10e0ebf15 *htmlhelpsetup.exe

ghisler(Author) wrote: 2023-07-24, 09:53 UTC The changed help also works on Windows 98, and the old one didn't work on Windows 95 (the user gets a message to download and install the HLP files), so there shouldn't be any new compatibility issues.
I think you should be able to update the help system on Windows 95:
Microsoft HTML Help 1.4 - About New Features in this Release wrote: v1.31
  • Windows 95, Windows 98: Changing the language in regional settings no longer changes the language of the Help viewer. This corrects a situation where the language of the Help viewer could be changed to a language not installed on the system.
  • A DLL registration problem in earlier Workshop versions has been corrected.
  • Workshop now includes the 1.31 update. When you run Htmlhelp.exe, Help is automatically updated to 1.31.
  • Various other bug fixes.
In the HTML Help Workshop installer, you can find hhupd.exe to install HTML Help 1.31
And on https://www.scootersoftware.com/kb/hhupd you can find hhupd.exe to install HTML Help 1.32
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.00rc1] Crash when using Help > Index > Keyword

Post by *petermad »

2ghisler(Author)

In order to make the CHMDir plugin (that I use to make the Dark help) work, I had to enable this option in the settings for the plugin: "Use IStorage COM interface (itss.dll) for packing".

It is still only the 32bit version of the CHMDir plugin that can modify .chm files.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
brahman
Senior Member
Senior Member
Posts: 204
Joined: 2006-04-26, 13:27 UTC

Re: [TC 11.00rc1] Crash when using Help > Index > Keyword

Post by *brahman »

I know I am late, but here are my results:
white wrote: 2023-07-23, 23:25 UTC Nice! Can you confirm that this version also crashes?
Yes, it crashes.

2petermad
1st v no crash
2nd v crash

Dark versions:
TotalcmdDark no crash
TotalcmdDark2 no crash
TotalcmdDark_sitemap crash
TotalcmdDark2_sitemap crash

2ghisler
Maybe before releasing the next TC RC, you can just make a CHM for Anthony and me to test, just to be sure it works.
Regards, Brahman
Win10 & 11 Pro x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.00rc1] Crash when using Help > Index > Keyword

Post by *ghisler(Author) »

Regarding the dark mode, rewriting the entire help to implement my own table of content, index, and search pane would be a lot of work, far too late to be implemented in TC11. Therefore please let's first try to get the crash fixed.

2brahman:
Could you try the latest help recompiled by me with the option Compatibility=1.1, please?
https://www.totalcommander.ch/help/totalcmd_chm.zip
The only thing I changed was setting Compatibility=1.1. Since the crash doesn't happen here any more on any system, it would ber helpful if you could check it.

Please double click the zip in Total Commander, this will install the help file without the zone identifier.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.00rc1] Crash when using Help > Index > Keyword

Post by *white »

ghisler(Author) wrote: 2023-07-20, 10:26 UTC I'm not calling hh.exe, instead I'm loading htmlhelp.ocx via LoadLibrary and then call the function HtmlHelpA.
Do you also set the window type? Because the help looks a bit different when pressing F1 than when double-clicking the chm file. For example, the border characteristics of the index when pressing F1 aren't the same as defined in the chm file.
Post Reply