1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WAD TPIPE.EXE has stopped working

Discussion in 'Support' started by vefatica, Jul 7, 2012.

  1. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,972
    Likes Received:
    30
    Interrupting this command with the console's "X" causes "TPIPE.EXE has stopped working (et c.)"

    Code:
    (do x=1000001 to 1008389 ( echo %x %@repeat[x,990] ) ) | tpipe /simple=34
     
  2. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,972
    Likes Received:
    30
    Ctrl-C and Ctrl-Break have the same result.
     
  3. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,870
    Likes Received:
    83
    WAD -- what would you expect it to do after you killed its input?
     
  4. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,972
    Likes Received:
    30
    I'd expect it to do the same thing that SORT, GREP, FINDSTR, and dozens of other similar text utilities do, handle the event by exiting gracefully.
     
  5. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,870
    Likes Received:
    83
  6. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,972
    Likes Received:
    30
    I figured you wrote the EXE and could put a console control handler in it.
     
  7. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,870
    Likes Received:
    83
    It does have a control handler. Won't help for this (somewhat contrived?) instance.

    It'll also be a lot faster to redirect output to a file, and then have TPIPE read the file.
     
  8. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,972
    Likes Received:
    30
    TPIPE.EXE doesn't import SetConsoleCtrlHandler().

    Writing to a file first is only a tad faster (and leaves an extra file hanging around).
    Code:
    v:\> timer & (do x=1000001 to 1008389 ( echo %x %@repeat[x,990] ) ) | tpipe /simple=34 > nul & timer
    Timer 1 on: 22:33:15
    Timer 1 off: 22:33:17  Elapsed: 0:00:02.85
     
    v:\> timer & (do x=1000001 to 1008389 ( echo %x %@repeat[x,990] ) ) > cat1.txt & tpipe /input=cat1.txt /simple=34 > nul & timer
    Timer 1 on: 22:34:36
    Timer 1 off: 22:34:39  Elapsed: 0:00:02.62
    And you also get "TPIPE.EXE has stopped working" when you try to interrupt the likes of:
    Code:
    tpipe /input=cat1.txt /simple=34
     
  9. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,870
    Likes Received:
    83
    As it happens, I have the source code for TPIPE.EXE, and it definitely does set a console control handler.

    But it's irrelevant in your example, because you're killing a different process.
     
  10. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,870
    Likes Received:
    83
    Your test is a bit flawed, as it's spending most of its time in the DO loop, not in TPIPE. Your data set is also pretty small, which also skews the results.
     
  11. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,972
    Likes Received:
    30
    I'm only reporting what I see.
    Code:
    v:\> dumpbin /imports g:\tc14\TPipe.exe | grep -i console
                      19A GetConsoleCP
                      524 WriteConsoleW
                      1AC GetConsoleMode
    What other process? If I use the Start\Run dialog to execute "g:\tc14\tpipe.exe /input=v:\tac1.txt /simple=34" I cannot interrupt it without getting "TPIPE.EXE has stopped working". IMHO, that should never happen (or be called WAD).
     
  12. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,870
    Likes Received:
    83
    You can't see the whole file. Like the other .exe's, tpipe.exe is partially encrypted.
     
  13. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,870
    Likes Received:
    83
    I agree, but I also can't do anything about it. I've already passed it on to the developers, but I don't think it's significant enough to spend much time worrying about.
     
  14. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,972
    Likes Received:
    30
    Hmmm! I think not being able to interrupt such a program is very significant. I hope they agree.

    P.S., I was hoping you'd respond to "A question for Rex" in the plugins forum.
     

Share This Page