Closed Bug 158735 Opened 23 years ago Closed 23 years ago

Mozilla crash when using DOM to make one position:fixed div appear over another

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows 98
defect
Not set
critical

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: yosi, Assigned: jst)

Details

Attachments

(1 file)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.1a) Gecko/20020611 BuildID: 2002061104 I was creating this HTML file, and when I made it so there were two divs that were both position:fixed and both overflow:auto, with javascript on a timer making one disappear and reappear. When I would load it, mozilla would crash Reproducible: Always Steps to Reproduce: 1.load crash.html 2. 3. Actual Results: page crashes Expected Results: I really didn't know what to expect. ----crash.html, the file that did it all---- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>a weird javascript test</title> </head> <style type="text/css" id="my_style"> <!-- div#hide_me { margin: 0; font-size: 800% /*smaller*/; font-weight: bold; line-height: 1.1; text-align: center; // position: fixed; // top: 0em; // left: 0em; // width: 100%; // height:100%; display: none; background: #900; // overflow: auto; } div#other { overflow: auto; position: fixed; top: 0em; left: 0em; width: 100%; height:100%; } --> </style> <body> <div id="other"> <h1>hi</h1> <br> I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. <br> <br> </div> <div id="hide_me" onMouseMove="owell()"> I am your worst nightmare!!!!! </div> <script language="javascript"> setTimeout("haha()",1000); function haha() { if (a==0) { a=1; document.styleSheets[0].cssRules[0].style.setProperty('display',"block",''); } else { a=0; document.styleSheets[0].cssRules[0].style.setProperty('display','none',''); } setTimeout("haha()",1000); } </script> </body> </html>
It seems that, when I was cutting down the test case, I fixed the problem. This file does crash it. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>a weird javascript test</title> </head> <style type="text/css" id="my_style"> <!-- div#hide_me { margin: 0; font-size: 800% /*smaller*/; font-weight: bold; line-height: 1.1; text-align: center; // position: fixed; // top: 0em; // left: 0em; // width: 100%; // height:100%; display: none; background: #900; // overflow: auto; } div#other { overflow: auto; position: fixed; top: 0em; left: 0em; width: 100%; height:100%; } --> </style> <body> <div id="other"> <h1>hi</h1> <script language="javascript"> <!-- var a; var b = new Date(); document.open(); document.write("<!") document.write("-- "); document.close(); // --> </script> <p>Your browser DOES NOT support Javascript, or Javascript is turned off, you dope!</p> <!-- --> <script language="javascript"> <!-- document.open(); document.write('<p>Welcome, gullible idiot who allows untrusted sites to run Javascript</p>'); document.close(); // --> </script><br> I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. <table align=right><tr><td><img src="../../../../Yosi/Anieyes.gif" alt="hi, how am I?" style="width: 72px; height: 37px;" title="who are you?"><br>I wish I knew</td></tr> </table> I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you can read this. I sure hope you I sure hope you can <br> <br> </div> <div id="hide_me"> I am your worst nightmare!!!!! </div> <script language="javascript"> setTimeout("haha()",1000); function haha() { if (a==0) { a=1; document.styleSheets[0].cssRules[0].style.setProperty('display',"block",''); } else { a=0; document.styleSheets[0].cssRules[0].style.setProperty('display','none',''); } setTimeout("haha()",1000); } </script> </body> </html>
Attached file reporter's testcase
this crashes linux build 20020721 (please create attachments instead of pasting HTML as comments...)
I think I must have actually been testing an older build. This seems to have been fixed between 06-27 and 06-29. Yosi: could you try a recent nightly build?
wfm, 2002072204/linux. very nasty testcase, though. I'll have nightmares now \:
Yes, I just downloaded 1.1 beta and it does not crash. Closing as FIXED, based on what Andrew said.
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
no patch attached = not fixed
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---
-> wfm
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → WORKSFORME
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: