Subject: Re: Nailed the crasher - code for discussion
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Sun Jan 21 2001 - 21:03:49 CST
HI Jesper,
Thanks for fixing this Jesper. It makes sense to be that if the
insertion point is between runs we will get troubles. Since we have zero
length runs this is something we have to deal with. It seems sensible then
to move the code to search for the docpos (containsOffset) into the block.
On Sun, 21 Jan 2001, Jesper Skov wrote:
<snip>
>
> The reason I'd like this discussed is because we have similar code
> elsewhere - where the Block relies on the Run to determine location,
> while the Run only knows its own location and has no sensible means of
> communicating an overrun back to the caller (only hit/miss).
I'd try changing this to block too then.
>
> Incidently, this patch fixes a lot of the stability issues I've been
> annoyed by. I cannot crash AbiWord as easily as I have been able to in
> the past. I _can_ make it bomb though, but I have to do it with undos
> now - progress of sorts :)
>
Great! Regarding the crashes after undos, check to see if the block is in
a valid formatted state when you get your crash. If it isn't try my trusty
cure-all, a format() on the block..
The regarding this patch, the Abi coding style is to put the "{" on the
next line after the "if" ie.
if(fred> nerk)
{
Cheers!
Martin
This archive was generated by hypermail 2b25 : Sun Jan 21 2001 - 21:04:04 CST