Jump to content

_IELoadWait error


 Share

Recommended Posts

Hi all,

@Dale

I've included your FuncErr() in my script.

That's is the result:

We intercepted a COM Error!

Number is: 00000000

Windescription is: 1.53564711381288e-038

scriptline is: 0

$IE_BO5UK is object: 1

$IE_BO5UK object type: IWebBrowser2

$IE_BO5UK.document is object: 1

$IE_BO5UK.document object type: DispHTMLDocument

I don't understand what does it mean :">

What can I do I I don't call _IELoadWiat directly in my script? Is there another issue?

@Cameron

When I said that I launched the scripts on the night it's because I'm french and when you're reply it's time for me to leave my office :-D

thanks all

Link to comment
Share on other sites

  • Replies 41
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi all,

@Dale

I've included your FuncErr() in my script.

That's is the result:

I don't understand what does it mean :">

What can I do I I don't call _IELoadWiat directly in my script? Is there another issue?

@Cameron

When I said that I launched the scripts on the night it's because I'm french and when you're reply it's time for me to leave my office :-D

thanks all

ah, so did it get rid of the error?
Link to comment
Share on other sites

I think I'm the other user Dale was referring to.. It was happening to me on my laptop which has a ton of mapped network drives at the office, while I was connected at a hotel where those drives obviously were not present. If you don't know, Windows gets very fussy in this situation if you don't go in and unmap all the drives. I'll have to try to recreate this again.

Link to comment
Share on other sites

@Dale

I've included your FuncErr() in my script.

We intercepted a COM Error!
Number is: 00000000
Windescription is: 1.53564711381288e-038
scriptline is: 0
$IE_BO5UK is object: 1
$IE_BO5UK object type: IWebBrowser2
$IE_BO5UK.document is object: 1
$IE_BO5UK.document object type: DispHTMLDocument

Ugggh. This isn't helpful. Number should be an error number and Windescription should be a text description of it.

Please carefully examine how you are entered the error trapping code to insure there were no problems with it, I would also appreciate if you would simulate an error with something like $IE_BO5UK.bogus to see if the trap is working properly and gives valid returns then.

Also, I know I told you to use the equiv of $oIE in the error function, but please change it to $o_object to see if we can get the state of the local function variable.

One other thing that would help is if you can isolate exactly what statements lead to this error... you may need to pepper you code with ConsoleWrite commands to show where you are (or use the Trace Lines function in SciTe).

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

eeeerrrmmm...

Hi Dale, you might remember me from my reply to "Internet Explorer Automation UDF library".

Well, while I was trying to isolate a piece of code... It happens that no errors occurred.

Then I came back to my original script and... no erros occurred.

Tried OVER 300 times. Really. No errors. I can't figure out how to generate these errors.

Maybe these objects suffer minor or temporary changes or maybe the way the function accesses and handles them can't assure a flawless operation... But that's something I can't have a clue, because I really don't know anything about the way Internet Explorer works...

Is there anything I can help? Any other script to test, or whatever...

Good luck you all, I'll keep testing my scripts and ideas...

Link to comment
Share on other sites

eeeerrrmmm...

Hi Dale, you might remember me from my reply to "Internet Explorer Automation UDF library".

Well, while I was trying to isolate a piece of code... It happens that no errors occurred.

Then I came back to my original script and... no erros occurred.

Tried OVER 300 times. Really. No errors. I can't figure out how to generate these errors.

Maybe these objects suffer minor or temporary changes or maybe the way the function accesses and handles them can't assure a flawless operation... But that's something I can't have a clue, because I really don't know anything about the way Internet Explorer works...

Is there anything I can help? Any other script to test, or whatever...

Good luck you all, I'll keep testing my scripts and ideas...

sorry, maybe i'm just weird, but if i test something 3 times and don't have any errors... i accept it as good and leave it alone...
Link to comment
Share on other sites

sorry, maybe i'm just weird, but if i test something 3 times and don't have any errors... i accept it as good and leave it alone...

lol! :) hey... that's what makes the difference between the BETA and the Final Release... Which means that meanwhile I can't just leave this script running without real human monitoring. Combining a beta autoit with a "beta" script... it's just not stable enough, because faults CAN happen. And luckily we saw that happening. If people in general wouldn't care about exceptions and just script superficially, most programs would be a piece of... :P bad coding :(

so... let's try to solve this? :)

best regards

EDIT: actually, this error occurred without any intention nor testing. I created a script to manually reboot my router when my internet connection jams (this happens about 3 to 4 times a day). Until someday I got home and my little home "server" had this error msgbox. Tried out a couple of times and... tada! all my scripts would eventually cause this error. The question is... how and why? ...:lmao:

Edited by footswitch
Link to comment
Share on other sites

I have three theories about what is happening here:

1) User error/bad code. The opject bing passed to _IELoadWait is incorrect and is caused by a code logic problem

2) An unexpected action occurs on the web server or client browser that affects the object passed to _IELoadWait and makes it invalid (a page redirect for example)

3) There is some sort of timing issue or race condition that is only seen when the conditions are just right (or wrong) that causes the object to be in some unexpected state during a brief transition time.

1 and 2 are more mundane and if either is the cause, the person having the trouble should be able to construct a reproducer once the mechanics are understood.

3 is more difficult, but not impossible to overcome if it turns out to be the case. I simply don't want to put the work into 3 or complicate the UDF code unnecessarily if it turns out that there really is no issue there.

So again, please help to create a reproducer or work to rule out 1 and 2 and then we'll focus some effort on 3.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

lol! :) hey... that's what makes the difference between the BETA and the Final Release... Which means that meanwhile I can't just leave this script running without real human monitoring. Combining a beta autoit with a "beta" script... it's just not stable enough, because faults CAN happen. And luckily we saw that happening. If people in general wouldn't care about exceptions and just script superficially, most programs would be a piece of... :lmao: bad coding :(

Sorry, i assumed since you were trying to duplicate the error based on KNOWN error conditions. If you don't know what the error conditions are, as far as what values are generating errors where, then my suggestion would be to setup a dump. Have your script write values that it's working with to a file as they're assigned, have a _FileWriteLog() with the function name every time a function is entered or exited also. When the script is finished successfully, you could delete the log to avoid excess log size. In the event that an error occurs, you'll have the dump file to see what values were where and which function was the last entered but not exited since the file won't be deleted on a failed attempt that doesn't reach the FileDelete().

Just because i wouldn't waste time actively monitoring (or having another person do it) a program that i consider done enough to be called a beta does not mean that i don't care about exceptions or that i employ superficial coding practices. If i were doing anything manually 300 times on a computer, even if it is something as simple as executing a script, i would consider it a horrible waste of time. But that's just me.

so... let's try to solve this? :)

solve what exactly? the code you didn't include, the error you can't produce, or the error conditions that you don't know? :P
Link to comment
Share on other sites

Look cameronsdad, I'm not really into being against you.

I'm just assuming this error never happened with you. Maybe you don't write scripts in which you need IE interaction. Maybe you never needed to automate an IE process. But for those who do, the solution could come in handy.

We're talking about an error that no one knows how to specifically reproduce. I think everyone, including you, acknowledges that.

Lol maybe I didn't include any piece of code because it does NOT generate errors everytime it is executed, so... technically it doesn't help :P

(edit) Oh... by the way... those 300 tries were done with the help of a stand-alone loop script with random sleep time involved :lmao:

Best regards

EDIT: typos, details

Edited by footswitch
Link to comment
Share on other sites

Look cameronsdad, I'm not really into being against you.

I'm just assuming this error never happened with you. Maybe you don't write scripts in which you need IE interaction. Maybe you never needed to automate an IE process. But for those who do, the solution could come in handy.

We're talking about an error that no one knows how to specifically reproduce, I think everyone, including you, acknowledges that.

Best regards

I'm sorry, i didn't mean to take your last post so personally, but to me it sounded kind of condescending, and that's one thing that i'm bad at ignoring, but i got my rant out, and am moving on. Are you receiving the same error as the OP of this thread? Do you have a screenshot of the error? The dump file that i suggested in my previous post really is a good way to go when you are unsure of the error conditions bringing about an exception, because it allows you to re-create the error more consistently if you know exactly what values are being passed to what function when it fails. Dale's error trapping is kind of the same way, except it's a more centralized approach, with all of the error trapping being handled at one spot. Which is good when you've some idea what is causing the error, or when it is occuring in the code. my way is a little more involved, but it should give you enough information to consistently re-create any error you receive, eliminating alot of time wasted with trial and error. As far as automating IE, yes i've had some experience with it, and i typically recommend use of dale's IE.au3 5-10 times a day to people trying to work with webpages or web based data. Not saying that as a 'haha you were wrong' just letting you know that i have infact used it, including troubleshooting errors.
Link to comment
Share on other sites

eeerrrmm.... lol...

I'm feeling dumb enough... Below you can find a script to reproduce the error. It's kinda stupid, but leave it running long enough (or short enough, nobody knows when it will happen :()

NOTE: Press "c" anytime to exit the script before it fails (lol again)...

The screenshot of the error is in the first post of this topic by FabFly.

#include<IE.au3>

HotKeySet("c","cancel")

While 1
    $new_window=_IECreate(1); 1 is visible, 0 is invisible
    _IENavigate($new_window,"http://www.google.com",1); 1 is wait for loading to complete =)
    _IEQuit($new_window)
WEnd

Func cancel()
    Exit
EndFunc

So... how exactly would we place a nice debugger here? any help? of course we could also change the IE.au3 file and add the debugger there, right?

EDIT: hey, cameronsdad, I'm a peaceful guy. Please remember that english is not everyone's native language, so sometimes the writing and interpretation between all of us is somehow messy :lmao: thanks for your help, really :P

EDIT2: to force the error, type a "slow" webpage in the _IENavigate() function and close the Internet Explorer window BEFORE it loads completely.

Edited by footswitch
Link to comment
Share on other sites

eeerrrmm.... lol...

I'm feeling dumb enough... Below you can find a script to reproduce the error. It's kinda stupid, but leave it running long enough (or short enough, nobody knows when it will happen :P)

NOTE: Press "c" anytime to exit the script before it fails (lol again)...

The screenshot of the error is in the first post of this topic by FabFly.

#include<IE.au3>

HotKeySet("c","cancel")

While 1
    $new_window=_IECreate(1); 1 is visible, 0 is invisible
    _IENavigate($new_window,"http://www.google.com",1); 1 is wait for loading to complete =)
    _IEQuit($new_window)
WEnd

Func cancel()
    Exit
EndFunc

So... how exactly would we place a nice debugger here? any help? of course we could also change the IE.au3 file and add the debugger there, right?

personally i don't like to reuse the same variable name when assigning new objects, even though _IEQuit removes the reference, i'd still say to alter it so that the same variable isn't used repeatedly. Maybe:

#include<IE.au3>
HotKeySet("c","cancel")
While 1
    Assign("$new_window" & Random(1,1000000,1),_IECreate(1)); 1 is visible, 0 is invisible
    _IENavigate($new_window,"http://www.google.com",1); 1 is wait for loading to complete =)
    _IEQuit($new_window)
WEnd
Func cancel()
    Exit
EndFunc
Link to comment
Share on other sites

EDIT: hey, cameronsdad, I'm a peaceful guy. Please remember that english is not everyone's native language, so sometimes the writing and interpretation between all of us is somehow messy :lmao: thanks for your help, really :P

no worries man, i really am too. I threw in my 2 cents and moved on. right now i'm just about helping identify and resolve the issue. I'm actually making a UDF to implement the dump procedure i suggested in previous post. hopefully i'll be able to complete it today.
Link to comment
Share on other sites

personally i don't like to reuse the same variable name when assigning new objects, even though _IEQuit removes the reference, i'd still say to alter it so that the same variable isn't used repeatedly. Maybe:

#include<IE.au3>
HotKeySet("c","cancel")
While 1
    Assign("$new_window" & Random(1,1000000,1),_IECreate(1)); 1 is visible, 0 is invisible
    _IENavigate($new_window,"http://www.google.com",1); 1 is wait for loading to complete =)
    _IEQuit($new_window)
WEnd
Func cancel()
    Exit
EndFunc
please note that when you use the other functions, you're still calling the $new_window variable. Well, basically, the script above won't even run :P

Also, won't this consume LOADS AND LOADS of memory when run in an infinite loop? Is there a built-in function to remove variables?

But don't forget that this error occurs in scripts that use only one variable, set in the beginning of the script. No reassigns nor same kind of variables involved...

Also edited my previous post.

Link to comment
Share on other sites

please note that when you use the other functions, you're still calling the $new_window variable. Well, basically, the script above won't even run :P

Also, won't this consume LOADS AND LOADS of memory when run in an infinite loop? Is there a built-in function to remove variables?

But don't forget that this error occurs in scripts that use only one variable, set in the beginning of the script. No reassigns nor same kind of variables involved...

Also edited my previous post.

actually, the $new_window is just part of the variable name being used in my example, it also appends a random number to the end of the variable name, preventing re-use of the same name. One thing that could be done to avoid the memory usage would be:

#include<IE.au3>
HotKeySet("c","cancel")
While 1
$blah = "$new_window" & Random(1,1000000,1);stores string value of new variable name
    Assign($blah,_IECreate(1)); assigns new object to the variable named in the string held by $blah
    _IENavigate(Eval($blah),"http://www.google.com",1)
    _IEQuit($new_window)
Assign($blah,"")
WEnd
Func cancel()
    Exit
EndFunc
that is untested code, but it should work. As far as your edit to the other post, any time you close the browser, then try to access a reference to it after the fact, you're going to get an error, because you're invalidating the references to the browser. The only way you're going to avoid that, is to validate that the reference is still good before trying to access any properties of it.
Link to comment
Share on other sites

Yep i got your point about the variables assigning...

(...)

As far as your edit to the other post, any time you close the browser, then try to access a reference to it after the fact, you're going to get an error, because you're invalidating the references to the browser. The only way you're going to avoid that, is to validate that the reference is still good before trying to access any properties of it.

That's precisely the problem. The error occurs when the window is *still* open...

Is there any way to check out if the object suffers any changes while the funcion _IELoadWait() is being executed?

Look... this is merely a hint and for experts may seem somehow stupid, but what if the Internet Explorer application is unavailable for a certain period of time between the URL insertion and the process of loading a webpage?

You know, Micro$oft has these sort of strange things sometimes... But it impressed me that neither Internet Explorer nor Explorer itself generated any errors when IE is submitted to this loop :P

Link to comment
Share on other sites

I'm actually making a UDF to implement the dump procedure i suggested in previous post. hopefully i'll be able to complete it today.

not going to be able to complete it today, only 16 minutes left of work, and when i get home, i've already comitted to another project to help a different forum user. I will resume work on it tomorrow though, i'm kind of excited about some of the ideas i've got for it, i will have it up in scripts and scraps as soon as i'm satisfied with it.
Link to comment
Share on other sites

I used to get this a lot too, it went away when I uninstalled the google toolbar. I don't have any evidence or reason why that would affect it, but that fixed it for me. Maybe it interferes with the object hierarchy somehow?

Roger

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...