Stress test with tables fails

RESOLVED FIXED

Status

()

--
enhancement
RESOLVED FIXED
15 years ago
10 years ago

People

(Reporter: peter.schaefer, Unassigned)

Tracking

Trunk
x86
Windows 98
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Win98; rv:1.7.3) Gecko/20040913 Firefox/0.10
Build Identifier: Mozilla/5.0 (Windows; U; Win98; rv:1.7.3) Gecko/20040913 Firefox/0.10

This is almost a feature request except that it can hang a system that does not
put memory limits onto a process:

I accidently fed the browser with, as I understand it, a 1067 column table with
two rows. The columns all accidently were labelled with colspans in various
powers of 2, i.e. 2<<$colindex.

Screen resolution is 768x1024.

System is unresponsive and low an memory

Reproducible: Always
Steps to Reproduce:
(I'm not asking for help with the php code, I know what the bug is )

Here is the (unfinished) php code, which looks like it breaks the browsers even
before column 20 (i hope the form takes it and that I didnt cut out too much)
were $ldcount=1076, $count=2, 
   
  $members is an array like the following:
  $members= array(array('zonename' => "A"), array('zonename' => "B"));

  ?><table border=0 cellpadding=2 cellspacing=2><?php
  ?><tr><th colspan=2>Brackets</th></tr><?php
  //generate brackets
  for($i=0; $i<$count; $i++) {
    $member= $members[$i];
    ?><tr><?php
        for($col=0;$col<$ldcount;$col++) {
          if($col!=0) {
            ?><td colspan="<?=(2<<$col)/2?>"><?=($col==$ldcount-1)?"Final
match":("round ".$col+1)?></td><?php
          }
          if($col==0) {
            ?><td colspan="<?=(2<<$col)/2?>"><?=$member['zonename']?></td><?php
          } else {
            ?><td colspan="<?=(2<<$col)/2?>">TBD</td><?php
          }

          //debug
          @$xxx++;
          if($xxx>20) {
                       	die;
          }
        }
    ?></tr><?php

          //debug
          @$xxx++;
          if($xxx>20) {
                       	echo "<p>outer loop</p>"; die;
          }
  }
  ?></table><?php

Actual Results:  
System froze, CTRL-ALT-DEL worked, browser still hung after the Apache running
on same machine was killed, System and apache ok if the browser was killed first
(Nice to see that my bookmark icons survived the kill of the browser, BTW.)

Expected Results:  
Now unfortunately I am not 100% sure that it was firefox not the apache that
consumed all the memory, but with 95% it would be nice if FireFox was able to
check now and then whether its memory requirements were extraordinary and would
ask the user once or twice whether it should continue.  

It would have helped me to avoid the reboot caused by another app that doesnt
handle low memory resources well.
Please attach a testcase that shows the bug.
Please also test with the latest nightly trunk build to see if this is still a
problem:
http://ftp.scarlet.be/pub/mozilla.org/firefox/nightly/latest-trunk/
Component: General → Layout: Tables
Product: Firefox → Core
Version: unspecified → Trunk
Assignee: firefox → nobody
QA Contact: general → layout.tables

Comment 2

10 years ago
marking as incomplete, as the php code never showed up, please reopen the bug if the problem still exists.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → INCOMPLETE
(Reporter)

Comment 3

10 years ago
Tested with the attached code; The problem does not appear in Firefox 3.0.3, which handles the table gracefully.
(Don't know how to access trunk).

<?php

  $members= array(array('zonename' => "A"), array('zonename' => "B"));
  $ldcount= 1076;
  $count= 2;
  ?><table border=0 cellpadding=2 cellspacing=2><?php
  ?><tr><th colspan=2>Brackets</th></tr><?php
  //generate brackets
  for($i=0; $i<$count; $i++) {
    $member= $members[$i];
    ?><tr><?php
        for($col=0;$col<$ldcount;$col++) {
          if($col!=0) {
            ?><td colspan="<?=(2<<$col)/2?>"><?=($col==$ldcount-1)?"Final
match":("round ".$col+1)?></td><?php
          }
          if($col==0) {
            ?><td colspan="<?=(2<<$col)/2?>"><?=$member['zonename']?></td><?php
          } else {
            ?><td colspan="<?=(2<<$col)/2?>">TBD</td><?php
          }

          //debug
          @$xxx++;
          if($xxx>20) {
                           //die;
          }
        }
    ?></tr><?php

          //debug
          @$xxx++;
          if($xxx>20) {
                           //echo "<p>outer loop</p>"; die;
          }
  }
  ?></table><?php
Resolution: INCOMPLETE → FIXED
You need to log in before you can comment on or make changes to this bug.