Subject: Re: Tracking a crasher...
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Sun Jan 21 2001 - 08:53:35 CST
On Mon, 22 Jan 2001, Martin Sevior wrote:
> On Sun, 21 Jan 2001, Jesper Skov wrote:
> 
> > >>>>> "Jesper" == Jesper Skov <jskov@redhat.com> writes:
> > 
> > Jesper> The problem is that the forced line/page break ends up in the
> > Jesper> document content for some reason:
> > 
> > This is alright after all.
> > 
> > Jesper> So when FV_View::insertParagraphBreak() gets to
> > Jesper> pt_PieceTable::_insertStrux it tries to break a fragment of
> > Jesper> length 3 into two new fragments [as you can see in the above,
> > Jesper> there is no fragment with length 3!]
> > 
> > But this still puzzles me. I'll look closer at it now.
> 
> This might help. Within the piecetable you have
> 
> loc1    loc2     loc3
>  2   <linebeak>  <next char after linebreak>
> 
Whoops! This is wrong. I just reread your original message. I know what's
happening now.
Within the piecetable in the same span you have. 
loc1    loc2          loc3
 1     <linebreak>     2
This is where your 3 character run occurs.
The linebreak is just another unicode character in the piecetable. On
screen the cursor is between the 1 and the linebreak. However
the doc position returned by findPointCoords might be after the linebreak since
it is a zero length run. I guess the bug is triggered by this confusion. 
Cheers!
Martin
This archive was generated by hypermail 2b25 : Sun Jan 21 2001 - 08:53:44 CST