Command Line call randomly hangs

Please post all questions on Help+Manual 8 here

Moderators: Alexander Halser, Tim Green

User avatar
dgaudian
Posts: 11
Joined: Tue Nov 17, 2020 5:29 pm

Re: Command Line call randomly hangs

Unread post by dgaudian »

Start-Process -PassThru -Wait -FilePath "c:\Program Files (x86)\EC Software\HelpAndManual8\HELPMAN.EXE" -ArgumentList
"C:\DEV\t1-host-sw-ii\50_src\Help\En\repo\T1.hmxp","/CHM=C:\DEV\t1-host-sw-ii\_build\T1.chm","/O=C:\DEV\t1-host-sw-i
i\50_src\Help\En\repo\CHM Skin, Gliwa.hmskin","/V=C:\DEV\t1-host-sw-ii\_build\variables.txt"

(I only spotted the /V this morning .. what a bliss. I had a tool updating the T1.hmxp instead :( )
Dirk Gaudian - Senior Software Developer UI/UX - GLIWA embedded systems GmbH
User avatar
Alexander Halser
EC-Software Support
Posts: 4098
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria
Contact:

Re: Command Line call randomly hangs

Unread post by Alexander Halser »

Maybe you can experiment with the two following additional command line parameters (place them as 2nd parameter, right after the project file). Both options are mutually exclusive.

HELPMAN.EXE is not really a console application, but a UI application that behaves like a console app if called with command line parameters. And that can be a beast sometimes. Because a console application does have, well, it's own console to direct output to. A UI application does not unless it creates one. That new console, however, will be a new window, wheras you actually want to see the compiler progress in the console of the calling parent process.

Normally, Help+Manual attempts to attach to the console of the parent process. This works in most cases, but we had rare issues (e.g. with MSBuild) where it did not work well. In those cases, one couldn't see any progress and compiler information, though it actually worked (but if there was an error during compilation, you did not notice that way).

The two additional parameters are:

/stdout
Example: HELPMAN.EXE myproject.hmxp /stdout /HTML=... /O=...

Does not attempt to attach to the console of the parent process, but redirects the compiler output to STD_OUTPUT_HANDLE as defined by the calling process.

/fc
Example: HELPMAN.EXE myproject.hmxp /fc /HTML=... /O=...

"fc" means "force console". Does not attempt to attach to the console of the parent process, but explicitly creates a new console window where the compiler output is directed to.
Alexander Halser
Senior Software Architect, EC Software GmbH
User avatar
julio
Posts: 118
Joined: Wed May 28, 2008 12:06 am
Location: Porto Alegre, RS - Brasil
Contact:

Re: Command Line call randomly hangs

Unread post by julio »

Your /O argument contains a file with spaces in its name. I do not use PowerShell but probably you should use it as:

Code: Select all

"/O='name with spaces.hmskin'"
But I am not sure if it will work, maybe changing the filename to a name without spaces would be better.
dgaudian wrote: Tue Dec 01, 2020 1:35 pm Start-Process -PassThru -Wait -FilePath "c:\Program Files (x86)\EC Software\HelpAndManual8\HELPMAN.EXE" -ArgumentList
"C:\DEV\t1-host-sw-ii\50_src\Help\En\repo\T1.hmxp","/CHM=C:\DEV\t1-host-sw-ii\_build\T1.chm","/O=C:\DEV\t1-host-sw-i
i\50_src\Help\En\repo\CHM Skin, Gliwa.hmskin","/V=C:\DEV\t1-host-sw-ii\_build\variables.txt"

(I only spotted the /V this morning .. what a bliss. I had a tool updating the T1.hmxp instead :( )
User avatar
dgaudian
Posts: 11
Joined: Tue Nov 17, 2020 5:29 pm

Re: Command Line call randomly hangs

Unread post by dgaudian »

If I had gotten the calling syntax wrong when parameters contain spaces, I would expect compile errors or a faulty output. But everything is alright there, it was just the extremely long time before the command terminated that was my problem.

I have now also added the /stdout parameter and our build servers have not reported any (timeout) error since.

Thank you all for your kind help, I think my problem is terminally fixed!
Dirk Gaudian - Senior Software Developer UI/UX - GLIWA embedded systems GmbH
Post Reply