Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

BUG: JavaScript URL May Cause Instability and Access Violation in Internet Explorer 5.5


View products that this article applies to.

This article was previously published under Q269446

↑ Back to the top


Symptoms

When you browse to several Web pages in the same domain and then execute a JavaScript URL in the Internet Explorer address bar, one or more of the following errors may occur:
  • JavaScript becomes unstable and generates error messages, such as "Object expected".
  • Internet Explorer stops responding.
  • An access violation occurs in Internet Explorer.

↑ Back to the top


Resolution

To avoid this problem, do not type JavaScript URLs in the Internet Explorer address bar. To restore stability, you can click the Refresh button on the main Internet Explorer toolbar.

NOTE: The problem is not as apparent when you programmatically set the location.href property, but it can still occur for longer, more complex scripts.

↑ Back to the top


Status

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

↑ Back to the top


More information

Steps to Reproduce Behavior

  1. Create two HTML pages with links to each other.

    TestA.htm:
    <html>
    <body>
    <a href="testb.htm">testb.htm</a>
    </body>
    </html>
    						

    TestB.htm:
    <html>
    <body>
    <a href="testa.htm">testa.htm</a>
    </body>
    </html>
    						
  2. Place the two .htm files in the same folder on the same Web server.
  3. Start Internet Explorer 5.5 and browse to TestA.htm.
  4. In the address bar, type JavaScript:alert("x") and press Enter. You receive an alert dialog box that includes the text "x".
  5. Click the link to TestB.htm.
  6. In the address bar, type JavaScript:alert("x") again and press Enter. JavaScript becomes unstable. If your Internet Explorer options are set to display script run-time errors, you receive the following error message:
    Error
    A Runtime Error has occurred.
    Do you wish to Debug?

    Line: 0
    Error: Object expected
    Click No to close the dialog box.
  7. Browse back and forth between the two pages, and continue to type the JavaScript code in the address bar. You may receive the run-time error message again, Internet Explorer may stop responding, or an access violation may occur:
    IEXPLORER.EXE - Application Error
    The instruction at "0x70f246ca" referenced memory at "0x00050078". The memory could not be "read".

    CLick on OK to terminate the program
    Click on CANCEL to debug the program
    If you click CANCEL, you receive the following error message:
    Unhandled exception in IEXPLORER.EXE (MSHTMLED.DLL): 0xC0000005: Access Violation
    Also, if you apply the hotfix from 302440� , the test still fails. However, in this case, the dialog box fails to appear and waits indefinitely with a pointer icon.

↑ Back to the top


Keywords: KB269446, kbscript, kbpending, kbbug

↑ Back to the top

Article Info
Article ID : 269446
Revision : 3
Created on : 5/11/2006
Published on : 5/11/2006
Exists online : False
Views : 336