stop script dialog refuses to stop runaway recursive script




8 years ago
7 years ago


(Reporter: Jim Michaels, Unassigned)


3.5 Branch
Windows XP

Firefox Tracking Flags

(Not tracked)



(1 attachment)



8 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.590; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; OfficeLiveConnector.1.3; OfficeLivePatch.0.0)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)

the script I am trying to debug is recursive, and FF refuses to stop it.  I get the same dialog box over and over "unresponsive script", and then some more images appear in the list element (bug in my script, should only be 1 image per list item).  in the meantime, Firefox switches to other windows applications, refuses to respond to the red "X" stop button, and the debug script button does the same thing as the stop button - useless.  only recourse is to kill FF from task mgr.

also, first time I bring up that page (restore previous pages) it does not execute.  FF is not executing the javascript (maybe that's a good thing, but still...).

Reproducible: Always

Steps to Reproduce:
1. run FF with pages restored from previous state.
2. make sure to refresh buggy DHTML tree development page with recursive script.
3. stop script dialog will appear. press stop script button or debug script button.  doesn't stop.  try over and over.
4. try to hit the red "X" stop button.
5. kill FF using task mgr.
Actual Results:  
 doesn't matter which button I press or what I do (except kill FF), same result - doesn't stop and FF doesn't respond.

Expected Results:  
find a good way to terminate and restart the javascript engine, or truly reset/reinitalize the javascript engine.

I have not published the problem web page.  If you need the source code, I can provide it, just ask, it's GPL'd, and the tree menu is under development.

Comment 1

8 years ago
by the way, I ran it again. when FF is not displaying a stop script dialog, it's displaying a wait cursor.  please fix quickly.
Duplicate of Bug 331658 ?
Version: unspecified → 3.5 Branch
Reporter, are you still seeing this issue with Firefox 3.6.13 or later in safe mode or a fresh profile? If not, please close. These links can help you in your testing.
Whiteboard: [CLOSEME 2011-2-25]

Comment 4

7 years ago
the code I used to have had no timers, just recursion.  but just the same, the code was bad enough that it 

I was desperate enough to fix the code and now it works, but alas, that means I have no buggy bad recursive code to submit to mozilla.

Bug 331658 is somewhat similar in that the basis is bad code, but that's the only similarity.  I have no timers in my code and I'm sure if I still had that code it would still essentially make ff useless and uncontrollable.

essentially what the bug was I think was it was inserting elements all the while it was trying to traverse them, and this was the mistake (and using recursion to do it).

I will attach my fixed code so you may see the repaired version.
I am sorry I do not have the broken code.  I guess if I am not tired I could maybe rewrite it so it matches the description I listed.  there was something about the code I used that was particularly bad...  I will try to write a testcase and see what happens.

Comment 5

7 years ago
Created attachment 509710 [details]
js source of correctly working code. will try to submit code that messes up ff


7 years ago
Whiteboard: [CLOSEME 2011-2-25]

Comment 6

7 years ago
I give up.  I have no idea how to replicate my original buggy code.  setting to resolved->fixed because I don't know any other way to close the bug.
Last Resolved: 7 years ago
Resolution: --- → FIXED


7 years ago
You need to log in before you can comment on or make changes to this bug.