Custom Query

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (151 - 153 of 3856)

Ticket Resolution Summary Owner Reporter
#152 Fixed StdoutRead maxes CPU on process (when not run from SciTe). Valik Saunders <admin@…>
Description

There appears to be a bug with StdoutRead that causes the spawned process to max out the CPU. I've provided two scripts, because this was the cleanest and simplest way I could discern to demonstrate the bug, I believe my code should work properly, although if there are errors with the code itself, feel free to ream me out for borking it.

Anyway, this first piece of code is the Child script, save it in a folder as TestChild.au3.

; Very simple script that should NOT max out the CPU
Do
	ConsoleWrite('Loop')
Until MsgBox(4, '', 'Continue?') = 7

This second piece of code is the Parent script, save it in the same folder as TestChild.au3.

#include <Constants.au3>

Global $sOutput, $sStdoutRead
Global $iScriptPID = Run(FileGetShortName(@AutoItExe) & ' ' & FileGetShortName(@ScriptDir & '\TestChild.au3'), @ScriptDir, @SW_HIDE, $STDOUT_CHILD)

While 1
	If $iScriptPID Then
		$sStdoutRead = StdoutRead($iScriptPID)
		If Not @error Then
			If @extended Then
				$sOutput &= $sStdoutRead & @LF
				ToolTip('Parent PID: ' & @AutoItPID & @LF & 'Child PID: ' & $iScriptPID & @LF & $sOutput)
			EndIf
		Else
			$iScriptPID = False
		EndIf
		Sleep(100)
	Else
		MsgBox(0, '', 'Parent exiting')
		ExitLoop
	EndIf
WEnd

Now, this is important, run the Parent script, but not through SciTe. I found that for whatever reason, running this code through SciTe doesn't give me any problems.

Now, while it's running have a look at your Task Manager, you should see that the child process is maxing out the CPU, and considering that it should be stopped on a MsgBox(), I really don't think it should be doing that.

#153 Fixed Running process with $STDOUT_CHILD kills ConsoleWrite. Valik Saunders <admin@…>
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)
#154 No Bug Error : Can not redeclare a constant eyjerome@…
Description

Hello !

I'm a new user of AutoIt (3.2.10.0). For start, i used the help file. But, when i use the sample script of the function _ArrayAdd (or other) :

#include <Array.au3>
Dim $avArray[10]
$avArray[0] = "JPM"
$avArray[1] = "Holger"
$avArray[2] = "Jon"
$avArray[3] = "Larry"
$avArray[4] = "Jeremy"
$avArray[5] = "Valik"
$avArray[6] = "Cyberslug"
$avArray[7] = "Nutster"
$avArray[8] = "JdeB"
$avArray[9] = "Tylo"
_ArrayDisplay( $avArray, "Whole array" )
_ArrayAdd( $avArray,"Brian")
_ArrayDisplay( $avArray, "Updated Array" )

I get :

Files\AutoIt3\Examples\Helpfile\_ArrayAdd.au3"    
C:\PROGRAM FILES\AUTOIT3\Include\Memory.au3 (56) : ==> Can not redeclare a constant.: 
Global Const $PROCESS_TERMINATE = 0x00000001 
Global Const ^ ERROR
>Exit code: 1    Time: 3.380

Can I make an error or is this a bug ?

Thanks (and sorry for my english ;-) )

Jérôme

Note: See TracQuery for help on using queries.