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



The information in this article applies to:

  • Microsoft Internet Explorer (Programming) 5.5

This article was previously published under Q269446

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.

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.

STATUS

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

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.

Modification Type:MajorLast Reviewed:5/11/2006
Keywords:kbBug kbpending kbScript KB269446