Continous 5 times Window.open crashing application.

VERIFIED FIXED in M14

Status

()

Core
DOM: Core & HTML
P1
blocker
VERIFIED FIXED
19 years ago
19 years ago

People

(Reporter: Prashant Desale, Assigned: vidur (gone))

Tracking

Trunk
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [PDT+], URL)

(Reporter)

Description

19 years ago
If we use window.open continously to load new pages, for first 4 times its fine, 
but fith time it crashes application. 

In our automation testing we open new window for loading every new testcase, and 
now this is blocking automation. 

BUILDS: 2000-02-01-00.

OS TESTED ON: Win-95, Win-98, MACOS.

STEPS TO REPRODUCE:
1] Please visit above URL.
2] You'll see one parent window. This parent window will keep on opening one 
child window.
3] You'll see one counter on child window. When this counter reaches 4, after 
that 5th time, you'll see crash.

OR

1] Please copy HTML codes I'm providing for parent window, as well as child 
window. Save those HTML files. Make chages in variabe 'url' in parent window 
code, according to new file locations.
2] Open parent file with above specified builds.
3] You'll see one parent window. This parent window will keep on opening one 
child window.
4] You'll see one counter on child window. When this counter reaches 4, after 
that 5th time, you'll see crash.

EXPECTED RESULTS:
Parent window should open child window 5 times, since we are limiting counter to 
6.

ACTUAL RESULTS:
5th time it crashes application.

TESTCASE CODE FOR PARENT WINDOW START:
<HTML>
<HEAD><TITLE>Continous Window.Open()</TITLE></HEAD>
<BODY>
This is Parent Window which is going to open child window 5 times.
<SCRIPT>
<!--
var tcnum=1;
opennewwin();
function opennewwin()
{
  if(tcnum != 6)
  {
  
    url = 'http://bubblegum/desale/opennewwin1.html';
    testWin = window.open(url, 'testWindow');
    testWin.opener = self;
    testWin.focus();
    tcnum++;
  }
}
//-->
</SCRIPT>
</BODY>
</HTML>
TESTCASE CODE FOR PARENT WINDOW END:

TESTCASE CODE FOR CHILD WINDOW START:
<html>
<head>
<title>Child window</title>
</head>
<body>
This is child window which is going to get opened by parent window 5 times.
<SCRIPT>
<!--
document.write('<H1>');
document.write('Window Open Counter = ');
document.write(window.opener.tcnum);
document.write('</H1>');
window.opener.opennewwin();
//-->
</SCRIPT>
</body>
</html>
TESTCASE CODE FOR CHILD WINDOW END:
(Reporter)

Updated

19 years ago
Priority: P3 → P1

Comment 1

19 years ago
Putting on dogfood radar...blocking automation.
Keywords: dogfood

Updated

19 years ago
Blocks: 11349

Comment 2

19 years ago
Putting on PDT+ radar.  QA needs fix ASAP!!
Whiteboard: [PDT+]
Target Milestone: M14
(Assignee)

Comment 3

19 years ago
Here's the crash stack trace. My first thought is an extra release somewhere on 
a webshell.

nsToolkit::IsGuiThread() line 54 + 18 bytes
nsWindow::SetFocus(nsWindow * const 0x0f54d514) line 1268 + 8 bytes
GlobalWindowImpl::Focus(GlobalWindowImpl * const 0x0f53fea8) line 1331 + 23 
bytes
nsWebShellWindow::Show(nsWebShellWindow * const 0x0f0f4470, int 1) line 1393
nsWebShellWindow::Show(nsWebShellWindow * const 0x0f0f4478) line 221 + 21 bytes
GlobalWindowImpl::Focus(GlobalWindowImpl * const 0x0f53fea8) line 1308
nsWebShellWindow::HandleEvent(nsGUIEvent * 0x0012d8dc) line 525
nsWindow::DispatchEvent(nsWindow * const 0x0f0f2704, nsGUIEvent * 0x0012d8dc, 
nsEventStatus & nsEventStatus_eIgnore) line 497 + 10 bytes
nsWindow::DispatchWindowEvent(nsGUIEvent * 0x0012d8dc) line 518
nsWindow::DispatchFocus(unsigned int 104) line 3185 + 15 bytes
nsWindow::ProcessMessage(unsigned int 7, unsigned int 592506, long 0, long * 
0x0012db30) line 2429 + 19 bytes
nsWindow::WindowProc(HWND__ * 0x000709fc, unsigned int 7, unsigned int 592506, 
long 0) line 677 + 27 bytes
USER32! 77e71ab7()
USER32! 77e71a77()
NTDLL! 77f7624f()
nsWindow::~nsWindow() line 326
ChildWindow::~ChildWindow() + 15 bytes
ChildWindow::`scalar deleting destructor'() + 15 bytes
nsWindow::Release(nsWindow * const 0x0f0f72c4) line 226 + 147 bytes
nsWebShell::~nsWebShell() line 625 + 36 bytes
nsWebShell::`scalar deleting destructor'(unsigned int 1) + 15 bytes
nsWebShell::Release(nsWebShell * const 0x0f0f23c0) line 716 + 152 bytes
nsCOMPtr<nsIDocShell>::~nsCOMPtr<nsIDocShell>() line 435
nsChromeTreeOwner::FindItemWithName(nsChromeTreeOwner * const 0x01cb4030, const 
unsigned short * 0x0012dfec, nsIDocShellTreeItem * 0x01cb5b14, 
nsIDocShellTreeItem * * 0x0012de80) line 117 + 54 bytes
nsDocShell::FindItemWithName(nsDocShell * const 0x01cb5b14, const unsigned short 
* 0x0012dfec, nsISupports * 0x00000000, nsIDocShellTreeItem * * 0x0012de80) line 
638 + 61 bytes
nsWebShell::FindWebShellWithName(nsWebShell * const 0x01cb5bc4, const unsigned 
short * 0x0012dfec, nsIWebShell * & 0x00000000) line 2532 + 51 bytes
GlobalWindowImpl::OpenInternal(JSContext * 0x0f538730, long * 0x0ec4cd80, 
unsigned int 2, int 0, nsIDOMWindow * * 0x0012e184) line 2555
GlobalWindowImpl::Open(GlobalWindowImpl * const 0x0efefa38, JSContext * 
0x0f538730, long * 0x0ec4cd80, unsigned int 2, nsIDOMWindow * * 0x0012e184) line 
2438
WindowOpen(JSContext * 0x0f538730, JSObject * 0x00d79c38, unsigned int 2, long * 
0x0ec4cd80, long * 0x0012e240) line 2378 + 31 bytes
js_Invoke(JSContext * 0x0f538730, unsigned int 2, unsigned int 0) line 666 + 26 
bytes
js_Interpret(JSContext * 0x0f538730, long * 0x0012eabc) line 2262 + 15 bytes
js_Invoke(JSContext * 0x0f538730, unsigned int 0, unsigned int 0) line 682 + 13 
bytes
js_Interpret(JSContext * 0x0f538730, long * 0x0012f360) line 2262 + 15 bytes
js_Execute(JSContext * 0x0f538730, JSObject * 0x0ec01468, JSScript * 0x0f56e9a0, 
JSFunction * 0x00000000, JSStackFrame * 0x00000000, unsigned int 0, long * 
0x0012f360) line 839 + 13 bytes
JS_EvaluateUCScriptForPrincipals(JSContext * 0x0f538730, JSObject * 0x0ec01468, 
JSPrincipals * 0x0f567354, const unsigned short * 0x0f567560, unsigned int 176, 
const char * 0x0f54d850, unsigned int 7, long * 0x0012f360) line 2725 + 27 bytes
nsJSContext::EvaluateString(nsJSContext * const 0x0f53fe40, const nsString & 
{...}, void * 0x0ec01468, nsIPrincipal * 0x0f567350, const char * 0x0f54d850, 
unsigned int 7, const char * 0x00000000, nsString & {...}, int * 0x0012f3bc) 
line 292 + 53 bytes
HTMLContentSink::EvaluateScript(nsString & {...}, int 7, const char * 
0x00000000) line 4038
HTMLContentSink::ProcessSCRIPTTag(const nsIParserNode & {...}) line 4229
HTMLContentSink::AddLeaf(HTMLContentSink * const 0x0f01e2a0, const nsIParserNode 
& {...}) line 2939 + 12 bytes
CNavDTD::AddLeaf(const nsIParserNode * 0x0f5635e0) line 3262 + 28 bytes
CNavDTD::HandleScriptToken(const nsIParserNode * 0x0f5635e0) line 1913 + 12 
bytes
CNavDTD::OpenContainer(const nsIParserNode * 0x0f5635e0, nsHTMLTag 
eHTMLTag_script, int 1, nsEntryStack * 0x00000000) line 2940 + 12 bytes
CNavDTD::HandleDefaultStartToken(CToken * 0x02032880, nsHTMLTag eHTMLTag_script, 
nsIParserNode * 0x0f5635e0) line 1158 + 20 bytes
CNavDTD::HandleStartToken(CToken * 0x02032880) line 1472 + 22 bytes
CNavDTD::HandleToken(CNavDTD * const 0x0f54e2b0, CToken * 0x0eb0ec00, nsIParser 
* 0x0f01e4e0) line 829 + 12 bytes
CNavDTD::BuildModel(CNavDTD * const 0x0f54e2b0, nsIParser * 0x0f01e4e0, 
nsITokenizer * 0x0f550fa0, nsITokenObserver * 0x00000000, nsIContentSink * 
0x0f01e2a0) line 568 + 20 bytes
nsParser::BuildModel() line 1078 + 34 bytes
nsParser::ResumeParse(nsIDTD * 0x00000000, int 0) line 993 + 11 bytes
nsParser::OnDataAvailable(nsParser * const 0x0f01e4e4, nsIChannel * 0x0f01a4d0, 
nsISupports * 0x00000000, nsIInputStream * 0x0f01d128, unsigned int 0, unsigned 
int 350) line 1372 + 19 bytes
nsDocumentOpenInfo::OnDataAvailable(nsDocumentOpenInfo * const 0x0f01acd0, 
nsIChannel * 0x0f01a4d0, nsISupports * 0x00000000, nsIInputStream * 0x0f01d128, 
unsigned int 0, unsigned int 350) line 256 + 46 bytes
nsHTTPResponseListener::OnDataAvailable(nsHTTPResponseListener * const 
0x0f01db70, nsIChannel * 0x0f020364, nsISupports * 0x0f01a4d0, nsIInputStream * 
0x0f01d128, unsigned int 0, unsigned int 350) line 195 + 58 bytes
nsOnDataAvailableEvent::HandleEvent(nsOnDataAvailableEvent * const 0x0f01d0d0) 
line 370
nsStreamListenerEvent::HandlePLEvent(PLEvent * 0x0f01d080) line 93 + 12 bytes
PL_HandleEvent(PLEvent * 0x0f01d080) line 526 + 10 bytes
PL_ProcessPendingEvents(PLEventQueue * 0x00c819e0) line 487 + 9 bytes
_md_EventReceiverProc(HWND__ * 0x00520a94, unsigned int 49392, unsigned int 0, 
long 13113824) line 975 + 9 bytes
USER32! 77e71250()
(Assignee)

Comment 4

19 years ago
Yup. Missing addref in nsXULWindow::GetDocShell(). Fixed on 1/2/2000.
Status: NEW → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED
(Reporter)

Comment 5

19 years ago
Thanks Vidur. Verified with 02-03-00. 
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.