Closed Bug 286610 Opened 20 years ago Closed 20 years ago

crash while trying to close page in xmlhttprequest.onreadystatechange event handler [@ 0x00000000 - nsEventStateManager::PreHandleEvent ]

Categories

(Core :: XML, defect)

x86
Windows Server 2003
defect
Not set
critical

Tracking

()

RESOLVED DUPLICATE of bug 267286

People

(Reporter: 1, Unassigned)

Details

(Keywords: crash)

Crash Data

Attachments

(2 files)

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; Q312461; .NET CLR 1.1.4322)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.2; ru-RU; rv:1.7.6) Gecko/20050226 Firefox/1.0.1

I open page1, that opens page2. Then I press button Close on page2. Script 
sends xmlhttprequest and captures onreadystatechange event. The event handler 
trying to close window of page2. The window doesnt close, and when i try to 
leave it and get back to it, firefox crashes.

page1.html:
<html>
<body onload="OnLoad();">
  <script>
    function OnLoad() {
      window.open("page2.html");
    }

    function closeChild(win) {
      win.close();
    }
  </script>
</body>
</html>

page.html:
<html>
<body>
<script>
  var xmlhttp=null;

  function onGetHttpData() {
    if (xmlhttp.readyState==4) {
      opener.closeChild(window);
    }
  }

  function request() {
    xmlhttp=new XMLHttpRequest();
    xmlhttp.open("GET", "default.aspx",true);
    xmlhttp.onreadystatechange=onGetHttpData;
    xmlhttp.send("");
  }

</script>
<input type="button" value="Close" onclick="request()" />
</body>
</html>

Reproducible: Always

Steps to Reproduce:
1. Place page1 and page2 on web-site
2. Open page1
3. Press button Close on page2
4. Leave page2 window.
5. Get Back to window page2.

Actual Results:  
Firefox crashes.

Expected Results:  
I think, Firefox should just close page2.

Checked in Mozilla 1.7.1/1.7.5/1.8.b1. Firefox 1.0.1 - result the same.
Assignee: firefox → xml
Component: General → XML
Product: Firefox → Core
QA Contact: general → ashshbhatt
Version: unspecified → Trunk
Reproduce using:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225
Firefox/1.0.1

Talkback incident ID: 4424120
Incident ID: 4424120
Stack Signature	0x00000000 2bec5b92
Product ID	Firefox10
Build ID	2005022518
Trigger Time	2005-03-17 19:28:33.0
Platform	Win32
Operating System	Windows NT 5.1 build 2600
Module	
URL visited	bug 286610
User Comments	bug 286610 testcase
Since Last Crash	471310 sec
Total Uptime	834473 sec
Trigger Reason	Access violation
Source File, Line No.	N/A
Stack Trace 	
0x00000000
nsEventStateManager::PreHandleEvent 
[d:/builds/tinderbox/Fx-Aviary1.0.1/WINNT_5.0_Depend/mozilla/content/events/src/nsEventStateManager.cpp,
line 767]
PresShell::HandleEventInternal 
[d:/builds/tinderbox/Fx-Aviary1.0.1/WINNT_5.0_Depend/mozilla/layout/html/base/src/nsPresShell.cpp,
line 6056]
PresShell::HandleEvent 
[d:/builds/tinderbox/Fx-Aviary1.0.1/WINNT_5.0_Depend/mozilla/layout/html/base/src/nsPresShell.cpp,
line 5921]
nsViewManager::HandleEvent 
[d:/builds/tinderbox/Fx-Aviary1.0.1/WINNT_5.0_Depend/mozilla/view/src/nsViewManager.cpp,
line 2280]
nsViewManager::DispatchEvent 
[d:/builds/tinderbox/Fx-Aviary1.0.1/WINNT_5.0_Depend/mozilla/view/src/nsViewManager.cpp,
line 2066]
HandleEvent 
[d:/builds/tinderbox/Fx-Aviary1.0.1/WINNT_5.0_Depend/mozilla/view/src/nsView.cpp,
line 77]
nsWindow::DispatchEvent 
[d:/builds/tinderbox/Fx-Aviary1.0.1/WINNT_5.0_Depend/mozilla/widget/src/windows/nsWindow.cpp,
line 1067]
nsWindow::DispatchFocus 
[d:/builds/tinderbox/Fx-Aviary1.0.1/WINNT_5.0_Depend/mozilla/widget/src/windows/nsWindow.cpp,
line 5451]
nsWindow::ProcessMessage 
[d:/builds/tinderbox/Fx-Aviary1.0.1/WINNT_5.0_Depend/mozilla/widget/src/windows/nsWindow.cpp,
line 4198]
nsWindow::WindowProc 
[d:/builds/tinderbox/Fx-Aviary1.0.1/WINNT_5.0_Depend/mozilla/widget/src/windows/nsWindow.cpp,
line 1349]
USER32.dll + 0x8709 (0x77d48709)
USER32.dll + 0x87eb (0x77d487eb)
USER32.dll + 0xb368 (0x77d4b368)
USER32.dll + 0xb3b4 (0x77d4b3b4)
ntdll.dll + 0xeae3 (0x7c90eae3)
GlobalWindowImpl::Focus 
[d:/builds/tinderbox/Fx-Aviary1.0.1/WINNT_5.0_Depend/mozilla/dom/src/base/nsGlobalWindow.cpp,
line 2714]
nsWebShellWindow::HandleEvent 
[d:/builds/tinderbox/Fx-Aviary1.0.1/WINNT_5.0_Depend/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp,
line 610]
nsWindow::DispatchEvent 
[d:/builds/tinderbox/Fx-Aviary1.0.1/WINNT_5.0_Depend/mozilla/widget/src/windows/nsWindow.cpp,
line 1067]
nsWindow::DispatchFocus 
[d:/builds/tinderbox/Fx-Aviary1.0.1/WINNT_5.0_Depend/mozilla/widget/src/windows/nsWindow.cpp,
line 5451]
nsWindow::ProcessMessage 
[d:/builds/tinderbox/Fx-Aviary1.0.1/WINNT_5.0_Depend/mozilla/widget/src/windows/nsWindow.cpp,
line 4195]
nsWindow::WindowProc 
[d:/builds/tinderbox/Fx-Aviary1.0.1/WINNT_5.0_Depend/mozilla/widget/src/windows/nsWindow.cpp,
line 1349]
USER32.dll + 0x8709 (0x77d48709)
USER32.dll + 0x87eb (0x77d487eb)
USER32.dll + 0xb368 (0x77d4b368)
USER32.dll + 0xb3b4 (0x77d4b3b4)
ntdll.dll + 0xeae3 (0x7c90eae3)
USER32.dll + 0xb2a1 (0x77d4b2a1)
USER32.dll + 0xb23c (0x77d4b23c)
nsWindow::DefaultWindowProc 
[d:/builds/tinderbox/Fx-Aviary1.0.1/WINNT_5.0_Depend/mozilla/widget/src/windows/nsWindow.cpp,
line 1375]
USER32.dll + 0x8709 (0x77d48709)
USER32.dll + 0x87eb (0x77d487eb)
USER32.dll + 0xc00e (0x77d4c00e)
USER32.dll + 0xc034 (0x77d4c034)
nsWindow::WindowProc 
[d:/builds/tinderbox/Fx-Aviary1.0.1/WINNT_5.0_Depend/mozilla/widget/src/windows/nsWindow.cpp,
line 1356]
USER32.dll + 0x8709 (0x77d48709)
USER32.dll + 0x87eb (0x77d487eb)
USER32.dll + 0xb368 (0x77d4b368)
USER32.dll + 0xb3b4 (0x77d4b3b4)
ntdll.dll + 0xeae3 (0x7c90eae3)
USER32.dll + 0xcff8 (0x77d4cff8)
_pl_AcknowledgeNativeNotify 
[d:/builds/tinderbox/Fx-Aviary1.0.1/WINNT_5.0_Depend/mozilla/xpcom/threads/plevent.c,
line 1291]
PL_ProcessPendingEvents 
[d:/builds/tinderbox/Fx-Aviary1.0.1/WINNT_5.0_Depend/mozilla/xpcom/threads/plevent.c,
line 619]
SHDOCVW.dll + 0x150c24 (0x778b0c24)
nsPrintData::DoOnProgressChange 
[d:/builds/tinderbox/Fx-Aviary1.0.1/WINNT_5.0_Depend/mozilla/content/base/src/nsPrintData.cpp,
line 190]
_imp_??1nsCOMPtr_base

Looks like dupe of bug 267286.
Keywords: crash
Summary: crash while trying to close page in xmlhttprequest.onreadystatechange event handler → crash while trying to close page in xmlhttprequest.onreadystatechange event handler [@ 0x00000000 - nsEventStateManager::PreHandleEvent ]

*** This bug has been marked as a duplicate of 267286 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Crash Signature: [@ 0x00000000 - nsEventStateManager::PreHandleEvent ]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: