Access error with IEExtractTagByAttrib
Moderators: JRL, Dorian (MJT support)
Access error with IEExtractTagByAttrib
I am getting an Access Violation at address F88E8BFF - error at one point in my uncompliled script. It works sometimes but one particular screen it happens every time.
IEExtractTagByAttrib>%IE[3]%,,{"table"},{"id"},{"ctl00_ContentPlaceHolder1_tblMain"},1,strLarge
I changed it to IEExtractTag>%IE[3]%,,Body,0,1,strLarge
and then found the table inside the body and it did not stop my script until I called IENavigate> and I received an Access violation at address 77EF5B0C in Moduale 'RPCRT4.dll' Read address 00000010
If anyone has any ideas please let me know.
IEExtractTagByAttrib>%IE[3]%,,{"table"},{"id"},{"ctl00_ContentPlaceHolder1_tblMain"},1,strLarge
I changed it to IEExtractTag>%IE[3]%,,Body,0,1,strLarge
and then found the table inside the body and it did not stop my script until I called IENavigate> and I received an Access violation at address 77EF5B0C in Moduale 'RPCRT4.dll' Read address 00000010
If anyone has any ideas please let me know.
David Williams
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
The most likely cause is that the page isn't ready, IE isn't ready or the element does not exist, or something else is going on with the page/browser at the time. Have you tried adding a delay before it and using IEWaitDocumentComplete and/or IEWait etc?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
This one has me stumped. I tried adding IEWait before clicking on the Logout button but it did not help. Even when using **BREAKPOINT** before the command it still locks up and gives the Module error on the 2nd advisor login.
Below is part of the code. IE[2] is the main IE window and IE[3] is an extra window that opens with transactions I am capturing. After capturing the data and saving it to a file the macro clicks on the Logout button (performs the same if I use the IENavigate function).
At this point it all locks up and gives the Access violation at address 77EF5F0C in module 'RPCRT4.dll' Read address 00000010
Once I have clicked on OK and the violation error disappears if I click on the Macro Scheduler "Stop" button it stops the macro but everything is still locked up. If I x out of the Macro Scheduler editor I get the following:
msched.exe - Application Error
X The instruction at "0x7c93729b" referenced at "0xeaba937e". The memory could not be "read".
Click on OK to terminate the program.
The IE window is totally locked up until I close this error message and the Macro Scheduler editor is closed.
Here is the code where the error occurs and only on the 2nd time through:
The program creates an instance of IE only once and then goes to the login page.
It saves the advisor login information previously saved to an array
It fills in the login info and logs in - then goes to a account list page where the macro saves the information to a file.
It then goes to a Reports page and after entering the dates required the report is displayed in a 2nd window.
Below is part of the code. IE[2] is the main IE window and IE[3] is an extra window that opens with transactions I am capturing. After capturing the data and saving it to a file the macro clicks on the Logout button (performs the same if I use the IENavigate function).
At this point it all locks up and gives the Access violation at address 77EF5F0C in module 'RPCRT4.dll' Read address 00000010
Once I have clicked on OK and the violation error disappears if I click on the Macro Scheduler "Stop" button it stops the macro but everything is still locked up. If I x out of the Macro Scheduler editor I get the following:
msched.exe - Application Error
X The instruction at "0x7c93729b" referenced at "0xeaba937e". The memory could not be "read".
Click on OK to terminate the program.
The IE window is totally locked up until I close this error message and the Macro Scheduler editor is closed.
Here is the code where the error occurs and only on the 2nd time through:
The program creates an instance of IE only once and then goes to the login page.
It saves the advisor login information previously saved to an array
It fills in the login info and logs in - then goes to a account list page where the macro saves the information to a file.
It then goes to a Reports page and after entering the dates required the report is displayed in a 2nd window.
I hope this sheds some light on something I am doing incorrectly.// 2nd window open with list of transactions
IEWait>%IE[3]%
IEExtractTag>%IE[3]%,,Body,0,1,strLarge
Position>Acct#:,%strLarge%,1,nPos,False
if>%nPos%sMsg=Acct#: was not found in the strLarge variable for %sAdvInitials%
GoTo>LogOut
Endif>
Wait>1
// Close the open window Account History Rep
IEQuit>%IE[3]%,r
Wait>1
//*************************************************************************
// extract the transactions and write to the transactions file
//-------------------------------------------------------------------------
//....... code to extract information from saved html code
// File with transactions is saved
Label>LogOut
**BREAKPOINT**
IEWait>%IE[2]%
// Clicking on the Logout button or using the IENavigate function to accomplish the same thing
// after the 2nd advisor login locks up the program and gives the
// Access violation error at address 77EF5F0C in module 'RPCRT4.dll' Read address 00000010
//IENavigate>IE[2],https://secure.cnbservice.net/LogOff.aspx,r
IEClickTag>%IE[2]%,{""},{""},{"TD"},{"ID"},{"ctl00_TopHeading1_tdLogout"},ie_res
// the program will process the next line fine on the first iteration but never reaches it
// on the second login.
WriteLn>%strLogfile%,r,Clicked on Logout: 0621
David Williams
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Do you have the most recent update? There was an issue fixed in 14.0.11 related to new IE windows and IE commands after an IEWaitNew as a result of a new popup. See: http://www.mjtnet.com/mswhatsnew.htm
If you don't have the most recent release update it and try again before we pursue this further.
If you don't have the most recent release update it and try again before we pursue this further.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Still having the problem
I am still having this problem. I uninstalled Macro Scheduler v14 and then reinstalled it but that did not solve the problem. Do you have any more ideas?
David Williams
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
We need to be able to try it here really. Are you able to send the code and web site/log in details to the helpdesk?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
sending code
This web site has very private finanicial information on it so sending the logins would not be possible. I will try to duplicate the problem on a public site if I can and send that. Thanks for your support.
David Williams
IEQUIT - IECREATE slows system
I was not successful in recreating the above problem on a public web site but in trying to get around the problem I tried to kill the instance of IE and create it over again hoping the IEExtractTag commands would not give the same error. What I discovered was that using IEQuit and then IECreate slowed Macro Scheduler down so much that it usually locked up. I recreated the problem with a simple Google URL with the following code.
Can you test this and see if you get the same results. The second time through times out so it takes over 60 seconds.
Code: Select all
//**************************************************************************************************
// Test IEQuit and reuse variable - locking up
IECreate>IE[2]
Wait>2
//Wait>3
Timer>startTime
IENavigate>%IE[2]%,http://www.google.com,r
IEWaitDocumentComplete>IE[2],r
Wait>2
IEQuit>%IE[2]%,r
Timer>endTime
Let>timeElapsed=%endTime%-%startTime%
MessageModal>Closed 1st IE window - took %timeElapsed%
// Open 2nd time
IECreate>IE[2]
Wait>2
//Wait>3
Timer>startTime
IENavigate>%IE[2]%,http://www.google.com,r
IEWaitDocumentComplete>IE[2],r
// 2nd time it never recognizes the document as complete and has to time out
IEQuit>%IE[2]%,r
Timer>endTime
Let>timeElapsed2=%endTime%-%startTime%
MessageModal>Closed 2nd IE window - took %timeElapsed2% CRLF 1st IE window only took %timeElapsed%
Label>end_script
David Williams
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Thanks for this. I can indeed replicate. Seems some flag or something isn't being released when the instance is quit and IEWaitDocumentComplete is therefore stuck waiting.
I've added this to our bug tracker and we'll endeavour to get it fixed in the next maintenance release.
I've added this to our bug tracker and we'll endeavour to get it fixed in the next maintenance release.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Work-a-round?
Marcus, you suggested - In the mean time a workaround would be to use a different ie reference variable or change it's value (increment it).
I tried IE[3] and IE1[3] for the second round and both acted the same as the IE[2] variable so that is not an option. As long as the window is not closed until the end of the macro everything works as normal. I will have to keep the window open for entire macro and close it at the end.
I tried IE[3] and IE1[3] for the second round and both acted the same as the IE[2] variable so that is not an option. As long as the window is not closed until the end of the macro everything works as normal. I will have to keep the window open for entire macro and close it at the end.
David Williams
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
It's the value that matters not the variable name.
Try using IECreate to create a NEW instance *before* using IEQuit on the old. That way you get a new instance variable with a new incremented value.
So moving your IEQuit to after the second IECreate should be a temporary workaround until we can get this fixed.
Try using IECreate to create a NEW instance *before* using IEQuit on the old. That way you get a new instance variable with a new incremented value.
So moving your IEQuit to after the second IECreate should be a temporary workaround until we can get this fixed.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Still trying
I tried creating the new IE before using IEQuit but it acts the same and times out - infact the first time it gave me an Access Violiation error for Module ntdll.dll.
I also tried attaching to an existing IE window and then navigating to another URL and it also times out when I use IEWaitDocumentComplete. Here is the simple code to try for yourself.
Thanks for your continued help with ideas. I am sure you guys want to fix this as bad as I do.
I also tried attaching to an existing IE window and then navigating to another URL and it also times out when I use IEWaitDocumentComplete. Here is the simple code to try for yourself.
Code: Select all
// this is a test of an existing IE window
IEGetFromURL>https://www.google.com,IE_inst
Timer>startTime
Wait>2
IENavigate>%IE_inst%,http://www.yahoo.com,r
IEWaitDocumentComplete>%IE_inst%,r
Timer>endTime
Let>timeElapsed=%endTime%-%startTime%
MessageModal>Closed 1st IE window - took %timeElapsed%
Label>end_script
David Williams
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Ok, yes that also suffers. We certainly do want to fix it, but can only work so fast. Please be patient. We'll work on a fix as soon as is humanly possible.
[/code]
[/code]
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
This issue has now been resolved in version 14.0.14 which is now available for download in the usual places.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?