Recent

Author Topic: lhelp not working on Linux  (Read 1333 times)

dbannon

  • Hero Member
  • *****
  • Posts: 2778
    • tomboy-ng, a rewrite of the classic Tomboy
lhelp not working on Linux
« on: May 29, 2023, 07:06:47 am »
I am having problems using lhelp with Lazarus Main on linux. When I press F1 while on, eg "class", instead of the helpful window poppong up, I see a miniature version of it, top left of screen in an apparent endless loop.

Seems to be an issue on several Linux installs, anyone else seen this or is it something wrong with my installs ?

I see no problems with release versions, eg 2.2.6 and I am using FPC322.

Details -
Start Lazarus Main, open a project, move cursor to some term that has help. press F1. The console will show (me) -

Code: [Select]
TIDEHelpManager.ShowHelpForSourcePosition A Filename=/home/dbannon/bin/Lazarus/lazarus-main/examples/imagelist/unit1.pas (x=14,y=15)
CollectDeclarations /home/dbannon/bin/Lazarus/lazarus-main/examples/imagelist/unit1.pas line=15 col=14
TIDEHelpManager.ShowHelpForSourcePosition no declaration found, trying keywords and built-in functions...
TChmHelpViewer.ShowNode Filename="ref.chm" SearchPath="/home/dbannon/bin/Lazarus/Help/chm" Found="/home/dbannon/bin/Lazarus/Help/chm/ref.chm"
TLHelpConnection.StartHelpServer: going to start help server by executing /home/dbannon/bin/Lazarus/lazarus-main//components/chmhelp/lhelp/lhelp --ipcname lazhelp17716 --hide
Start IPCNAME = lazhelp17716
Start HIDE = True

got BeginUpdate
got BeginUpdate
got rturl, filename /home/dbannon/bin/Lazarus/Help/chm/fcl.chm, url /index.html
LHelpControl: WaitForMsgResponse: hit timeout (10 seconds)
LHelpControl: WaitForMsgResponse: hit timeout (10 seconds)
LHelpControl: WaitForMsgResponse: hit timeout (10 seconds)
LHelpControl: WaitForMsgResponse: hit timeout (10 seconds)
Help connection: error Stream write error running UrlRequest command
Help connection: error Stream write error running UrlRequest command
Help connection: error Stream write error running UrlRequest command
Help connection: error Stream write error running UrlRequest command
Help connection: error Stream write error running UrlRequest command
Help connection: error Stream write error running UrlRequest command
Help connection: error Stream write error running MiscRequest command
Help connection: error Stream write error running UrlRequest command
Help connection: error Stream write error running MiscRequest command
Help connection: error Stream write error running MiscRequest command
Help viewer gave error response to mrShow command. Response was: ord: 0
TIDEHelpManager.ShowHelpForSourcePosition "class" is not an FPC keyword

It appears that lhelp has started, is running but not responding when lazarus gives it a poke -

Code: [Select]
dbannon@dell:~/bin/Lazarus/lazarus-main$ ps aux | grep lhelp
dbannon   177176 66.6  0.2 362584 45296 pts/0    Sl   14:45   0:05 /home/dbannon/bin/Lazarus/lazarus-main//components/chmhelp/lhelp/lhelp --ipcname lazhelp17716 --hide
dbannon   177214  0.0  0.0  11520   656 pts/0    S+   14:45   0:00 grep --color=auto lhelp

My Lazarus does have it's Help Options pointing to a valid dir of chm files, I can see them fine from Lazarus226.

Assuming there was something 'new' in the lhelp component, I replaced Main's lhelp directory with the older one from 226, rebuilt but see the same problem. More of a IPC issue ?  My own app uses IPC and Main builds that OK ....

Any suggestions where I should look ?

Davo

Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

dbannon

  • Hero Member
  • *****
  • Posts: 2778
    • tomboy-ng, a rewrite of the classic Tomboy
Re: lhelp not working on Linux
« Reply #1 on: May 31, 2023, 02:15:18 am »
Gee, it would be nice if a Lazarus Main user on linux indicated that they do, or don't see this problem.

I'm worried that its such a basic function, its unlikely to broken without someone else seeing it already but my tests all indicate its a problem. Tested on clean install (VM) of U20.04, of a cleanish real install of bookworm and my day to day install (far from clean) of U20.04. All broken.

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: lhelp not working on Linux
« Reply #2 on: May 31, 2023, 12:32:30 pm »
Would not call myself a "main user on linux", but I have several VMs and tried to verify your issue. I could not on Mint 20.2, but I could on Ubuntu 20.10 and Ubuntu 22.04.2, however, only after I updated the git repository (which was fairly old).

I bisected for the guilty revision and found it to be in the commits
  • 0645aa9e7fd2c70bca655e45c42996e8223d518f Gtk2: fixed height of ide mainbar by rich2014 (Febr 18, 2023)
  • 1d9dfb75742bac95fb7f639b712f8d35522bc9ea Merge branch 'gtk2/mainbar' into 'main Gtk2: fixed height of ide mainbar, See merge request freepascal.org/lazarus/lazarus!138, by Zeljan Rikalo (Febr 18, 2023)
The commit immediately before them (33ffadbc8962f99a9eb705ecbc88b189325ffd8e Docs: LCL/controls,ldocktree. Updates topics for changes in 3d86c02c. Updates content in: controls.TDockTree, ldocktree.TLazDockTree) did not show the issue.

I am not a gtk2 specialist and thus cannot fix it myself. Please post a bug report and refer to the guilty commits, assign it to Zeljan.
« Last Edit: May 31, 2023, 12:37:51 pm by wp »

zeljko

  • Hero Member
  • *****
  • Posts: 1591
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: lhelp not working on Linux
« Reply #3 on: May 31, 2023, 02:33:47 pm »
Better assign it to rich2014 since he is author of that patches.

dbannon

  • Hero Member
  • *****
  • Posts: 2778
    • tomboy-ng, a rewrite of the classic Tomboy
Re: lhelp not working on Linux
« Reply #4 on: June 02, 2023, 05:10:33 am »
Logged -
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40293

Yes, its rich2014 commit, due to a new call to SetWindowSizeAndPosition(PGtkWindow(MainWidget), LCLControl); line 6692 gtk2proc.inc

Bit beyond my powers to assign the bug ....

Thanks
David
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11351
  • FPC developer.
Re: lhelp not working on Linux
« Reply #5 on: June 02, 2023, 09:09:08 am »
Assigned

 

TinyPortal © 2005-2018