List Index out of Bounds

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Eric D
Junior Coder
Posts: 27
Joined: Thu Sep 19, 2002 6:08 pm
Location: Orange County, CA

List Index out of Bounds

Post by Eric D » Wed Apr 16, 2003 12:13 am

I am gettting an error inside of Macro Scheduler when I attempt to exit. I click the close button and normally I get the save changes prompt but now I get a dialog that says List Index of Bounds(-1)

Does anyone know what causes this?


Thanks
Eric Dye

Here is my script


'//Redundant Credit Translator
'//Author Eric Dye
'//Date 04/12/2003
'//Version 1.1
'//Last Revision




'//Logs Time Program Was started
GetDate>StartDate
GetTime>StartTime
WriteLn>%LogPath%CredLog.txt,result,%StartDate% %StartTime% - Redundant Credit Uniform Translator has started

IfFileExists>K:\apps\Credit\File.Ref,Connected
GoSub>Reconnect

Label>Disconnect
IfFileExists>K:\apps\Credit\File.Ref,Connected
Goto>Disconnect


Label>Connected
'// Path Variables '//Change to prod path in INI before deployment

Let>RedCredIni=k:\apps\credit\ini\redcred.ini
ReadIniFile>%RedCredIni%,settings,MaxRetry,MaxRetry
ReadIniFile>%RedCredIni%,settings,ReconnectTimeout,ReconnectTimeout
ReadIniFile>%RedCredIni%,Paths,InputPath,InputPath
ReadIniFile>%RedCredIni%,Paths,LogPath,LogPath
ReadIniFile>%RedCredIni%,Email,MailIp,MailIp
ReadIniFile>%RedCredIni%,Email,Recipients,Recipients


Let>Counter=0
Let>LogCount=0


GetDate>StartDate
GetTime>StartTime
WriteLn>%LogPath%CredLog.txt,result,%StartDate% %StartTime% - Redundant Credit Uniform Translator is Running and Active


Label>Begin
'//Check again to make sure connection is continued
IfFileExists>K:\apps\Credit\File.Ref,Continue
GoSub>Reconnect
Label>Continue


'//Sleep Timing Goes Here

GetTime>TIME
MidStr>TIME,1,2,HH
MidStr>TIME,10,11,AMPM
ConCat>TIME_MIN,AMPM
If>AMPM=AM,TimeChk
IF>HH=12,TimeChk
If>HH>%EndTime%,Program_End
Label>TimeChk



'//Logging Goes Here

IfFileExists>%InputPath%*.txt,BeginParse
Wait>1
Goto>Begin


'//Get File Names and Process
Label>BeginParse

GetFileList>%InputPath%*.*,files
Separate>files,;,file_names

'//Begin Loop to process through files and load up the parameter variables
Let>k=0
Repeat>k
GetTime>ParseStart
Let>k=k+1
ReadLn>file_names_%k%,1,line
If>line=##EOF##,finish
'MessageModal>line

'//Parse and load variables here
MidStr>line,1,16,loan_number
MidStr>line,17,15,first_name
MidStr>line,32,15,last_name
MidStr>line,124,1,middle_initial
MidStr>line,47,11,ssn
MidStr>line,58,9,street_number
MidStr>line,67,22,street_name
MidStr>line,125,10,street_type
MidStr>line,89,20,city
MidStr>line,109,2,state
MidStr>line,111,10,zip
MidStr>line,121,3,processor_name
MidStr>line,135,15,co_first_name
MidStr>line,150,15,co_last_name
MidStr>line,165,1,co_middle_initial
MidStr>line,166,11,co_ssn
MidStr>line,177,9,property_street_number
MidStr>line,186,22,property_street_name
MidStr>line,208,10,property_street_type
MidStr>line,218,20,property_city
MidStr>line,238,2,property_state
MidStr>line,240,10,property_zip
MidStr>line,250,4,branch_number
MidStr>line,254,1,force_reorder
MidStr>line,255,1,los_id


VBSTART
VBEND

VBEVAL>Trim(%loan_number%),loan_number
VBEVAL>Trim("%first_name%"),first_name
VBEVAL>Trim("%last_name%"),last_name
VBEVAL>Trim("%middle_initial%"),middle_initial
VBEVAL>Trim("%ssn%"),ssn
VBEVAL>Trim("%street_number%"),street_number
VBEVAL>Trim("%street_name%"),street_name
VBEVAL>Trim("%street_type%"),street_type
VBEVAL>Trim("%city%"),city
VBEVAL>Trim("%state%"),state
VBEVAL>Trim("%zip%"),zip
VBEVAL>Trim("%processor_name%"),processor_name
VBEVAL>Trim("%co_first_name%"),co_first_name
VBEVAL>Trim("%co_last_name%"),co_last_name
VBEVAL>Trim("%co_middle_initial%"),co_middle_initial
VBEVAL>Trim("%co_ssn%"),co_ssn
VBEVAL>Trim("%property_street_number%"),property_street_number
VBEVAL>Trim("%property_street_name%"),property_street_name
VBEVAL>Trim("%property_street_type%"),property_street_type
VBEVAL>Trim("%property_city%"),property_city
VBEVAL>Trim("%property_state%"),property_state
VBEVAL>Trim("%property_zip%"),property_zip
VBEVAL>Trim("%branch_number%"),branch_number
VBEVAL>Trim("%force_reorder%"),force_reorder
VBEVAL>Trim("%los_id%"),los_id

VBEVAL>Escape(%loan_number%),loan_number
VBEVAL>Escape("%first_name%"),first_name
VBEVAL>Escape("%last_name%"),last_name
VBEVAL>Escape("%middle_initial%"),middle_initial
VBEVAL>Escape("%ssn%"),ssn
VBEVAL>Escape("%street_number%"),street_number
VBEVAL>Escape("%street_name%"),street_name
VBEVAL>Escape("%street_type%"),street_type
VBEVAL>Escape("%city%"),city
VBEVAL>Escape("%state%"),state
VBEVAL>Escape("%zip%"),zip
VBEVAL>Escape("%processor_name%"),processor_name
VBEVAL>Escape("%co_first_name%"),co_first_name
VBEVAL>Escape("%co_last_name%"),co_last_name
VBEVAL>Escape("%co_middle_initial%"),co_middle_initial
VBEVAL>Escape("%co_ssn%"),co_ssn
VBEVAL>Escape("%property_street_number%"),property_street_number
VBEVAL>Escape("%property_street_name%"),property_street_name
VBEVAL>Escape("%property_street_type%"),property_street_type
VBEVAL>Escape("%property_city%"),property_city
VBEVAL>Escape("%property_state%"),property_state
VBEVAL>Escape("%property_zip%"),property_zip
VBEVAL>Escape("%branch_number%"),branch_number


'//HTTP Post Here

Let>PostData=loan_number=%loan_number%&first_name=%first_name%&last_name=%last_name%&middle_initial=%middle_initial%&ssn=%ssn%&street_number=%street_number%&street_name=%street_name%&street_type=%street_type%&city=%city%&state=%state%&zip=%zip%&processor_name=%processor_name%&co_first_name=%co_first_name%&co_last_name=%co_last_name%&co_middle_initial=%co_middle_initial%&co_ssn=%co_ssn%&property_street_number=%property_street_number%&property_street_name=%property_street_name%&property_street_type=%property_street_type%&property_city=%property_city%&property_state=%property_state%&property_zip=%property_zip%&branch_number=%branch_number%&force_reorder=%force_reorder%&los_id=%los_id%
HTTPRequest>http://iis-comm-d1/RCSProto/rcs.asmx/Fe ... ,%PostData%,
Let>Counter=Counter+1
Let>LogCount=LogCount+1
MessageModal>%Counter%

'//Delete Source File
DeleteFile>file_names_%k%
GoSub>BlankParams


Label>finish
Until>k,file_names_count

GetDate>Date
GetTime>Time
WriteLn>%LogPath%CredLog.txt,result,%Date% %Time% - %LogCount% Files Successfully Processed
Let>LogCount=0
Goto>Begin

Label>Program_End

GetDate>Date
GetTime>Time
WriteLn>%LogPath%CredLog.txt,result,%Date% %Time% - %Counter% Files Successfully Processed Today
GetDate>Date
GetTime>Time
WriteLn>%LogPath%CredLog.txt,result,%Date% %Time% - Uniform Translator Shutting Down
WriteLn>%LogPath%CredLog.txt,result,
WriteLn>%LogPath%CredLog.txt,result,


'/// Sub Routines Beyond This Point \\\\

SRT>BlankParams
Let>loan_number=
Let>first_name=
Let>last_name=
Let>middle_initial=
Let>ssn=
Let>street_number=
Let>street_name=
Let>street_type=
Let>city=
Let>state=
Let>zip=
Let>processor_name=
Let>co_first_name=
Let>co_last_name=
Let>co_middle_initial=
Let>co_ssn=
Let>property_street_number=
Let>property_street_name=
Let>property_street_type=
Let>property_city=
Let>property_state=
Let>property_zip=
Let>branch_number=
Let>force_reorder=
Let>los_id=
Let>PostData=
End>BlankParams


SRT>Reconnect
GetTime>Time
GetDate>Date
WriteLn>%LogPath%credlog.txt,%Date% %Time% - Connection Lost to Credit Folder
SMTPSendMail>%Recipients%,%MailIP%,[email protected],Redundant Credit Translator,Credit Translator Failure (Testing),Check Connection to Credit Directory for the Unioform Translator Program,

'//This will remap to the server if connection is lost
Run Program>net use k: \\uniform1\vol1
Wait>%ReconnectTimeout%
Let>MaxRetry=MaxRetry-1
If>MaxRetry=0,Program_End
End>Disconnect

User avatar
Captive
Macro Veteran
Posts: 213
Joined: Sun Oct 20, 2002 8:37 pm
Location: Colorado, USA

Post by Captive » Wed Apr 16, 2003 5:33 am

I haven't analyzed the script line by line, but I did spot this:
SRT>Reconnect
[...]
End>Disconnect
I think the END needs to have the same label as the SRT.

Other than that (and I'm not even sure those are issues), I can't spot anything wrong... but again I haven't ran thru it in the debug window or anything, I just read through it.

Eric D
Junior Coder
Posts: 27
Joined: Thu Sep 19, 2002 6:08 pm
Location: Orange County, CA

Post by Eric D » Wed Apr 16, 2003 3:29 pm

Thanks Captive...

You are correct about the SRT and I did fix it but I still got the error. Here is what I did to fix it.

I copied the whole script to the clipboard. Then I pasted it into a txt file. Then I used task manager to kill MS. Then reopend MS pasted in my script and everything was fine. There were a couple of small things wrong with the script which I have fixed and all is well.

I am finding the 7.2 MS seems to be slightly unstable. Just many weird things happening. I seem to always get a blank script asking me to enter a name when I never even tried to create one... hmmm.

Eric

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Wed Apr 16, 2003 6:11 pm

Hi,

I wonder if you have a macro which sends some keystrokes which are unintentionally landing on Macro Scheduler causing the new macro window to appear. This could cause the behaviour you describe where you are getting a blank macro asking for a name. Just a thought. I can't really think of any other reasons why a new macro dialog would appear.

In any case if you get any further info or insights as to what is happening please provide details to [email protected] so that we can ascertain if there is a problem that needs addressing.

We made significant effort in 7.2 to make it more robust and stable than it has ever been before and made significant, if subtle in appearance, interface changes to achieve this. So it would be disappointing to find we have had the opposite desired effect. Therefore we are keen to know what the cause of your problem is, whether it is a bug or not.
MJT Net Support
[email protected]

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Apr 16, 2003 6:24 pm

I also have been having random errors when exiting if MS is running in system tray. (See topic "ShutDownWindows>2 logorr errors" in the "Macro Scheduler Beta" forum).

I thought it was from ShutDownWindows>2 but I am randomly getting a MS error message with normal Restart selection in Windows, not just from running a macro.

I never had any stability problems with earlier versions, but I cannot upgrade my clients systems to 7.2 until this problem is resolved.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Wed Apr 16, 2003 6:37 pm

Hi,

This is very bad news. Please provide details of all error messages as and when you get them to [email protected] - we need to clear these up.

We have not received any other reports of errors during close down, nor seen them ourselves, so anyone else with similar errors, please also report to [email protected]

Thanks!
MJT Net Support
[email protected]

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Apr 16, 2003 7:03 pm

I will try harder to get messages.

Frequently they cascade so fast that I cannot read them, then system resets and I cannot capture them. Not always the same. Sometimes it is Access Denied, sometimes it is Sharing, sometimes illegal something or other.

Again, re ShutDownWindows>2 issue 7.1.18 never gives me the error, but 7.2 started it and is pretty regular to reproduce. Have not installed .032 yet.

Stay tuned......
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Thu Apr 17, 2003 12:17 am

The following is information that I tried to record as I took each step.
Good results are in GREEN. Bad results are in RED.
==============================================
7.2.032 is loaded in system with Win 98ME

Power off and power on system
Msched.exe is loaded from Startup folder with each restart.

Icon on desktop to do Logoff (ShutDownWindows>2)

Results:

1. Login at login window. Looks OK, no error message, but have hourglass over Taskbar system tray. No hourglass on desktop. Wait about 30 seconds. Still have systray hourglass. CTL-ALT-DEL for Close Window, no messages about anything not responding. Exit Close Window, still have systray hourglass, but not in desktop area. Do CTL-ALT-DEL for Close window again. Looks normal. Click on Shutdown. Get error message: "Msched has caused an error in MSCHED.EXE. Msched will now close".Click OK, system shuts down.
===========================
2. Startup looks OK. Login at normal login window.
Double Click on Icon to Logoff, get quick error message: "Access violation....(cannot get the rest, too fast)." Continues to normal login window.

===========================
3. Login at login window. From Start Menu, select normal Log Off. No error message, continues to normal login window.
===========================
4. Login at login window. Double Click on Icon to logoff After a few moments a window comes up about program not responding (no name), click on Wait, I wait....., same window comes up again. Click on End Task. Process continues, get error message: "Msched has caused an error in MSCHED.EXE. Msched will now close". No button for details. Click on OK, cascade of about 3 windows mentioning MS, system does auto shutdown vs. continuing to logoff process to login window.
========================
Power on. Looks OK
5. Login at login window. Double click on Icon to logoff. Looks OK, no error message, continues to login window.
========================
6. Login at login window. Remembered memory loss from earlier tests. Noted resources=56%. Double click on Icon to logoff. Looks OK, no error message, continues to login window.
========================
7. Login at login window. Noted resources=54% (loss?). Double click on Icon to logoff. After a few moments a window comes up about program not responding (no name), Window goes away by itself before I can click on Wait. MS error messages start cascading. Get a series of wide messages (W) interspersed with error about "External Exception" messages (E). See a series of WWW-E-W-E-W-E-W-E-WWWWWWWWcontinuing. W error message is creation error at 0040511E at address 104F4358. Do CTL-ALT-DEL. Close Window opens and shows MS is not responding. Click on End Task. Window comes up for MS, click on End Task. Need to do CTL-ALT-DEL again, MS is listed in Close Window, but does not show Not Responding message. Clicked to End Task on MS. Error messages are cleared from screen. Two MS icons are in systray, not flashing. System crippled, mouse moves, can drag desktop icons, Start menu does not work. CTL-ALT-DEL again, select Shutdown from Close Window. No response, I wait....need to shut off with power switch.
============================

I know this will occur again, but I need to do other things so I will stop detailed recording right now. What else can I provide to assist with a solution?

I may be able to set up a pcAnyWhere connection with support if that will be helpful.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts