Bugs in 0.7.9


Subject: Bugs in 0.7.9
From: Mike Nordell (tamlin@algonet.se)
Date: Thu May 04 2000 - 21:53:54 CDT


As a new user taking a look at AbiWord, I managed to get a project up and
running (Win32/VC6). Almost instantly I got trouble. :-)

There are lots of calls to mapXYToPosition, e.g. from
FV_View::isLeftMargin and FV_View::_moveInsPtNextPrevLine.
In those methods 'bEOL' and 'bBOL' aren't initialized, which I suppose
iscorrect, but I've found many occations where it's possible they will
never be initialized by the calls to mapXYToPosition, and specifically
I've run into at least one of'em. This is rather bad since at least the
bEOL argument to FV_View::_setPoint when called from
FV_View::_moveInsPtNextPrevLine contains an illegal value (intentionally
initialized to illegal value by the compilers debug-mode code generator).

I liberally inserted the following two asserts in a bunch of locations
  UT_ASSERT(bEOL == UT_TRUE || bEOL == UT_FALSE);
  UT_ASSERT(bBOL == UT_TRUE || bBOL == UT_FALSE);

and they trigger all the time at different places.

Being new to the code I'm not confident my understanding is correct, but
I give it a try.

As I understand it 'bEOL' is supposed to be set when when the insert
position is at the end of the line. If so, there's another problem. It
seems there's (almost?) always an extra run at the end of the line that
in fp_TextRun::mapXYToPosition checks 'if (x <= 0)'. Since 'x' is
run-relative, and that run seems to be placed exactly at the insert
position, it always responds "not at EOL".

Comments/ideas welcome.

BTW, I gave AbiWord a go under Purify. Whoa! Seems like a fwe member
variables aren't initialized before they're used. I'll see what I can do
about it in the near future.



This archive was generated by hypermail 2b25 : Thu May 04 2000 - 20:59:02 CDT