Closed Bug 326960 Opened 19 years ago Closed 17 years ago

hang in JavaScript

Categories

(Core :: JavaScript Engine, defect)

x86
Windows XP
defect
Not set
critical

Tracking

()

RESOLVED INVALID

People

(Reporter: kuv, Unassigned)

Details

(Keywords: hang, testcase)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1 Firefox crashes after adding line "elem = 1 / 0;". Sorry, I have no time so I simply copy sample file. Reproducible: Always Steps to Reproduce: Load file below locally. <html> <head> <style> body {background-color: #c0c0c0; margin: 0px; } img {border: 0px; } table {font-size: 14px; } </style> <script language="javascript"> function getPos(elem) { left = 0; top = 0; out = document.getElementById('log'); while (elem != document.body) { if (elem.toString() != '[object HTMLTableRowElement]') { out.innerHTML += elem.offsetLeft + '<br/>'; // alert(elem.toString()); left += elem.offsetLeft; top += elem.offsetTop; } out.innerHTML += 'END<br/>'; // alert(elem.toString() + ' => ' + elem.offsetLeft); elem = elem.parentNode; elem = 1 / 0; } // alert("-= END =-"); return new Array(left, top); } function showMenu(id, parent) { menu = document.getElementById(id); menu.style.display = "block"; pos = getPos(parent); // alert(parent.scrollLeft); menu.style.left = pos[0]; menu.style.top = pos[1]; } </script> </head> <body> <table align="center" width="80%" cellspacing="0" cellpadding="0" style="position: absolute"><tr> <td align="left"><img src="img/topLeft.png"/></td> <td align="right"><img src="img/topRight.png"/></td> </tr></table> <table align="center" width="80%" height="100%" cellspacing="0" cellpadding="0"> <tr><td> <table width="100%" cellspacing="0" cellpadding="0"> <tr><td colspan="3" background="img/topBg.png" height="13px"/></tr> <tr><td background="img/topLeftBg.png" width="14px"/> <td bgcolor="#ffffff" height="80px"> <!-- Title begin --> <h1 align="center">Version control with Subverion</h1> <!-- Title end --> </td> <td background="img/topRightBg.png" width="14px"/></tr> </table> </td></tr> <tr><td> <table width="100%" cellspacing="0" cellpadding="0"><tr> <td background="img/headerLeft.png" width="14px"/> <td background="img/headerBg.png" height="25px" align="center"> <table cellspacing="0" cellpadding="0"><tr> <!-- Header begin --> <td>Header</td> <td width="20px" align="center"><img src="img/headerSplitter.png"/></td> <td onMouseOver="showMenu('menu01', this)">Menu</td> <div id="menu01" style="position: absolute; display: none"> XXX </div> <!-- Header end --> </tr></table> </td> <td background="img/headerRight.png" width="14px"/> </tr></table> </td></tr> <tr height="100%"><td valign="top" bgcolor="#ffffff"> <table width="100%" height="100%" cellspacing="0" cellpadding="0" style="background-image: url(img/leftBg.png); background-repeat: repeat-y"><tr> <td colspan="2" width="25%" height="100%" valign="top" style="background-image: url(img/bodyLeftBg.png); background-position: right; background-repeat: repeat-y"> <table width="100%" height="100%" cellspacing="0" cellpadding="0"> <tr><td style="background-image: url(img/bodyTopLeft.png); background-position: right; background-repeat: no-repeat" width="15px" height="9px"></td></tr> <tr height="100%"><td valign="top"> <!-- Menu block begin--> <table width="100%" cellspacing="0" cellpadding="0"> <tr height="24px"> <td><img src="img/menuTopLeft.png"/></td> <td background="img/menuTopBg.png" width="100%"/> <td><img src="img/menuTopRight.png"/></td> </tr> <tr> <td background="img/menuLeftBg.png" width="14px"/> <td colspan="2"> <!-- Menu body begin --> <table width="100%" cellspacing="0" cellpadding="0"><tr> <td background="img/menuBNormalLeft.png" width="5px"/> <td background="img/menuBNormalBg.png" height="30px"> Normal button </td> <td background="img/menuBNormalRight.png" width="59px"/> <td background="img/bodyLeftMenuBg.png" width="22px"/> </tr></table> <table width="100%" cellspacing="0" cellpadding="0"><tr> <td background="img/menuBSelectedLeft.png" width="5px"/> <td background="img/menuBSelectedBg.png" height="30px"> Selected button </td> <td background="img/menuBSelectedRight.png" width="59px"/> <td background="img/bodyLeftMenuBg.png" width="22px"/> </tr></table> <table width="100%" cellspacing="0" cellpadding="0"><tr> <td background="img/menuBActiveLeft.png" width="5px"/> <td background="img/menuBActiveBg.png" height="30px"> Active button </td> <td background="img/menuBActiveRight.png" width="59px"/> <td background="img/bodyLeftMenuBActive.png" width="22px"/> </tr></table> <table width="100%" cellspacing="0" cellpadding="0"><tr> <td bgcolor="#f5f5f5"> Custom menu item </td> <td background="img/bodyLeftMenuBg.png" width="22px"/> </tr></table> <!-- Menu body end --> </td> </tr> <tr height="24px"> <td><img src="img/menuBottomLeft.png"/></td> <td background="img/menuBottomBg.png" width="100%"/> <td><img src="img/menuBottomRight.png"/></td> </tr> </table> <!-- Menu block end--> </td></tr> <tr><td style="background-image: url(img/bodyBottomLeft.png); background-position: right; background-repeat: no-repeat" width="15px" height="9px"></td></tr> </table> </td> <td rowspan="2" valign="top" style="padding-left: 5px; padding-right: 5px"> <!-- Body begin --> <span id="log"/> <h2>The Limitations of Mixed Revisions</h2><p>As a general principle, Subversion tries to be as flexible as possible. One special kind of flexibility is the ability to have a working copy containing mixed revision numbers.</p><p>At first, it may not be entirely clear why this sort of flexibility is considered a feature, and not a liability. After completing a commit to the repository, the freshly committed files and directories are at a more recent working revision than the rest of the working copy. It looks like a bit of a mess. As demonstrated earlier, the working copy can always be brought to a single working revision by running <b>svn update</b>. Why would someone <em>deliberately</em> want a mixture of working revisions?</p><p>Assuming your project is sufficiently complex, you'll discover that it's sometimes nice to forcibly “backdate” portions of your working copy to an earlier revision; you'll learn how to do that in Chapter 3. Perhaps you'd like to test an earlier version of a sub-module, contained in a subdirectory, or perhaps you'd like to examine a number of previous versions of a file in the context of the latest tree.</p><p>However you make use of mixed-revisions in your working copy, there are limitations to this flexibility.</p><p>First, you cannot commit the deletion of a file or directory which isn't fully up-to-date. If a newer version of the item exists in the repository, your attempt to delete will be rejected, to prevent you from accidentally destroying changes you've not yet seen.</p><p>Second, you cannot commit a metadata change to a directory unless it's fully up-to-date. You'll learn about attaching “properties” to items in Chapter 6. A directory's working revision defines a specific set of entries and properties, and thus committing a property change to an out-of-date directory may destroy properties you've not yet seen.</p><h2>Summary</h2><p>We've covered a number of fundamental Subversion concepts in this chapter:</p><ul type="disc"><li><p>We've introduced the notions of the central repository, the client working copy, and the array of repository revision trees.</p></li><li><p>We've seen some simple examples of how two collaborators can use Subversion to publish and receive changes from one another, using the “copy-modify-merge” model.</p></li><li><p>We've talked a bit about the way Subversion tracks and manages information in a working copy.</p></li></ul><p>At this point, you should have a good idea of how Subversion works in the most general sense. Armed with this knowledge, you should now be ready to jump into the next chapter, which is a detailed tour of Subversion's commands and features.</p> <!-- Body end --> </td> <td rowspan="2" background="img/rightBg.png" width="14px"/> </tr> </table> </td></tr> <tr><td> <table width="100%" cellspacing="0" cellpadding="0" style="line-height: 0"><tr> <td background="img/bottomLeft.png" width="14px"/> <td background="img/bottomBg.png" align="center" height="7px">&nbsp;</td> <td background="img/bottomRight.png" width="14px"/> <tr></table> </td></tr> </table> </body> </html>
Keywords: crash, stackwanted
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1 Can't reproduce a crash, only a hang after moving my mouse wildly for at least one minute. I see that hang in trunk and branch builds. Reporter, if it crashes for you, could you reinstall Firefox with Talkbalk (choose custom install; Quality Feedback Agent) and provide a Talkback ID? To find the ID after the crash go to <install dir>\extensions\talkback@mozilla.org\components\talkback.exe and copy the ID to this bug.
It is not exactly crashes, but stops responding and I need to kill process manually, so feedback agent gives nothing. To reproduce it, try to move mouse over "Menu" title on top of the page. I have also reproduced bug successfully with Firefox 1.5 on another machine with WinXP.
Keywords: crashhang
Attached file comment 0 in file form
hangs after just letting it sit - FF trunk 20080522 windows XP latest java afaik Java Plug-in 1.6.0_05 for Netscape Navigator (DLL Helper)
IE7 doesn't hang
Assignee: nobody → general
Component: General → JavaScript Engine
Keywords: stackwantedtestcase
Product: Firefox → Core
QA Contact: general → general
Summary: Crash by JavaScript → hang in JavaScript
function getPos(elem) { left = 0; top = 0; out = document.getElementById('log'); while (elem != document.body) { if (elem.toString() != '[object HTMLTableRowElement]') { out.innerHTML += elem.offsetLeft + '<br/>'; // alert(elem.toString()); left += elem.offsetLeft; top += elem.offsetTop; } out.innerHTML += 'END<br/>'; // alert(elem.toString() + ' => ' + elem.offsetLeft); elem = elem.parentNode; elem = 1 / 0; what's up with resetting elem here? It will never be equal to document.body if you reset it to Infinity and the loop will never terminate. } // alert("-= END =-"); return new Array(left, top); } Not sure what's up with IE7, but this looks invalid to me.
That look won't terminate in any ECMA-262 conformant implementation. Something else is happening in IE (user-agent forking to make control flow away from that function altogether? or elem == document.body from the start? If so, file a bug focused on the DOM difference responsible). /be
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: