Page 1 of 1

CHM Help file crashes when exiting

Posted: 28 Oct 2017, 11:34
by JoeWinograd
W7 Pro 64-bit
AHK 1.1.26.01 32-bit Unicode

I use the AHK CHM Help file often. It is located here (and I created a shortcut to it):
C:\Program Files\AutoHotkey\AutoHotkey.chm

It works perfectly, but whenever I close/exit it, I get a crash dialog with this:

Microsoft® HTML Help Executable has stopped working
Problem signature:
Problem Event Name: BEX64
Application Name: hh.exe
Application Version: 6.1.7600.16385
Application Timestamp: 4a5bd14f
Fault Module Name: ntdll.dll
Fault Module Version: 6.1.7601.23915
Fault Module Timestamp: 59b94ee4
Exception Offset: 00000000000ca4e5
Exception Code: c000000d
Exception Data: 0000000000000000
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1033
Additional Information 1: dfeb
Additional Information 2: dfebb60ad869cff528d98c554ce46cdf
Additional Information 3: 36f0
Additional Information 4: 36f04679e1a033c011fbbbe45ac02e85

No other CHM Help file on my system has this problem. It's a not a big deal — I simply click the "Close the program" choice in the crash dialog — but I figured it was a good idea to report it. It is 100% reproducible — happens every time. So if the developers need more info about it, let me know — happy to help. Regards, Joe

Re: CHM Help file crashes when exiting

Posted: 28 Oct 2017, 11:44
by jeeswg
I use Windows 7, and it's crashing for me also, most times.

It's also crashing on all the older versions as well at least back to 1.1.24.04 that I just tested.

Does it crash if you do this? It may be because I always use a hotkey to close the program, that it doesn't crash, I hadn't noticed the problem before you mentioned it.

Code: Select all

q::
WinClose, A
return
Different ways to close it:
- alt+space, c (doesn't crash, AFAICS)
- click title bar Close button (often crashes)
- File, Exit (sometimes crashes)

Re: CHM Help file crashes when exiting

Posted: 28 Oct 2017, 12:25
by JoeWinograd
Very interesting, jeeswg — I hadn't thought about trying other ways to close/exit. Here are my results:

red X upper right: crash
alt-space, c: no crash
title bar, Close: no crash
alt-F4: crash
File, Exit: no crash

Weird stuff!

Re: CHM Help file crashes when exiting

Posted: 28 Oct 2017, 16:02
by TAC109
JoeWinograd wrote:Very interesting, jeeswg — I hadn't thought about trying other ways to close/exit. Here are my results:

red X upper right: crash
alt-space, c: no crash
title bar, Close: no crash
alt-F4: crash
File, Exit: no crash

Weird stuff!
None of the above ways to close/exit crash for me. Running Windows 10 Pro x64.

Re: CHM Help file crashes when exiting

Posted: 28 Oct 2017, 18:40
by JoeWinograd
TAC109 wrote:None of the above ways to close/exit crash for me. Running Windows 10 Pro x64.
Same here — no crashes on W10 Pro 64-bit. The crashes occur on W7 Pro 64-bit:
AHK Help crash.gif
AHK Help crash.gif (19.96 KiB) Viewed 3587 times
Regards, Joe

Re: CHM Help file crashes when exiting

Posted: 30 Oct 2017, 07:02
by Delta Pythagorean
The CHM has nothing to do with AHK, that's windows' problem. You can "theoretically," decompile the CHM and run the htm files into a browser, do be warned, it might glitch and bug out because the difference between the way CHM and browsers handle those files.

Re: CHM Help file crashes when exiting

Posted: 30 Oct 2017, 07:29
by jeeswg
I use Windows 7, and I've decompiled the chm to htms and opened them in Internet Explorer, never had any problems running them.

Re: CHM Help file crashes when exiting

Posted: 30 Oct 2017, 07:38
by Delta Pythagorean
jeeswg wrote:I use Windows 7, and I've decompiled the chm to htms and opened them in Internet Explorer, never had any problems running them.
Results may vary.

Re: CHM Help file crashes when exiting

Posted: 30 Oct 2017, 07:41
by jeeswg
Do you have any examples of htms from chm files and glitches? Or indeed of any htms and glitches? It would be interesting to know of any examples.

Re: CHM Help file crashes when exiting

Posted: 30 Oct 2017, 07:52
by nnnik
If the chm has nothing to do with AHK then why is the official AHK help file a chm file?
The fact remains that .chm is completely unreliable and broken on certain windows version.
Another reason to remove or replace it in future.

Re: CHM Help file crashes when exiting

Posted: 30 Oct 2017, 09:07
by Delta Pythagorean
nnnik wrote:Another reason to remove or replace it in future.
I might work off of that and make a little CHM "parser" and viewer. Who knows?

Re: CHM Help file crashes when exiting

Posted: 30 Oct 2017, 10:14
by JoeWinograd
The CHM has nothing to do with AHK, that's windows' problem.
Yes, but the AHK CHM file is the only one on my system that crashes like that. There are plenty of programs out there that create CHM files — Helpinator, HelpScribble, among many others — and, well, they're programs...they could certainly have bugs, causing CHM files to be created that have some problems. I don't know what program AHK uses to create its CHM file, but, in any case, the file could have a faulty construct in it that is causing the crash behavior when exiting. Regards, Joe

Re: CHM Help file crashes when exiting

Posted: 30 Oct 2017, 10:52
by jeeswg
Chm is an amazing format, I don't want or need anything 'better', I very much like what we have now. Anyhow it's great to have the help file as htm files, which you can get by decompiling. The crashes are not *because* of chm files and from what I've established we can create a workaround script in the meantime.

I've been testing older versions of the help file, but I'm finding it hard to make it crash at all, I don't see any consistent pattern. I've had at least one crash on the chm for v1.1.16.05. If anyone can find a consistent pattern, or wants to test older versions, please do. But I'm wondering if somehow a newer version can make an older version crash, e.g. I know that HTML Help stores certain information in a file it keeps, hh.dat, such as Favorites.

C:\Documents and Settings\%username%\Application Data\Microsoft\HTML Help\hh.dat
C:\Users\%username%\AppData\Roaming\Microsoft\HTML Help\hh.dat

old versions of AutoHotkey - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=2&t=30206

Re: CHM Help file crashes when exiting

Posted: 30 Oct 2017, 13:36
by nnnik
Througout the years I had quite a few issues with the .chm file - for example crashing when opening etc. There is still a large pile of specific issues
Just because you don't have a problem or if you can't recreate the problem that doesn't mean it isn't there.
Anyways it is problematic for us as a community that the .chm viewer is essentially different for every Windows Version - we are better off with our own solution.
That doesn't mean that the current .chm file will completely vanish.

Re: CHM Help file crashes when exiting

Posted: 31 Oct 2017, 11:43
by jeeswg
@nnnik: Have you had problems with the AHK chm and/or other chms? If you have a recommended chm viewer, that could be a good quick fix: you change the file association so that chm files open with an AHK script, and if the chm filename contains AutoHotkey, you open it with the secondary chm viewer instead of HTML Help (hh.exe).

Re: CHM Help file crashes when exiting

Posted: 31 Oct 2017, 14:48
by nnnik
I don't want to use another .chm viewer. And yes I had issues.