Closed Bug 146592 Opened 22 years ago Closed 22 years ago

Javascript hangs browser

Categories

(SeaMonkey :: General, defect)

PowerPC
macOS
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: rcathcart, Assigned: Matti)

References

()

Details

(Keywords: hang)

Attachments

(2 files)

From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.14; Mac_PowerPC)
BuildID:    2002051005

In the page http://www.stoneharbor.com/ the browser will hang if 
javascript is enabled. I traced it to the javascript in the file http://
www.stoneharbor.com/buttons.cgi which I will attach.

Reproducible: Always
Steps to Reproduce:
1. Load http://www.stoneharbor.com/
or
2. Load http://www.stoneharbor.com/buttons.cgi
or
3. Load attached buttons.cgi

Actual Results:  The browser's window title changes, the content area 
goes all white, and the browser hangs.

Expected Results:  The page should load a java-driven menu.

I was only able to test this on the MacOS X build. I am running MacOS 
10.1.4.
This is the file from www.stoneharbor.com/buttons.cgi, in case it changes.
http://www.stoneharbor.com/buttons.cgi loads fine on a current CVS build, Linux
Keywords: hang
WorksForMe using FizzillaCFM/2002052305 (RC3).
I just downloaded and tried this with 2002052305 (RC3 on MacOS 
10.1.4), and the problem is also present there.
Perhaps this isn't a JavaScript problem, but rather Java.

Guys, what version of the MRJ Plug-In are you running? Are you able to access
any other Java-containing pages successfully?
% java -version
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-root-
020219-20:07)
Java HotSpot(TM) Client VM (build 1.3.1, mixed mode)

I did have another hang problem with a page http://www.macraffle.com/
home/index.php but haven't gotten to the bottom of it yet.

If this were a java problem, wouldn't IE and OmniWeb also die?
Off-track: there is no Java involved in this menu; just JavaScript.
Note the site uses Macromedia menu templates to do this:

function MM_findObj(n, d) { //v4.01
  var p,i,x;  

  if(!d) d=document; 

  if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document;
    n=n.substring(0,p);
  }
  
  if(!(x=d[n])&&d.all)
    x=d.all[n];

  for (i=0;!x&&i<d.forms.length;i++)
    x=d.forms[i][n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++)     
    x=MM_findObj(n,d.layers[i].document);

  if(!x && d.getElementById)
    x=d.getElementById(n);

  return x;
}


function MM_swapImage() { //v3.0
  var i,j=0,x,
  a=MM_swapImage.arguments;
  document.MM_sr=new Array;

  for(i=0;i<(a.length-2);i+=3)
    if ((x=MM_findObj(a[i]))!=null){
      document.MM_sr[j++]=x; 
 
      if(!x.oSrc)
        x.oSrc=x.src;
      
      x.src=a[i+2];
   }
}


          etc. 
Everything WORKSFORME using recent Mozilla trunk binaries on 
WinNT, Mac OS9, and Linux. I wonder if this is OSX-specific???
The site, and both attached testcases all load and work properly
for me. cc'ing Moied to see if he can reproduce this on OSX.

Reassigning to Browser-General until we can get further information.
This is not likely to be due to any bug in JavaScript Engine.

Ray: 

What happens if you try a new profile? If you can launch Mozilla
from a console window, do this:

 [(path to Mozilla)] ./mozilla -profilemanager

When the Profile Manager window comes up, create a new profile
and run Mozilla under that. Does the site still hang? 
Assignee: rogerl → Matti
Component: JavaScript Engine → Browser-General
QA Contact: pschwartau → imajes-qa
Phil:
Ahhh, the old "didn't trash my preferences" bug. Yes, that fixed it at both 
sites I mentioned before.

However, now I get a permenant "Transfering data from 
www.stoneharbor.com..." or "Transfering data from www.macraffle.com..." 
message in the status bar. Is this normal for javascript pages? Anyway, 
the hang is gone.
There is another bug about this "transfering from.." in the status bar.

-> wfm
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: