Recent

Author Topic: chm help file hangs after calling Application.Initialize  (Read 9432 times)

balazsszekely

  • Guest
Re: chm help file hangs after calling Application.Initialize
« Reply #15 on: February 02, 2017, 11:57:36 am »
Quote
Note that my application is non-GUI if this makes any difference.
First I converted your application to a GUI and it worked flawlessly, then I created a form in your console application to check if it makes a difference, apparently it does. See attachment.

dculp

  • Full Member
  • ***
  • Posts: 129
Re: chm help file hangs after calling Application.Initialize
« Reply #16 on: February 02, 2017, 01:21:30 pm »
In all cases when the chm loaded it reported "This page can't be displayed". This happens whether the chm initially opens to the Contents tab or the Search tab.
I don't know, but did you enter the topic correctly? Sometimes the extension is .html, sometimes only .htm.
Yes, I tried both .html, .htm, and no extension.

Please compile the program chmls (in fpc/packages/chm). Run it with the chm file as a parameter and it will list you all contained topics along with extension and path.

chmls compiled but with 7 warnings. I copied it to the folder with rtl.chm and then ran it from a Windows cmd window --

>chmls list rtl.chm
chmls, a CHM utility. (c) 2010 Free Pascal core.

An unhandled exception occurred at $000000010001AB49:
EFOpenError: Unable to open file "rtl.chm"
  $000000010001AB49
  $000000010001A9F3
  $0000000100003015 line 273 of chmls.lpr --> Stream := TFileStream.Create(name, fmOpenRead);
  $00000001000083B1 line 1025 of chmls.lpr --> ListChm(localparams[0],Section);
  $0000000100008986
  $0000000100017663
  $0000000100017FB1
  $00000000774459CD
  $000000007757B891

Same result with or without the "list" command. Also, same result with Small_demo_1a.chm. Doesn't run without the chm extension.
I double checked to make sure that chmls.exe and the chm files are in the same folder.
« Last Edit: February 02, 2017, 01:25:37 pm by dculp »

wp

  • Hero Member
  • *****
  • Posts: 11853
Re: chm help file hangs after calling Application.Initialize
« Reply #17 on: February 02, 2017, 01:41:49 pm »
chmls belongs to fpc - I use fpc3.0, you use fpc 3.0. I checked both 32 and 64 bit versions -- no problem. The only idea that comes to my mind is that of a typo or that the rtl.chm could still be open from previous experiments. If you don't see anything obvious in the task manager reboot the computer to be sure that rtl.chm is closed, then retry.

Daniel Simoes

  • New Member
  • *
  • Posts: 10
    • DJSystem
Re: chm help file hangs after calling Application.Initialize
« Reply #18 on: May 17, 2018, 06:29:27 pm »
Unfortunately, when I try to open any HelpNDoc chm (including HelpNDoc's own chm help file) I get a Lhelp error "Resource unavailable:ms-its:". This seems to be a known problem. Search "unavailable" here --

I got the same problem recently ...
Since I was generating CHM files myself with HelpNDoc, I was able to investigate...

It seems to me that LHelp does not like a CHM file that contains a topic whose "Help Context" is less than "1" ...
After assigning a number to the Topic that was showing in the LHelp error message, the problem stopped

wp

  • Hero Member
  • *****
  • Posts: 11853
Re: chm help file hangs after calling Application.Initialize
« Reply #19 on: May 17, 2018, 07:03:34 pm »
Since I was generating CHM files myself with HelpNDoc, I was able to investigate...
Could you generate a simple CHM file (one topic only) with HelpNDoc with causes the trouble and upload it her (packed into a zip)? I don't see a reason why LHelp cannot be fixed to accept such a file.

 

TinyPortal © 2005-2018