Groups | Search | Server Info | Login | Register


Groups > comp.lang.tcl > #55526

Re: Very hard to debug issue

From et99 <et99@rocketship1.me>
Newsgroups comp.lang.tcl
Subject Re: Very hard to debug issue
Date 2026-03-04 17:09 -0800
Organization A noiseless patient Spider
Message-ID <10oal4l$3dic8$1@dont-email.me> (permalink)
References <10o8p08$164bd$1@tota-refugium.de> <10o9amg$2tsin$1@dont-email.me>

Show all headers | View raw


On 3/4/2026 5:05 AM, Rich wrote:
> meshparts <alexandru.dadalau@meshparts.de> wrote:
>> # Start the part generation process
>> set res [::twapi::create_process "" -cmdline $cmdline -returnhandles 1
>> -inherithandles 1 -stdchannels [list $processStdin $processStdoutErr
>> $processStdoutErr]]
> 
> One of the error messages, which **should** have been in this message,
> you finally included in a followup (always remember that none of us
> here can read your mind over USENET):
> 
>> The only thing that is common to the messages is this: "Das system kann
>> die angegebene Datei nicht finden" which means "The system cannot find
>> the specified file."
> 
> Given this, what is the contents, and type, of "$cmdline".
> 
> You will very likely get this exact error if $cmdline is a plain
> string, and if the first parameter therein is a path containing one or
> more space characters somewhere.  Note the caution in the twapi docs
> over "create_process":
> 
>      Caller should ensure that CMDLINE is quoted appropriately.
> 
> So I suspect your failure message on this one PC because this one user
> has a directory naming setup where $cmdline contains a path with spaces.


On windows, there are several tools that can be used to determine the true command line that is executed. I've found that when using tcl to launch something, it's not always exactly what I thought it would be, especially when using exec. Quoting can be particularly confusing sometimes.

I see however, that the OP is using twapi, which likely doesn't have this problem. However, here is how I would capture the command lines of all programs being launched - even if they exit immediately.


First the tool is from Microsoft at:

https://learn.microsoft.com/en-us/sysinternals/downloads/procmon

Then on running the tool (it's in a zip, no install needed, just extract and run), one would go into the filters, filter menu, item filter...

(if this is the first time using the tool, click on reset)

Add one item and make sure it is checked,

      operation is process start then include

click apply or ok

All running programs from then on will log a single line including the true command line as run. There are many other filters that can be turned on such as setting the process name to the name of the program.exe that is being run. This program runs as some kind of driver, so it can capture events where a program runs, gets an error, and quickly exits.


Alternatively, if the program doesn't exit immediately, there is process explorer, found here,

https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer

And this will by default show all the processes running. One can simply hover the mouse pointer over any process and it will show the command line used to launch that program.

-e

Back to comp.lang.tcl | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Very hard to debug issue meshparts <alexandru.dadalau@meshparts.de> - 2026-03-04 09:03 +0100
  Re: Very hard to debug issue undroidwish <undroidwish@googlemail.com> - 2026-03-04 10:12 +0100
    Re: Very hard to debug issue meshparts <alexandru.dadalau@meshparts.de> - 2026-03-04 12:35 +0100
    Re: Very hard to debug issue Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk> - 2026-03-11 17:12 +0000
  Re: Very hard to debug issue Ralf Fassel <ralfixx@gmx.de> - 2026-03-04 12:09 +0100
    Re: Very hard to debug issue meshparts <alexandru.dadalau@meshparts.de> - 2026-03-04 12:37 +0100
      Re: Very hard to debug issue Christian Gollwitzer <auriocus@gmx.de> - 2026-03-04 21:26 +0100
        Re: Very hard to debug issue meshparts <alexandru.dadalau@meshparts.de> - 2026-03-05 07:25 +0100
    Re: Very hard to debug issue meshparts <alexandru.dadalau@meshparts.de> - 2026-03-04 12:40 +0100
    Re: Very hard to debug issue meshparts <alexandru.dadalau@meshparts.de> - 2026-03-04 12:41 +0100
    Re: Very hard to debug issue meshparts <alexandru.dadalau@meshparts.de> - 2026-03-04 12:42 +0100
  Re: Very hard to debug issue Rich <rich@example.invalid> - 2026-03-04 13:05 +0000
    Re: Very hard to debug issue et99 <et99@rocketship1.me> - 2026-03-04 17:09 -0800
      Re: Very hard to debug issue meshparts <alexandru.dadalau@meshparts.de> - 2026-03-05 07:19 +0100
    Re: Very hard to debug issue meshparts <alexandru.dadalau@meshparts.de> - 2026-03-05 07:20 +0100
      Re: Very hard to debug issue Rich <rich@example.invalid> - 2026-03-05 13:29 +0000
        Re: Very hard to debug issue meshparts <alexandru.dadalau@meshparts.de> - 2026-03-05 16:43 +0100
          Re: Very hard to debug issue Rich <rich@example.invalid> - 2026-03-05 17:02 +0000
        Re: Very hard to debug issue meshparts <alexandru.dadalau@meshparts.de> - 2026-03-05 16:45 +0100
          Re: Very hard to debug issue et99 <et99@rocketship1.me> - 2026-03-05 11:49 -0800
            Re: Very hard to debug issue meshparts <alexandru.dadalau@meshparts.de> - 2026-03-06 08:32 +0100
              Re: Very hard to debug issue Rich <rich@example.invalid> - 2026-03-06 14:51 +0000
                Re: Very hard to debug issue meshparts <alexandru.dadalau@meshparts.de> - 2026-03-06 18:39 +0100
                Re: Very hard to debug issue Ralf Fassel <ralfixx@gmx.de> - 2026-03-16 12:12 +0100
                Re: Very hard to debug issue meshparts <alexandru.dadalau@meshparts.de> - 2026-03-18 21:28 +0100

csiph-web