Closed
Bug 199607
Opened 22 years ago
Closed 22 years ago
crash with smooth scrolling when scrolling horizonally - Trunk M140A [@ nsScrollPortView::IncrementalScroll ]
Categories
(Core :: Web Painting, defect)
Core
Web Painting
Tracking
()
RESOLVED
FIXED
People
(Reporter: adam, Assigned: roc)
References
()
Details
(Keywords: crash, topcrash, Whiteboard: [fix])
Crash Data
Attachments
(1 file)
10.82 KB,
patch
|
dbaron
:
review+
dbaron
:
superreview+
|
Details | Diff | Splinter Review |
When the page <http://dear_raed.blogspot.com/> first loads and I hit the
right-arrow key to scroll horizonally, Mozilla crashes immediately.
This only happens when smooth-scrolling is enabled. This doesn't happen on
most pages. It is totally reproducable on the above page.
The backtrace (sorry, not compiled with debug info) is:
#0 0x40bdccfe in nsScrollPortView::IncrementalScroll() ()
from /marian/cvs/mozilla/dist/bin/components/libgklayout.so
#1 0x40bdcc40 in nsScrollPortView::SmoothScrollAnimationCallback(nsITimer*,
void*) () from /marian/cvs/mozilla/dist/bin/components/libgklayout.so
#2 0x405e26cd in nsTimerImpl::Fire() ()
from /marian/cvs/mozilla/dist/bin/libxpcom.so
#3 0x405e2776 in handleTimerEvent(TimerEventType*) ()
from /marian/cvs/mozilla/dist/bin/libxpcom.so
#4 0x405dd282 in PL_HandleEvent ()
from /marian/cvs/mozilla/dist/bin/libxpcom.so
#5 0x405dd188 in PL_ProcessPendingEvents ()
from /marian/cvs/mozilla/dist/bin/libxpcom.so
#6 0x405de55e in nsEventQueueImpl::ProcessPendingEvents() ()
from /marian/cvs/mozilla/dist/bin/libxpcom.so
#7 0x40d99d75 in event_processor_callback(void*, int, GdkInputCondition) ()
from /marian/cvs/mozilla/dist/bin/components/libwidget_gtk.so
#8 0x40d9990c in our_gdk_io_invoke(_GIOChannel*, GIOCondition, void*) ()
from /marian/cvs/mozilla/dist/bin/components/libwidget_gtk.so
#9 0x4025a129 in g_io_unix_dispatch (source_data=0x82d0e38,
current_time=0xbfffee90, user_data=0x82d0e10) at giounix.c:135
#10 0x4025b8e6 in g_main_dispatch (dispatch_time=0xbfffee90) at gmain.c:656
#11 0x4025bf13 in g_main_iterate (block=1, dispatch=1) at gmain.c:877
#12 0x4025c0cc in g_main_run (loop=0x82d0eb0) at gmain.c:935
#13 0x4017700b in gtk_main () at gtkmain.c:524
#14 0x40d9a13f in nsAppShell::Run() ()
from /marian/cvs/mozilla/dist/bin/components/libwidget_gtk.so
#15 0x40d7ab12 in nsAppShellService::Run() ()
from /marian/cvs/mozilla/dist/bin/components/libnsappshell.so
#16 0x08058aee in main1(int, char**, nsISupports*) ()
#17 0x0805925e in main ()
#18 0x404231f6 in __libc_start_main () from /lib/libc.so.6
This is linux/x86. My Mozilla window dimensions are 1180x937.
Modern theme.
Updated•22 years ago
|
Keywords: crash
Summary: crash with smooth-scrolling when horizonally scrolling → crash with smooth-scrolling when horizonally scrolling [@ nsScrollPortView::IncrementalScroll ]
Comment 2•22 years ago
|
||
also crashing on Win2k build 2003032704 (trunk): TB18552260M.
OS: Linux → All
Hardware: PC → All
Reporter | ||
Comment 3•22 years ago
|
||
Bafflingly, IFF I scroll down (and optionally back up again) before I scroll
right then it doesn't crash (though it IS very slow, and continues to scroll for
ages after I release the right-arrow key).
Assignee | ||
Comment 4•22 years ago
|
||
I've located this bug. Patch coming.
Assignee | ||
Comment 5•22 years ago
|
||
This patch should fix the crashes and hangs people have been seeing.
It also fixes the sometimes long delay between releasing an arrow key and
scrolling actually stopping.
It also switches to a "constant velocity" strategy instead of the "constant
acceleration" strategy we were using. This simplifies the code and may make the
scrolling look smoother.
Assignee | ||
Comment 6•22 years ago
|
||
Comment on attachment 118794 [details] [diff] [review]
fixes
Going to dbaron for r/sr... I don't think anyone really knows this code other
than me (maybe kin, but he's mostly out of commission for now)
Attachment #118794 -
Flags: superreview?(dbaron)
Attachment #118794 -
Flags: review?(dbaron)
Assignee | ||
Comment 7•22 years ago
|
||
The crashes were caused by the nsGfxScrollFrame::AttributeChanged reentrancy
logic not being right, which meant an IncrementalScroll could trigger the start
of a new smoothscroll operation, which was very bad. I've elaborated the
reentrancy logic and documented it.
The hangs were due to the velocity computation being broken in a way which meant
the final loop to tweak the velocity vector was counting down numbers like
1000000000 by 1 until they reached zero. Solution: use much simpler velocity
calculation.
The delay between releasing an arrow key and scrolling finishing was because we
were forcing one immediate IncrementalScroll display update every time a smooth
scroll was initiated (e.g., on every keypress generated by autorepeat). In some
situations keypresses could arrive faster than we could do one
IncrementalScroll, so those events would back up in the input queue. Solution:
don't do the immediate IncrementalScroll, so we'll process all the key events in
the queue before the timer event does the first IncrementalScroll.
Assignee | ||
Updated•22 years ago
|
Whiteboard: [fix]
Reporter | ||
Comment 8•22 years ago
|
||
That seems to fix it fine! I'm don't find the new scroll motion quite as
aesthetically pleasing but it's still better than not-smooth scrolling and all
the better than the old smooth-scrolling code for not crashing. :)
Reporter | ||
Comment 9•22 years ago
|
||
That seems to fix it fine! I don't find the new scroll motion quite as
aesthetically pleasing but it's still better than not-smooth scrolling and all
the better than the old smooth-scrolling code for not crashing. :)
Keywords: topcrash
Comment 10•22 years ago
|
||
expected checkin date?
seeing as this is a topcrash, it would help if this went in asap
- if the patch has been tested and approved, of course.
Reporter | ||
Comment 11•22 years ago
|
||
I'd like to see this in RSN too -- but as you can see, it still needs r/sr.
Assignee | ||
Comment 12•22 years ago
|
||
*** Bug 200214 has been marked as a duplicate of this bug. ***
Updated•22 years ago
|
Summary: crash with smooth-scrolling when horizonally scrolling [@ nsScrollPortView::IncrementalScroll ] → crash with smooth scrolling when scrolling horizonally [@ nsScrollPortView::IncrementalScroll ]
*** Bug 200453 has been marked as a duplicate of this bug. ***
Comment on attachment 118794 [details] [diff] [review]
fixes
r+sr=dbaron (mostly rubber-stamp)
Attachment #118794 -
Flags: superreview?(dbaron)
Attachment #118794 -
Flags: superreview+
Attachment #118794 -
Flags: review?(dbaron)
Attachment #118794 -
Flags: review+
Comment 15•22 years ago
|
||
*** Bug 199107 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 16•22 years ago
|
||
Fix checked in.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 17•22 years ago
|
||
*** Bug 200911 has been marked as a duplicate of this bug. ***
Comment 18•22 years ago
|
||
*** Bug 201058 has been marked as a duplicate of this bug. ***
Comment 19•22 years ago
|
||
Adding M140A to summary for future reference since this is a topcrasher with
Mozilla 1.4 alpha. This crash was fixed on the MozillaTrunk AFTER we released
that milestone...so we should not see this crash with Mozilla 1.4 beta.
Summary: crash with smooth scrolling when scrolling horizonally [@ nsScrollPortView::IncrementalScroll ] → crash with smooth scrolling when scrolling horizonally - Trunk M140A [@ nsScrollPortView::IncrementalScroll ]
Comment 20•22 years ago
|
||
*** Bug 201771 has been marked as a duplicate of this bug. ***
Updated•13 years ago
|
Crash Signature: [@ nsScrollPortView::IncrementalScroll ]
Updated•6 years ago
|
Component: Layout: View Rendering → Layout: Web Painting
You need to log in
before you can comment on or make changes to this bug.
Description
•