New issue
Advanced search Search tips

Issue 891091 link

Starred by 2 users

Issue metadata

Status: Available
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

DCHECK in TextAutosizer::EndLayout

Project Member Reported by sky@chromium.org, Oct 1

Issue description

This happens with a chromeos build of chrome. To do that add:
target_os = "chromeos"

to your args.gn and rebuild (assuming you're on linux).

Then run with --ash-dev-shortcuts --ash-debug-shortcuts and do the following:

1. control-shift-alt-t
2. navigate to bing.com (probably works with any site, but I used something with not much)

[1:1:1001/153935.537803:FATAL:text_autosizer.cc(393)] Check failed: ShouldHandleLayout().
#0 0x7fdeaca41fcd base::debug::StackTrace::StackTrace()
#1 0x7fdeac75808a base::debug::StackTrace::StackTrace()
#2 0x7fdeac7c22ae logging::LogMessage::~LogMessage()
#3 0x7fde8960f0e8 blink::TextAutosizer::EndLayout()
#4 0x7fde89612758 blink::TextAutosizer::LayoutScope::~LayoutScope()
#5 0x7fde893963c3 blink::LayoutBlockFlow::UpdateBlockLayout()
#6 0x7fde894f6109 blink::LayoutView::UpdateBlockLayout()
#7 0x7fde8937ed0d blink::LayoutBlock::UpdateLayout()
#8 0x7fde894f6930 blink::LayoutView::UpdateLayout()
#9 0x7fde88dfaf9e blink::LocalFrameView::PerformLayout()
#10 0x7fde88df89d0 blink::LocalFrameView::UpdateLayout()
#11 0x7fde88922626 blink::Document::UpdateStyleAndLayout()
#12 0x7fde889223e6 blink::Document::UpdateStyleAndLayoutIgnorePendingStylesheets()
#13 0x7fde88dc1d1b blink::LocalDOMWindow::scrollX()
#14 0x7fde89fef345 blink::LocalDOMWindow::pageXOffset()
#15 0x7fde89fb437b blink::DOMWindowV8Internal::pageXOffsetAttributeGetter()
#16 0x7fde89fb430a blink::V8Window::pageXOffsetAttributeGetterCallback()
#17 0x7fde8bac74dd v8::internal::FunctionCallbackArguments::Call()
#18 0x7fde8bac5cc3 v8::internal::(anonymous namespace)::HandleApiCallHelper<>()
#19 0x7fde8bac4bbb v8::internal::Builtins::InvokeApiFunction()
#20 0x7fde8c0cac24 v8::internal::Object::GetPropertyWithAccessor()
#21 0x7fde8c0c9bae v8::internal::Object::GetProperty()
#22 0x7fde8bfb181a v8::internal::LoadIC::Load()
#23 0x7fde8bfc0217 v8::internal::__RT_impl_Runtime_LoadIC_Miss()
#24 0x7fde8b7e7bd5 <unknown>
 
Received signal 6
#0 0x7fdeaca41fcd base::debug::StackTrace::StackTrace()
#1 0x7fdeac75808a base::debug::StackTrace::StackTrace()
#2 0x7fdeaca41a4f base::debug::(anonymous namespace)::StackDumpSignalHandler()
#3 0x7fde804f30c0 <unknown>
#4 0x7fde7ec28fcf gsignal
#5 0x7fde7ec2a3fa abort
#6 0x7fdeaca412b6 base::debug::(anonymous namespace)::DebugBreak()
#7 0x7fdeaca41298 base::debug::BreakDebugger()
#8 0x7fdeac7c3040 logging::LogMessage::~LogMessage()
#9 0x7fde8960f0e8 blink::TextAutosizer::EndLayout()
#10 0x7fde89612758 blink::TextAutosizer::LayoutScope::~LayoutScope()
#11 0x7fde893963c3 blink::LayoutBlockFlow::UpdateBlockLayout()
#12 0x7fde894f6109 blink::LayoutView::UpdateBlockLayout()
#13 0x7fde8937ed0d blink::LayoutBlock::UpdateLayout()
#14 0x7fde894f6930 blink::LayoutView::UpdateLayout()
#15 0x7fde88dfaf9e blink::LocalFrameView::PerformLayout()
#16 0x7fde88df89d0 blink::LocalFrameView::UpdateLayout()
#17 0x7fde88922626 blink::Document::UpdateStyleAndLayout()
#18 0x7fde889223e6 blink::Document::UpdateStyleAndLayoutIgnorePendingStylesheets()
#19 0x7fde88dc1d1b blink::LocalDOMWindow::scrollX()
#20 0x7fde89fef345 blink::LocalDOMWindow::pageXOffset()
#21 0x7fde89fb437b blink::DOMWindowV8Internal::pageXOffsetAttributeGetter()
#22 0x7fde89fb430a blink::V8Window::pageXOffsetAttributeGetterCallback()
#23 0x7fde8bac74dd v8::internal::FunctionCallbackArguments::Call()
#24 0x7fde8bac5cc3 v8::internal::(anonymous namespace)::HandleApiCallHelper<>()
#25 0x7fde8bac4bbb v8::internal::Builtins::InvokeApiFunction()
#26 0x7fde8c0cac24 v8::internal::Object::GetPropertyWithAccessor()
#27 0x7fde8c0c9bae v8::internal::Object::GetProperty()
#28 0x7fde8bfb181a v8::internal::LoadIC::Load()
#29 0x7fde8bfc0217 v8::internal::__RT_impl_Runtime_LoadIC_Miss()
#30 0x7fde8b7e7bd5 <unknown>
  r8: 0000000000000000  r9: 00007ffcb788dcf0 r10: 0000000000000008 r11: 0000000000000246
 r12: 00007fde89fb42f0 r13: 000014d16bca7020 r14: 00007ffcb7890d00 r15: 00007ffcb7890d58
  di: 0000000000000002  si: 00007ffcb788dcf0  bp: 00007ffcb788df30  bx: 0000000000000006
  dx: 0000000000000000  ax: 0000000000000000  cx: 00007fde7ec28fcf  sp: 00007ffcb788dd68
  ip: 00007fde7ec28fcf efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000
 trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]

It looks like this DCHECK was added here: https://chromium.googlesource.com/chromium/src/+/24d20376d0f92d648943eda5aca0cfd33c030b0a by pdr@. Maybe pdr@ knows what might be going wrong?
 
Components: -Blink>Layout Blink>TextAutosize
Status: Available (was: Untriaged)
Cc: bokan@chromium.org pdr@chromium.org
 Issue 896469  has been merged into this issue.
Components: UI>Shell>TabletMode
The DCHECK passes if in LayoutBlockFlow::UpdateBlockLayout(bool relayout_children) I add { before the text_autosizer_layout_scope declaration and } after the ComputeLayoutOverflow call. I am a new employee and I do not claim to be an expert on this code, but I strongly suspect that these curly brackets are the right fix, judging by comparison with each of the following source files:

src/third_party/blink/renderer/core/layout/custom/layout_custom.cc
src/third_party/blink/renderer/core/layout/layout_block.cc
src/third_party/blink/renderer/core/layout/layout_deprecated_flexible_box.cc
src/third_party/blink/renderer/core/layout/layout_flexible_box.cc
src/third_party/blink/renderer/core/layout/layout_grid.cc

In regards to writing a unit test, I have no comment.
Cc: mstensho@chromium.org
Owner: ----
For others, Avery put up a patch to fix this in layout_block_flow.cc. The patch ended up not landing but it may be useful if someone wants to pick this up:
https://chromium-review.googlesource.com/c/chromium/src/+/1395148
Owner: sky@chromium.org
Sky, do you just visit bing.com and it crashes?

I built chromeos and followed the repro steps but this did not crash. I think it's likely this is still reproducible but may depend on screen size. This was reported by one other person in chromeos tablet mode but has not been hit on android, maybe because folks don't run debug builds on android.

I'm guessing ctrl+shift+alt+t is enabling tablet mode which enables the text autosizer, which explains why this doesn't occur on linux. The text autosizer can be enabled on desktop by using mobile emulation mode in devtools. I wasn't able to reproduce this in mobile emulation mode either. The text autosizer is on by default on android so this likely affects android too.

Sign in to add a comment