Jump to content

AUTOIT ERROR, Error Management


BasicOs
 Share

Recommended Posts

I did whatever is recommended in forum, Svenp com error UDF, Opt(runerrorsfatal, 0).

Some Windows 98 issues in some pcs, e.g. "AUTOIT ERROR" with "xxxxprocesslist not found xxxx"

Is there a timeout for this error msgbox in some secs?

some management error routine?

it keeps showing sad.gif same app only win 98 as two AutoitScripts try to call the PROCESSLIST() at the same time.

I prefer to ignore the error, because it is not important if the processlist routine does not execute as desired, as it is part of a bigger Scripts which do other things.

Autoit.es - Foro Autoit en Español Word visitors Image Clustrmap image: - Football Spanish team - Spanish team: Casillas, Iniesta, Villa, Xavi, Puyol, Campdevilla, etc..Programando en Autoit+Html - Coding Autoit-Html - Arranca programas desde Internet - Preprocesador de Autoit a http
Link to comment
Share on other sites

I did whatever is recommended in forum, Svenp com error UDF, Opt(runerrorsfatal, 0).

Some Windows 98 issues in some pcs, e.g. "AUTOIT ERROR" with "xxxxprocesslist not found xxxx"

Is there a timeout for this error msgbox in some secs?

some management error routine?

it keeps showing sad.gif same app only win 98 as two AutoitScripts try to call the PROCESSLIST() at the same time.

I prefer to ignore the error, because it is not important if the processlist routine does not execute as desired, as it is part of a bigger Scripts which do other things.

There is no timeout as for all other fatalerrors.

The runerrorsfatal apply only to run/runwait functions.

So Your script have to take care of not calling other functions with bad parameters.

I am curious to see which functions produce the error under Win98 with the corresponding error message. :lmao:

Link to comment
Share on other sites

There is no timeout as for all other fatalerrors.

The runerrorsfatal apply only to run/runwait functions.

So Your script have to take care of not calling other functions with bad parameters.

I am curious to see which functions produce the error under Win98 with the corresponding error message. :whistle:

If Not ProcessExists($procesos[$i]) Then here,

unable to get a list of running processes

maybe has something to do with a windows 98 qeue to control active processes as there are more scripts taking care of the processess. In windows XP works fine.

is there anyway to avoid this kind of msgs? as it is a not important part of the script but it should not give any msgbox(): problems with user

For $i = 1 To $procesos[0] Step 4
      ; msgbox(0,"",$procesos[$i + 1]&"."&$procesos[$i + 2])
      If Not ProcessExists($procesos[$i]) Then
         $wsecerro = 1
         If  FileExists($procesos[$i + 1]) Then
            Run($procesos[$i + 1], $procesos[$i + 2], $procesos[$i + 3])
         EndIf
     EndIf
  next
Edited by BasicOs
Autoit.es - Foro Autoit en Español Word visitors Image Clustrmap image: - Football Spanish team - Spanish team: Casillas, Iniesta, Villa, Xavi, Puyol, Campdevilla, etc..Programando en Autoit+Html - Coding Autoit-Html - Arranca programas desde Internet - Preprocesador de Autoit a http
Link to comment
Share on other sites

That code is inherently flawed. You can't iterate like that. You'll run off the end of the array almost every single time.

$procesos[0] is a list of processes, I wish to control, the end of the array is when last process is checked out. IN windows XP anyway works fine, and in windows 98 also when only one script controlling. but the problem is because there are other scripts doing the same control at the same time, when a second process is trying to do it, I get this msgbox.

What I really wish it to quit the error msgbox or try to time it out. I do not worry about the problem because there is another script which is controlling it, I worry about the message, it shows there is a problem when it is a not critical error for my script, I do not care much when this is not working indeed.

I do not want to do a winexists(Autoit Error) then send enter because it is only in windows 98 in 20% of pcs.

Edited by BasicOs
Autoit.es - Foro Autoit en Español Word visitors Image Clustrmap image: - Football Spanish team - Spanish team: Casillas, Iniesta, Villa, Xavi, Puyol, Campdevilla, etc..Programando en Autoit+Html - Coding Autoit-Html - Arranca programas desde Internet - Preprocesador de Autoit a http
Link to comment
Share on other sites

What I really wish it to quit the error msgbox or try to time it out. I do not worry about the problem because there is another script which is controlling it, I worry about the message, it shows there is a problem when it is a not critical error for my script, I do not care much when this is not working indeed.

I do not want to do a winexists(Autoit Error) then send enter

It is not a fault of AutoIt, but rather you going out of bound with your array.

Look at the faulty line and fix it.

If  FileExists($procesos[$i + 1]) Then

as no check is done to work out if the "+ 1" is indexing the array out of bounds or not.

Link to comment
Share on other sites

If you don't think your code is broken, run this:

Const $UBOUND = 29
For $i = 1 To $UBOUND Step 4
    ConsoleWrite("$i: " & $i & @CRLF)
    If $i > $UBOUND Then ConsoleWrite("$i > $UBOUND, Index out of range." & @CRLF)
    If $i + 1 > $UBOUND Then ConsoleWrite("$i + 1 > $UBOUND, Index out of range." & @CRLF)
    If $i + 2 > $UBOUND Then ConsoleWrite("$i + 2 > $UBOUND, Index out of range." & @CRLF)
    If $i + 3 > $UBOUND Then ConsoleWrite("$i + 3 > $UBOUND, Index out of range." & @CRLF)
Next
 oÝ÷ Ø)^j¹r¶¡×¢±ºèéØ¢ë"rq©ç¢Ö¥4ߨ­¢
² «4ߥ9CC²×©¦)ào.iÈmg×±¥ç-m¢¯y©è½êßç(®··²¶+×­ç(uè¬jëh×6
Const $UBOUND = 29
For $i = 1 To $UBOUND - 3 Step 4
    ConsoleWrite("$i: " & $i & @CRLF)
    If $i > $UBOUND Then ConsoleWrite("$i > $UBOUND, Index out of range." & @CRLF)
    If $i + 1 > $UBOUND Then ConsoleWrite("$i + 1 > $UBOUND, Index out of range." & @CRLF)
    If $i + 2 > $UBOUND Then ConsoleWrite("$i + 2 > $UBOUND, Index out of range." & @CRLF)
    If $i + 3 > $UBOUND Then ConsoleWrite("$i + 3 > $UBOUND, Index out of range." & @CRLF)
Next

Since you know you will be checking $i + 3, you know you don't need to go any further than $UBOUND - 3. With $UBOUND - 2, $UBOUND - 1 or $UBOUND - 0, there are not enough elements left in the array to do $i + 1, $i + 2 or $i + 3.

Edit: Removed word that snuck in.

Edited by Valik
Link to comment
Share on other sites

If you don't think your code is broken, run this:

Const $UBOUND = 29
For $i = 1 To $UBOUND Step 4
    ConsoleWrite("$i: " & $i & @CRLF)
    If $i > $UBOUND Then ConsoleWrite("$i > $UBOUND, Index out of range." & @CRLF)
    If $i + 1 > $UBOUND Then ConsoleWrite("$i + 1 > $UBOUND, Index out of range." & @CRLF)
    If $i + 2 > $UBOUND Then ConsoleWrite("$i + 2 > $UBOUND, Index out of range." & @CRLF)
    If $i + 3 > $UBOUND Then ConsoleWrite("$i + 3 > $UBOUND, Index out of range." & @CRLF)
Next
 oÝ÷ Ø)^j¹r¶¡×¢±ºèéØ¢ë"rq©ç¢Ö¥4ߨ­¢
² «4ߥ9CC²×©¦)ào.iÈmg×±¥ç-m¢¯y©è½êßç(®··²¶+×­ç(uè¬jëh×6
Const $UBOUND = 29
For $i = 1 To $UBOUND - 3 Step 4
    ConsoleWrite("$i: " & $i & @CRLF)
    If $i > $UBOUND Then ConsoleWrite("$i > $UBOUND, Index out of range." & @CRLF)
    If $i + 1 > $UBOUND Then ConsoleWrite("$i + 1 > $UBOUND, Index out of range." & @CRLF)
    If $i + 2 > $UBOUND Then ConsoleWrite("$i + 2 > $UBOUND, Index out of range." & @CRLF)
    If $i + 3 > $UBOUND Then ConsoleWrite("$i + 3 > $UBOUND, Index out of range." & @CRLF)
Next

Since you know you will be checking $i + 3, you know you don't need to go any further than $UBOUND - 3. With $UBOUND - 2, $UBOUND - 1 or $UBOUND - 0, there are not enough elements left in the array to do $i + 1, $i + 2 or $i + 3.

Edit: Removed word that snuck in.

Thanks both for answer

@You are right, with $UBOUND=29, but I do not use $UBOUND=29 but $UBOUND =28, so it works.:whistle:

anyway the error i Think it may be a bug of ProcessExists that does not work in the same way under winXp and Win98.(it happened to my with a couple of funcs more under IE.au3 udfs may be ie55 version has to do)

I would like to stop the Error msg as it looks like a critical error when there is not critical one

Edited by BasicOs
Autoit.es - Foro Autoit en Español Word visitors Image Clustrmap image: - Football Spanish team - Spanish team: Casillas, Iniesta, Villa, Xavi, Puyol, Campdevilla, etc..Programando en Autoit+Html - Coding Autoit-Html - Arranca programas desde Internet - Preprocesador de Autoit a http
Link to comment
Share on other sites

Two things. First, you're relying on dumb luck for your code to work. Good luck with that. Second, you haven't shown any code that reproduces any problem. The only code you have shown so far is flawed. If you're not going to give code that can duplicate the problem, don't bother posting.

Link to comment
Share on other sites

Two things. First, you're relying on dumb luck for your code to work. Good luck with that. Second, you haven't shown any code that reproduces any problem. The only code you have shown so far is flawed. If you're not going to give code that can duplicate the problem, don't bother posting.

Thanks for helping..

Well the problem is that:

same code works perfectly in Windows XP. Tested in 10 different PCS.

same code works perfectly in Windows 98 when there is only one Script calling this line.(have to check)

same code gets this Autoit Error if a second Script or scripts-Array is calling the line OR maybe something special of Win 98

more I have tested in many different ways, it keeps allways same msg ...

I am content if somebody knows if I can stop the bug to show the Error because it is minor function I do not mind in Windows 98.

That is what the autoit Error msgbox says: " unable to get a list of running processes"

The problem is when

if ProcessExists("someProcess.exe") Then

calling that from a multiple-thread of some Scripts array, executing same line at the same time.

I am very sorry sometimes I can not explain things as well as I liked to, try to understand from the good side.

Edited by BasicOs
Autoit.es - Foro Autoit en Español Word visitors Image Clustrmap image: - Football Spanish team - Spanish team: Casillas, Iniesta, Villa, Xavi, Puyol, Campdevilla, etc..Programando en Autoit+Html - Coding Autoit-Html - Arranca programas desde Internet - Preprocesador de Autoit a http
Link to comment
Share on other sites

By now the only chance I found to destroy the AUTOIT ERROR " unable to get a list of running processes"

IS TO CREATE ANOTHER PROCESS WHICH:

if winexists("AUTOIT ERROR") THEN

WINACTIVATE("AUTOIT ERROR")

SEND("{ENTER}")

ENDIF

if anybody has another solution of keeping this msgbox out of user´s view tell me, thank you

Autoit.es - Foro Autoit en Español Word visitors Image Clustrmap image: - Football Spanish team - Spanish team: Casillas, Iniesta, Villa, Xavi, Puyol, Campdevilla, etc..Programando en Autoit+Html - Coding Autoit-Html - Arranca programas desde Internet - Preprocesador de Autoit a http
Link to comment
Share on other sites

Alright, that string really is part of AutoIt so we'll take a look. I think you could have come up with a better example, however. Posting a bugged example isn't really a good way to get us to look at something.

Edit: To be precise, posting an example demonstrating a problem but posting an example that has other unrelated bugs is not a good way.

Edited by Valik
Link to comment
Share on other sites

By now the only chance I found to destroy the AUTOIT ERROR " unable to get a list of running processes"

IS TO CREATE ANOTHER PROCESS WHICH:

if winexists("AUTOIT ERROR") THEN

WINACTIVATE("AUTOIT ERROR")

SEND("{ENTER}")

ENDIF

if anybody has another solution of keeping this msgbox out of user´s view tell me, thank you

You can use adlibenable in your script if you don't use already it.
Link to comment
Share on other sites

JP, ProcessExists() is failing with a fatal error because it's failing to load the process functions for some reason. It's a fatal, script-ending error. Adlib won't help with that, obviously. With that said, I don't see why the code would fail. I'm going to have to figure out if I can duplicate the error and then debug it from there. There's no reason AutoIt shouldn't be loading the process-related functions.

Link to comment
Share on other sites

JP, ProcessExists() is failing with a fatal error because it's failing to load the process functions for some reason. It's a fatal, script-ending error. Adlib won't help with that, obviously. With that said, I don't see why the code would fail. I'm going to have to figure out if I can duplicate the error and then debug it from there. There's no reason AutoIt shouldn't be loading the process-related functions.

You right it is late here I need to go to bed ...
Link to comment
Share on other sites

You can use adlibenable in your script if you don't use already it.

I adlibenable is multithread? i DO NOT need to create a loop to catch the error?. I can RUN adlib in the process which remains alive.. :whistle:

@Valik I can not send you whole code more 300 lines this script, I send you the UDF.

$sListofProcesses = "process.exe;c:\Archivos de Programa\Project1\process.exe;c:\Archivos de Programa\Project1;" & @SW_MAXIMIZE

func multiProcessControl($sListofProcesses)
    $procesos = StringSplit($sListofProcesses, ";")
    For $i = 1 To $procesos[0] Step 4
        If Not ProcessExists($procesos[$i]) Then
            $wsecerro = 1
            If  FileExists($procesos[$i + 1]) Then
                Run($procesos[$i + 1], $procesos[$i + 2], $procesos[$i + 3])
            EndIf
        EndIf
       Next
endFunc

EDIT: Thanks .. if @OSType="WIN32_WINDOWS" THEN AdlibEnable("ControlaAUTOITERROR",1000)

Edited by BasicOs
Autoit.es - Foro Autoit en Español Word visitors Image Clustrmap image: - Football Spanish team - Spanish team: Casillas, Iniesta, Villa, Xavi, Puyol, Campdevilla, etc..Programando en Autoit+Html - Coding Autoit-Html - Arranca programas desde Internet - Preprocesador de Autoit a http
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...