Bug 145142 - Crash in WebCore::RenderLayer::updateScrollbarsAfterLayout
Summary: Crash in WebCore::RenderLayer::updateScrollbarsAfterLayout
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-18 14:26 PDT by Beth Dakin
Modified: 2015-05-19 10:27 PDT (History)
7 users (show)

See Also:


Attachments
Speculative fix (2.62 KB, patch)
2015-05-18 14:32 PDT, Beth Dakin
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Beth Dakin 2015-05-18 14:26:51 PDT
I have not been able to reproduce this crash, but according to symbolication m_vBar is null. It seems like this crash was probably caused by http://trac.webkit.org/changeset/173668 which made it so that overflow:scroll behaves like overflow:auto when the scrollbars are overlay. I can see how you could encounter this crash with that change if the layout caused styleRequiresScrollbar() to return true when it used to return false. Then this code, by failing to nil-check the scrollbars assumes that there is already a scrollbar, because it assumes that styleRequiresScrollbar() could not have changed based on a layout. But it could change if the css changed the scrollbars to be custom or if the user managed switch to legacy style scrollbars at just the wrong time. Or I suppose it could also happen if the user has legacy scrollbars and the style switched from auto to scroll during the layout.

Anyway, we should null check the scrollbars.


>  1 com.apple.WebCore              0x7fff93692574 WebCore::RenderLayer::updateScrollbarsAfterLayout() + 0x204
   2 com.apple.WebCore              0x7fff93691d34 WebCore::RenderLayer::updateScrollInfoAfterLayout() + 0x154
   3 com.apple.WebCore              0x7fff9410a6bd WebCore::RenderBlock::endAndCommitUpdateScrollInfoAfterLayoutTransaction() + 0x23d
   4 com.apple.WebCore              0x7fff93725c7f WebCore::RenderFlexibleBox::layoutBlock(bool, WebCore::LayoutUnit) + 0x38f
   5 com.apple.WebCore              0x7fff935dbaf3 WebCore::RenderBlock::layout() + 0x83
…
Comment 1 Beth Dakin 2015-05-18 14:32:43 PDT
Created attachment 253343 [details]
Speculative fix
Comment 2 Beth Dakin 2015-05-19 10:27:30 PDT
Thanks Simon! http://trac.webkit.org/changeset/184576