Closed Bug 493037 Opened 15 years ago Closed 15 years ago

"aNumLines must be non-zero" assertion hit on mouse wheel input

Categories

(Core :: Widget: Win32, defect)

x86
Windows Vista
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jimm, Assigned: jimm)

Details

Attachments

(1 file)

The conditional assertion is in event state manager's CanScrollOn function -

http://mxr.mozilla.org/mozilla-central/source/content/events/src/nsEventStateManager.cpp#477

We either need to filter out zero delta mouse scroll events being sent from nsWindow, or remove this conditional assert. It's fairly common thing you get when debugging builds so it's kind of annoying.
Attachment #377889 - Flags: review?(emaijala)
Comment on attachment 377889 [details] [diff] [review]
wheel scroll delta equals zero patch.v1

Are you sure ignoring it is the corect thing to do? When do you get the assertion? I mean, are we calculating the delta properly or could there be something wrong?
(In reply to comment #2)
> (From update of attachment 377889 [details] [diff] [review])
> Are you sure ignoring it is the corect thing to do? When do you get the
> assertion? I mean, are we calculating the delta properly or could there be
> something wrong?

Yes, because we cache the change in a static. This happens whenever our cached value doesn't measure up enough to warrent a scroll event.

http://mxr.mozilla.org/mozilla-central/source/widget/src/windows/nsWindow.cpp#5120
Comment on attachment 377889 [details] [diff] [review]
wheel scroll delta equals zero patch.v1

Got it, finally :) By the way, should we also reset the cached delta if the scroll direction changes? Currently we'd need to collect scroll events to counter any old surplus to the previous direction.
Attachment #377889 - Flags: review?(emaijala) → review+
(In reply to comment #4)
> (From update of attachment 377889 [details] [diff] [review])
> Got it, finally :) By the way, should we also reset the cached delta if the
> scroll direction changes? Currently we'd need to collect scroll events to
> counter any old surplus to the previous direction.

Let me add that and test to see how it feels. I'll post a new patch if it works out.
(In reply to comment #5)
> (In reply to comment #4)
> > (From update of attachment 377889 [details] [diff] [review] [details])
> > Got it, finally :) By the way, should we also reset the cached delta if the
> > scroll direction changes? Currently we'd need to collect scroll events to
> > counter any old surplus to the previous direction.
> 
> Let me add that and test to see how it feels. I'll post a new patch if it works
> out.

That actually didn't have the effect I was expecting - it causes the center scroll point to wander when you repeatedly scroll around a central position. (Due to the loss of scroll data.) So I think we should stick with the original patch.
http://hg.mozilla.org/mozilla-central/rev/f4d72fac17b4
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Could this have caused wheel scrolling to scroll more page per scroll (not sure that is the best way to describe the issue)?  If so, it's certainly annoying.

~B
I have the same problems, it's scrolling more than it used to, is this by design?
The page zooming with CTRL appears to be accentuated too, it zooms in or out by very large amounts.
It shouldn't as delta is zero.

This landed on top of bug 487245 though so there might be some bad interaction going on between the two, I'll take a look.
Depends on: 501379
Blocks: 501379
No longer depends on: 501379
This patch doesn't appear to be the problem. Filed bug 501390.
No longer blocks: 501379
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: