Modify

Opened 18 years ago

Closed 18 years ago

Last modified 18 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 18 years ago.
Child.au3 (464 bytes ) - added by Valik 18 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 by Valik, 18 years ago

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

comment:2 by Saunders <admin@…>, 18 years ago

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 by Valik, 18 years ago

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 by Saunders <admin@…>, 18 years ago

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 by Valik, 18 years ago

Milestone: 3.2.11.3
Owner: set to Valik
Resolution: Fixed
Status: newclosed

Fixed in version: 3.2.11.3

comment:6 by Valik, 18 years ago

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.

by Valik, 18 years ago

Attachment: Parent.au3 added

by Valik, 18 years ago

Attachment: Child.au3 added

comment:7 by Valik, 18 years ago

Added the scripts I used to test with.

Modify Ticket

Action
as closed The owner will remain Valik.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.