Modify

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#153 closed Bug (Fixed)

Running process with $STDOUT_CHILD kills ConsoleWrite.

Reported by: Saunders <admin@…> Owned by: Valik
Milestone: 3.2.11.3 Component: AutoIt
Version: 3.2.11.1 Severity:
Keywords: Cc:

Description

When the following code is run nothing appears in the console. It's not a big worry, but I thought it should be reported.

#include <Constants.au3>

Global $iTimer = TimerInit()
Global $iProcess = Run('cmd.exe /c', @SystemDir, @SW_SHOW, $STDOUT_CHILD)

Do
	ConsoleWrite('No ConsoleWrite for you!')
	Sleep(100)
Until TimerDiff($iTimer) > 5000
StdioClose($iProcess)
ConsoleWrite('That''s all folks!' & @CRLF)

Attachments (2)

Parent.au3 (1.2 KB) - added by Valik 17 years ago.
Child.au3 (464 bytes) - added by Valik 17 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 17 years ago by Valik

I can not reproduce that either via SciTE or compiling as a Console application. I always get the output as expected.

comment:2 Changed 17 years ago by Saunders <admin@…>

Hmm, strange. Just found something that may be important. I actually have (in SciTe) a separate hotkey to run a script without the AutoIt wrapper. It is when I do this that I get the confusing results. If I use the AutoIt wrapper I get the expected results in the console.
Without the wrapper I get this in the console:

>"C:\Program Files\AutoIt3\autoit3.exe" /ErrorStdOut "D:\Rob\AutoIt\_Scraps\_scrap.au3"    
>Exit code: 0    Time: 5.198


I also tried without the /ErrorStdOut, same thing:

>"C:\Program Files\AutoIt3\autoit3.exe" "D:\Rob\AutoIt\_Scraps\_scrap.au3"    
>Exit code: 0    Time: 5.241


Sorry I didn't think of that before.

comment:3 Changed 17 years ago by Valik

Baffling. I wonder what obscure dance to a deity I must do to figure this one out. As best I can tell, there's no functional difference in the code between 3.2.10.0 and 3.2.11.x... yet things don't work.

comment:4 Changed 17 years ago by Saunders <admin@…>

Which dance indeed? And which deity for that matter?
I'm just glad I'm not the only one experiencing this bug, you had me worried there for a minute when it wasn't happening to you.

comment:5 Changed 17 years ago by Valik

  • Milestone set to 3.2.11.3
  • Owner set to Valik
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed in version: 3.2.11.3

comment:6 Changed 17 years ago by Valik

If you only knew how obscure this was. I've actually known the entire time what the problem was, but it took some time to write a script to prove it and to debug it. Oh, then there's the fact that I only looked at the issue on 2 occasions in the last couple weeks.

Changed 17 years ago by Valik

Changed 17 years ago by Valik

comment:7 Changed 17 years ago by Valik

Added the scripts I used to test with.

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Valik.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.