Re: Help! WScript application error!

From: Michael Harris \(MVP\) ("Michael)
Date: 12/15/04


Date: Tue, 14 Dec 2004 17:46:04 -0800

bely wrote:
> I found a bug in my script. Due to a design error, it calls Quit()
> method of an "InternetExplorer" object twice (the script calls
> objIE.Quit() then the _onQuit() function also calls objIE.Quit()). I
> wonder if the problem is related to this bug, you know, the bug is
> there but is often "invisible". I would be grateful if the answer is
> positive.

Calling objIE.Quit() certainly isn't a good thing ;-). I would never call
it from within an _OnQuit() handler which only fires if Quit() has already
been called or the user manually cloese the IE instance. Calling it that way
sets up a recursive situation where the OnQuit event fires again causing the
event handler to be called again, etc., etc., etc...

So in this case, I *suppose* that the script logic error you found could end
up trashing the WSH host in the process when it tries to cleanup on
shutdown...

-- 
Michael Harris
Microsoft MVP Scripting 


Relevant Pages

  • Re: Help! WScript application error!
    ... I found a bug in my script. ... Due to a design error, ... >> I cannot be sure if upgrading the script host helps, ...
    (microsoft.public.scripting.vbscript)
  • cvs-src summary for June 14-21
    ... Intel PRO/10GbE driver MFC'ed ... Max responded, saying that since the script only adds lines to the output, ... Max later backed out the commit. ... Bruce Evans fixed a bug that allowed users to crash the system by ...
    (freebsd-current)
  • Re: SQLite 3.3.16 nulls test results
    ... Here are the results from Brian's script: ... Inserting values ... Selecting row with Marge ... Perhaps there's a bug somewhere. ...
    (perl.dbi.users)
  • RE: TXT or HTML? -- IE NEW BUG
    ... Subject: TXT or HTML? ... -- IE NEW BUG ... vulnerability. ... However, the script would run in the web page's domain, so it ...
    (Bugtraq)
  • Re: Giving an application a window icon in a sensible way
    ... anything -- and after being quit I couldn't start a new instance until ... one of those dependencies had a bug -- XpmParser. ... the author of those classes included a copyright notice and ...
    (comp.lang.java.programmer)

Quantcast