Subject: Tracking a crasher...
From: Jesper Skov (jskov@redhat.com)
Date: Sun Jan 21 2001 - 05:02:26 CST
Martin mentioned a crasher which was found by Thomas Fletcher's
colleague. It's quite easy to reproduce:
1<line-break>2<cursor up><return>[*boom*]
The problem is that the forced line/page break ends up in the document
content for some reason:
(gdb) p ::__dumpv()
FL_DocLayout::__dump(0x0x84985d0) contains 1 pages.
Page: 0x0x849ea50
FL_DocLayout::__dump(0x0x84985d0) sections:
Section: 0x0x8498c18 [type 1]
Block: 0x0x8498d48 [sdh 0x0x84983f8]
Run: 0x84b4748 T=Text Off=0 Len=0 D=n Line=0x8499270 [x 0 y 0 w 0 h 18]
Run: 0x84b4080 T=Text Off=0 Len=1 D=n Line=0x8499270 [x 0 y 0 w 8 h 18]
[1]
Run: 0x84b4600 T=LineBreak Off=1 Len=1 D=n Line=0x8499270 [x 8 y 0 w 0 h 0]
Run: 0x8499078 T=Text Off=2 Len=1 D=n Line=0x84b4660 [x 0 y 0 w 8 h 18]
[2]
Dump for (null):
Document is DIRTY
PieceTable: State 2
PieceTable: Fragments:
Section 0x8497dd0 api[00000000]
Block 0x84983f8 api[00000000]
TextFragment 0x84b3fa8 b[80000000,1] api[00000000]
[1]
TextFragment 0x84b4588 b[80000002,1] api[00000000]
[@]
TextFragment 0x84b45b0 b[80000001,1] api[00000000]
[2]
EODFragment 0x8497e10 type[3]
So when FV_View::insertParagraphBreak() gets to
pt_PieceTable::_insertStrux it tries to break a fragment of length 3
into two new fragments [as you can see in the above, there is no
fragment with length 3!]
Here's how it looks without the forced line/page break:
(gdb) p ::__dumpv()
FL_DocLayout::__dump(0x0x84985d0) contains 1 pages.
Page: 0x0x849eba0
FL_DocLayout::__dump(0x0x84985d0) sections:
Section: 0x0x8498c18 [type 1]
Block: 0x0x8498d48 [sdh 0x0x84983f8]
Run: 0x84b41b0 T=Text Off=0 Len=1 D=n Line=0x8499270 [x 0 y 0 w 8 h 18]
[1]
Run: 0x8499078 T=Text Off=1 Len=1 D=n Line=0x8499270 [x 8 y 0 w 8 h 18]
[2]
Dump for (null):
Document is DIRTY
PieceTable: State 2
PieceTable: Fragments:
Section 0x8497dd0 api[00000000]
Block 0x84983f8 api[00000000]
TextFragment 0x84b40d8 b[80000000,2] api[00000000]
[12]
EODFragment 0x8497e10 type[3]
So I'll try to find the place where the forced line/page break messes
up the document. I'll make sure to let you know of my findings, or if
I bail out due to time constraints.
Cheers,
Jesper
This archive was generated by hypermail 2b25 : Sun Jan 21 2001 - 05:02:31 CST