Microsoft KB Archive/269446

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

Article ID: 269446

Article Last Modified on 5/11/2006

-

APPLIES TO


 * Microsoft Internet Explorer 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 &quot;Object expected&quot;.
 * 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.



Steps to Reproduce Behavior
  Create two HTML pages with links to each other.

TestA.htm: testb.htm

TestB.htm: testa.htm  Place the two .htm files in the same folder on the same Web server. Start Internet Explorer 5.5 and browse to TestA.htm. In the address bar, type JavaScript:alert(&quot;x&quot;) and press Enter. You receive an alert dialog box that includes the text &quot;x&quot;.</li> Click the link to TestB.htm.</li> In the address bar, type JavaScript:alert(&quot;x&quot;) 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.</li> 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 &quot;0x70f246ca&quot; referenced memory at &quot;0x00050078&quot;. The memory could not be &quot;read&quot;.

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.</li></ol>

<div class="references_section">