Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-09

Help needed with bug 22485 ContextHelpDemo doesn't show proper help page & shows errors

7 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Reinier Olislagers

With Lazarus trunk x86, FPC trunk, Windows, the CHM help demo Starting lhelp (using F1 in the Tedits or the button) gives "Help Viewer Error", lhelp does not respond.

1. Is this reproducible on other OSes/FPC combinations?
2. I've tried to investigate the cause but I'm stuck. My notes below - help/hints would be appreciated.
Thanks.

The error message shown is:
Dialog:
caption:
Help Viewer Error
text:
lhelp does not respond

lclconstants:
rsHelpViewerError = 'Help Viewer Error';
lazhelpintf.pas
procedure THelpDatabases.ShowError(ShowResult: TShowHelpResult;
  const ErrMsg: string);
//if ShowResult is
shrViewerError: ErrorCaption:=rsHelpViewerError;
...
MessageDlg(ErrorCaption,ErrMsg,mtError,[mbCancel],0);
So apparently we get an shrViewerError somewhere but I cannot find where
THelpDatabases.ShowError is called?
lazhelpchm.pas does have
function TLHelpConnector.ShowNode(Node: THelpNode; var ErrMsg: string
  ): TShowHelpResult;
//fallback/default
Result:=shrViewerError;
//later on:
Response:=Connection.OpenURL(CHMFilename,SubPath);
  case Response of
..
  srNoAnswer: ErrMsg:='lhelp does not respond';

So apparently we get an srNoAnswer in our OpenURL call??

At the lhelp end:
In lhelpcore.pas with debugging enabled, I see entries like got rturl, filename C:\development\lazarus\tools\chmmaker\example.chm, url /MainPage.html
and the function sends srSuccess
so we get proper handling in THelpForm.ServerMessage?!? (The OpenURL function CANNOT return srNoAnswer - default result is srInvalidURL; srNoAnswer is never assigned??)

Reply by email

Reinier Olislagers
to Reinier Olislagers

Having slept on it I'll investigate 2 possibilities:
1. The help package used by the IDE/demo application sends commands to lhelp via SimpleIPC. It then waits in a timeout loop for an answer. This loop may be too short.
2. Lhelp may not be able to set up the SimpleIPC communications channel back to the demo application, which is why the answer never arrives.

Still interested in
- further comments
- whether other people can reproduce the problem

Thanks

Reply by email

Reinier Olislagers
to Reinier Olislagers
Reinier Olislagers wrote 6 lines
Having slept on it I'll investigate 2 possibilities: 1. The help package used by the IDE/demo application sends commands to lhelp via SimpleIPC. It then waits in a timeout loop for an answer. This loop may be too short. 2. Lhelp may not be able to set up the SimpleIPC communications channel back to the demo application, which is why the answer never arrives.

Ok, uploaded a patch in
http://bugs.freepascal.org/view.php?id=22485
that addresses 1 which seemed to be the problem.

Reply by email

Reinier Olislagers
to Bart
Bart wrote 6 lines
On 9/7/14, Reinier Olislagers wrote: > Yes, thanks; patch is uploaded now... Please see my comments in bugtracker.

Fixed thanks for to try to confine further conversation to the bt ;)

Reply by email