Troubleshooting the scroll bug

From: Ryan Pavlik <abiryan_at_ryand.net>
Date: Wed May 21 2008 - 20:08:16 CEST

I'm working on the ubuntu scroll bug [1]. I've breakpointed
gr_UnixPangoGraphics::scroll() which gets called on that scroll wheel
event, and stepped through. Everything looks sane until these lines:

UT_sint32 iddy = labs(ddy);
bool bEnableSmooth = XAP_App::getApp()->isSmoothScrollingEnabled();
bEnableSmooth = bEnableSmooth && (iddy < 30) && (ddx == 0);

By the time execution completes on that last line (can't tell exactly
where, not quite used to the nemiver interface yet), ddy has turned from
-59 (which seemed to follow logically from the code) to 0. This is
rather confusing to me because I don't see where ddy is being modified
here. Note that iddy has the correct value, 59, but in a large scroll
like I did (which seems to be the only time when the problem shows up),
we skip the smooth scroll code and just do a simple scroll using the ddy
value directly instead of both ddy and iddy.

If someone sees something I'm missing in this execution, please let me
know - I am some degree of confident that this must cause the problem
(since the behavior basically matches what I'm seeing here - large/fast
scrolls don't work) but am not sure how to proceed. (It doesn't explain
why it looks like the document jumps forward then back, though, but it
does seem like I've either found code I don't understand or a bug of
some sort.) If someone who doesn't see this bug (fedora users?) could
try out this same test (breakpoint and stepping) to tell me if they get
the same behavior, that would be great.

Thanks!

Ryan

[1] http://bugzilla.abisource.com/show_bug.cgi?id=11539
[2]
http://abisource.com/viewvc/abiword/trunk/src/af/gr/gtk/gr_UnixPangoGraphics.cpp?view=markup

-- 
Ryan Pavlik
www.cleardefinition.com
#282  +  (442) -  [X]
A programmer started to cuss
Because getting to sleep was a fuss
As he lay there in bed
Looping 'round in his head
was: while(!asleep()) sheep++;
Received on Wed May 21 20:14:23 2008

This archive was generated by hypermail 2.1.8 : Wed May 21 2008 - 20:14:23 CEST