Last Comment Bug 343087 - multiple tfoot cellmap crash [@ nsCellMap::GetCellInfoAt]
: multiple tfoot cellmap crash [@ nsCellMap::GetCellInfoAt]
: crash, testcase, verified1.8.0.7, verified1.8.1
Product: Core
Classification: Components
Component: Layout: Tables (show other bugs)
: Trunk
: x86 Windows XP
-- normal (vote)
: ---
Assigned To: Bernd
Depends on: 347725 347796
Blocks: stirtable 346980
  Show dependency treegraph
Reported: 2006-06-29 00:03 PDT by Bernd
Modified: 2011-06-13 10:01 PDT (History)
9 users (show)
dveditz: blocking1.8.0.7+
bob: in‑testsuite+
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

testcase (854 bytes, text/html)
2006-06-29 00:04 PDT, Bernd
no flags Details
patch (5.97 KB, patch)
2006-07-04 12:08 PDT, Bernd
no flags Details | Diff | Splinter Review
revised patch (14.76 KB, patch)
2006-08-01 10:16 PDT, Bernd
bzbarsky: review+
bzbarsky: superreview+
Details | Diff | Splinter Review

Description User image Bernd 2006-06-29 00:03:54 PDT
we access deleted memory the testcase "works" only with latest trunk
Comment 1 User image Bernd 2006-06-29 00:04:47 PDT
Created attachment 227512 [details]

lithium is great :-)
Comment 2 User image Bernd 2006-07-04 12:08:44 PDT
Created attachment 228063 [details] [diff] [review]

Boris, this another iteration over the patch in bug 339130, I will not promise that it is the last one but the crash frequency is dropping rapidly.
Comment 3 User image Boris Zbarsky [:bz] (still a bit busy) 2006-07-16 15:03:52 PDT
I want some documentation about what the new args to this function mean.  I can't even really review this without that documentation...
Comment 4 User image Bernd 2006-08-01 10:16:30 PDT
Created attachment 231597 [details] [diff] [review]
revised patch
Comment 5 User image Bernd 2006-08-03 22:53:13 PDT
The problem is  that a table can have only one footer all other tfoot tags are treated as tbodies. If you remove one tfoot one the previuosly treated as tbody tfoot tags becomes a really footer. This changes its place in the frame list. Every row has a row index which shows its place in the table. If the above described change happens the rowindices become wrong. They need to be reset. This is what ResetRowIndices does. However if we insert a new tfoot tag then we need to find the new rowindices for the insert. When we determine the position of the rows we need the correct order of the rowgroups (OrderRowGroups) the new tfoot will be already in the list of rowgroups but the reset should be done only on the previuosly existing rowgroups. Then we will find the correct startindex and adjust all following rowgroups and their rows.
 moves the AdjustRowIndices to the rowgroup where it belongs and makes the return value void.

Further it add two args to  ResetRowIndices that are the frames that should be omitted from the reset as they will be inserted later.

Is similiar to the thing that we have done at bug 343778, if we add a cell to the cellmap it is possible that the number of columns shrinks.

Does what has been described in the intro, we need to reset the rowindices earlier than I previously thought just before we insert the new data into the cellmap. So we split the routine and insert the ResetRowIndices together with a cellmap sync.

In order to get the column information right we need to have the correct cellmap information before. As this pretty difficult to get correctly we nuke the cellmap and build it new.

document the routines and the args

shift the routine where it belongs

Comment 6 User image Boris Zbarsky [:bz] (still a bit busy) 2006-08-04 09:57:54 PDT
Comment on attachment 231597 [details] [diff] [review]
revised patch

r+sr=bzbarsky.  Thanks for the explanation; that made this much happier!
Comment 7 User image Bernd 2006-08-04 13:18:31 PDT
fix checked in
Comment 8 User image Boris Zbarsky [:bz] (still a bit busy) 2006-08-04 20:05:35 PDT
By the way, do we need anything like this for thead?
Comment 9 User image Bernd 2006-08-04 22:31:47 PDT
thead/tfoot are handled similiar when they appear multiple times. So my language is not very precise in this bug but I believe what I did here helps also with multiple theads
Comment 10 User image Boris Zbarsky [:bz] (still a bit busy) 2006-08-04 22:32:51 PDT
Ah, ok.  Most excellent. 
Comment 11 User image Bernd 2006-08-29 12:41:18 PDT
fixed on branches by the cellmap branch patch
Comment 12 User image Jay Patel [:jay] 2006-09-07 13:34:49 PDT
v.fixed on both branches, no crash with testcase.
Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv: Gecko/20060906 Firefox/
Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1b2) Gecko/20060907 BonEcho/2.0b2

However, I also do not crash with or 2.0b1, so will leave it to Bernd to explain why that might be. I think he mentioned the crash depended on other bugs/patches...
Comment 13 User image Daniel Veditz [:dveditz] 2006-09-19 15:51:35 PDT
The blocking nomination got lost in a bugzilla accident, but I think it was left over from when it looked like the cellmap fixes weren't going to make Please re-nominate if I'm missing something
Comment 14 User image Bob Clary [:bc:] 2009-04-24 11:08:40 PDT
crash test landed

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