If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

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

RESOLVED FIXED

Status

()

Core
Widget: Win32
RESOLVED FIXED
9 years ago
8 years ago

People

(Reporter: jimm, Assigned: jimm)

Tracking

Trunk
x86
Windows Vista
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

9 years ago
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.
(Assignee)

Comment 1

9 years ago
Created attachment 377889 [details] [diff] [review]
wheel scroll delta equals zero patch.v1
Attachment #377889 - Flags: review?(emaijala)

Comment 2

9 years ago
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?
(Assignee)

Comment 3

8 years ago
(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 4

8 years ago
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+
(Assignee)

Comment 5

8 years ago
(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.
(Assignee)

Comment 6

8 years ago
(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.
(Assignee)

Comment 7

8 years ago
http://hg.mozilla.org/mozilla-central/rev/f4d72fac17b4
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED

Comment 8

8 years ago
Bustage fix was http://hg.mozilla.org/mozilla-central/rev/90cb997e9927

Comment 9

8 years ago
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

Comment 10

8 years ago
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.
(Assignee)

Comment 11

8 years ago
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.

Updated

8 years ago
Depends on: 501379

Updated

8 years ago
Blocks: 501379
No longer depends on: 501379
(Assignee)

Comment 12

8 years ago
This patch doesn't appear to be the problem. Filed bug 501390.
(Assignee)

Updated

8 years ago
No longer blocks: 501379
You need to log in before you can comment on or make changes to this bug.