Intermittent Access violation error

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
jamesF852
Newbie
Posts: 7
Joined: Fri Apr 08, 2011 3:26 am

Intermittent Access violation error

Post by jamesF852 » Fri Jun 10, 2011 6:13 am

I've got a script that runs ok most of the time, but occasionally (every 20 iterations or so) it gives me

"Access violation at address 004058A8 in module 'msched.exe'. Read of address 00000000.

Any idea what I should do to debug this?

Running the script from the script editor, v12.1.5 on Windows XP

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Jun 10, 2011 7:42 am

The first thing you need to do is work out which line causes the error. Most likely it is caused by some interaction with another process/application. Let's work out which line of the script causes it.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

jamesF852
Newbie
Posts: 7
Joined: Fri Apr 08, 2011 3:26 am

Intermittent error

Post by jamesF852 » Mon Jun 13, 2011 5:26 am

Thanks.

The script navigates to an intranet page and fills out a form; it usually fails on the last line of a block of code like this:

Code: Select all

Let>FrameName={""}
Let>FormName={""}
Let>TagValue={"Add to list"}
IE_ClickTag>%IE[0]%,str:FrameName,str:FormName,A,TEXT,str:TagValue,r
There's another error message:
Error Calling DLL: Possible wrong number or type of parameters? Message: Access is denied
which I find odd, because it will run through the whole process several times without generating this error. It happened more frequently when I had other programs running on the machine, but even with only IE, Excel and MacroScheduler running, I'm still encountering issues every 20 iterations or so.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Jun 13, 2011 9:55 am

I suspect the page isn't ready on those occasions and so the script tries to click a link that isn't there. Make sure you are using IE_Wait, consider increasing a static delay before it and also consider using something like WaitScreenText and/or a loop with IE_ContainsText prior to that line to make absolutely 100% sure the page is ready and the element exists before trying to click it.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

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