Dev tools hangs with 100% CPU usage after changing DOM
Reported by
mans...@oxplot.com,
Apr 4 2016
|
||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36 Steps to reproduce the problem: 1. Open kill-dev-tools.html in the attachment. 2. Bring up dev tools (ie press F12). 3. In the Elements tab, double click on the content of the <p> element and move the caret to the left of the first character and press Backspace to remove the leading space. 4. Press Enter to make the change. 5. Attempt to interact with the Dev tools. What is the expected behavior? Dev tools should work as normal. What went wrong? Dev tools becomes unresponsive and consumes 100% of one CPU core (see the screenshot attached). Did this work before? N/A Chrome version: 49.0.2623.110 Channel: stable OS Version: Flash Version:
,
Apr 4 2016
Andrey, please take a look.
,
Apr 5 2016
Hmm, failed to reproduce this. Could you please capture a video/screencast?
,
Apr 5 2016
OK, tried again and it's not clear to me what exactly trips it. I captured a screencast. These are the order of the keys just before the freeze: 1. Moved the caret before the first character. 2. Pressed backspace *twice*. 3. Pressed Down, Up, Left. Sometimes just moving around the first few characters does the trick, not necessarily in the order above.
,
Apr 11 2016
Thanks to the video, I managed to repro this. @yosin, could you please take a look? This stucks in an infinite loop inside blink. I've captured to stack traces with gdb: #0 0x00007f53a5a96bbb in blink::InlineBox::nextLeafChild() const () #1 0x00007f53a5779551 in blink::InlineBoxPosition blink::computeInlineBoxPositionTemplate<blink::EditingAlgorithm<blink::NodeTraversal> >(blink::PositionTemplate<blink::EditingAlgorithm<blink::NodeTraversal> > const&, blink::TextAffinity, blink::TextDire ction) () #2 0x00007f53a577e090 in blink::rightPositionOf(blink::VisiblePositionTemplate<blink::EditingAlgorithm<blink::NodeTraversal> > const&) () #3 0x00007f53a576b036 in blink::SelectionEditor::modifyMovingRight(blink::TextGranularity) () #4 0x00007f53a576c10c in blink::SelectionEditor::modify(blink::FrameSelection::EAlteration, blink::SelectionDirection, blink::TextGranularity, blink::EUserTriggered) () #5 0x00007f53a575ded3 in blink::FrameSelection::modify(blink::FrameSelection::EAlteration, blink::SelectionDirection, blink::TextGranularity, blink::EUserTriggered) () #6 0x00007f53a576beb5 in blink::SelectionEditor::modify(blink::FrameSelection::EAlteration, blink::SelectionDirection, blink::TextGranularity, blink::EUserTriggered) () #7 0x00007f53a575ded3 in blink::FrameSelection::modify(blink::FrameSelection::EAlteration, blink::SelectionDirection, blink::TextGranularity, blink::EUserTriggered) () #8 0x00007f53a57956ff in blink::Editor::Command::execute(WTF::String const&, blink::Event*) const () #9 0x00007f53a57957f2 in blink::Editor::executeCommand(WTF::String const&, WTF::String const&) () #10 0x00007f53a51f83f2 in blink::WebLocalFrameImpl::executeCommand(blink::WebString const&, blink::WebString const&, blink::WebNode const&) () #11 0x00007f53a6ea4016 in content::RenderViewImpl::handleCurrentKeyboardEvent() () #12 0x00007f53a51b5577 in blink::EditorClientImpl::handleKeyboardEvent() () #13 0x00007f53a575b538 in blink::Editor::handleKeyboardEvent(blink::KeyboardEvent*) () #14 0x00007f53a54eac5d in blink::EventHandler::defaultKeyboardEventHandler(blink::KeyboardEvent*) () #15 0x00007f53a54ceac9 in blink::EventDispatcher::dispatchEventPostProcess(void*) () #16 0x00007f53a54ce76e in blink::EventDispatcher::dispatch() () #17 0x00007f53a54ce041 in blink::EventDispatcher::dispatchEvent(blink::Node&, blink::EventDispatchMediator*) () #18 0x00007f53a54ea9e1 in blink::EventHandler::keyEvent(blink::PlatformKeyboardEvent const&) () #19 0x00007f53a5215b86 in blink::WebViewImpl::handleKeyEvent(blink::WebKeyboardEvent const&) () #20 0x00007f53a5214dcf in blink::WebViewImpl::handleInputEvent(blink::WebInputEvent const&) () and the next one: #0 0x00007f53a577df69 in blink::rightPositionOf(blink::VisiblePositionTemplate<blink::EditingAlgorithm<blink::NodeTraversal> > const&) () #1 0x00007f53a576b036 in blink::SelectionEditor::modifyMovingRight(blink::TextGranularity) () #2 0x00007f53a576c10c in blink::SelectionEditor::modify(blink::FrameSelection::EAlteration, blink::SelectionDirection, blink::TextGranularity, blink::EUserTriggered) () #3 0x00007f53a575ded3 in blink::FrameSelection::modify(blink::FrameSelection::EAlteration, blink::SelectionDirection, blink::TextGranularity, blink::EUserTriggered) () #4 0x00007f53a576beb5 in blink::SelectionEditor::modify(blink::FrameSelection::EAlteration, blink::SelectionDirection, blink::TextGranularity, blink::EUserTriggered) () #5 0x00007f53a575ded3 in blink::FrameSelection::modify(blink::FrameSelection::EAlteration, blink::SelectionDirection, blink::TextGranularity, blink::EUserTriggered) () #6 0x00007f53a57956ff in blink::Editor::Command::execute(WTF::String const&, blink::Event*) const () #7 0x00007f53a57957f2 in blink::Editor::executeCommand(WTF::String const&, WTF::String const&) () #8 0x00007f53a51f83f2 in blink::WebLocalFrameImpl::executeCommand(blink::WebString const&, blink::WebString const&, blink::WebNode const&) () #9 0x00007f53a6ea4016 in content::RenderViewImpl::handleCurrentKeyboardEvent() () #10 0x00007f53a51b5577 in blink::EditorClientImpl::handleKeyboardEvent() () #11 0x00007f53a575b538 in blink::Editor::handleKeyboardEvent(blink::KeyboardEvent*) () #12 0x00007f53a54eac5d in blink::EventHandler::defaultKeyboardEventHandler(blink::KeyboardEvent*) () #13 0x00007f53a54ceac9 in blink::EventDispatcher::dispatchEventPostProcess(void*) () #14 0x00007f53a54ce76e in blink::EventDispatcher::dispatch() () #15 0x00007f53a54ce041 in blink::EventDispatcher::dispatchEvent(blink::Node&, blink::EventDispatchMediator*) () #16 0x00007f53a54ea9e1 in blink::EventHandler::keyEvent(blink::PlatformKeyboardEvent const&) () #17 0x00007f53a5215b86 in blink::WebViewImpl::handleKeyEvent(blink::WebKeyboardEvent const&) () #18 0x00007f53a5214dcf in blink::WebViewImpl::handleInputEvent(blink::WebInputEvent const&) ()
,
Jul 9 2016
This is still an issue with current stable release and I hit it multiple times a week.
,
Aug 5 2016
Easy repro steps: 1. navigate to the following URL: data:text/html,<p>test test test test test testtest test testtest test testtest test testtest test testtest test testtest test testtest test testtest test testtest test testtest test testtest test testtest test testtest test testtest test testtest test testtest test testtest test testtest test testtest test testtest test testtest test testtest test testtest test testtest test testtest test test</p> 2. open devtools 3. open elements panel, expand "P" tag 4. double-click the text inside "P". The input field should appear with text highlighted 5. press "left" arrow key to move cursor to the beginning of the text.
,
Aug 5 2016
Issue 610175 has been merged into this issue.
,
Aug 5 2016
On #c7 case, I can't move caret to beginning of text by ArrowLeft, caret stops second character. Note: If P contains text fit in one line, it doesn't happen. ArrowRight can cause infinite loop, it stuck on double-quote character.
,
Aug 5 2016
From "kill-dev-tools.html", computeInlineBoxPosition(Position("In dev tool...", 0)) returns inline box position for double quote before "In dev tool...".
Since bidi-level of "In dev tool ..." is 2 and double quote is 0.
,
Aug 5 2016
Bidi level 2 comes from following rule:
text-node { unicode-bidi: -webkit-isolate; }
,
Aug 8 2016
In review: http://crrev.com/2220923002 This patch fixes an issue of computeInlineBox(), but not fix ArrowLeft key issue. Even if this patch, ArrowLeft key doesn't locate caret at start of text of unicode-bidi:isolate.
,
Aug 8 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ec6d070e13bb453972f0c385e090df9e2e5f9478 commit ec6d070e13bb453972f0c385e090df9e2e5f9478 Author: yosin <yosin@chromium.org> Date: Mon Aug 08 10:34:38 2016 Make computeInlineBoxPosition() to handle unicode-bidi:isolate correctly This patch makes |computeInlineBoxPosition()| to handle "unicode-bidi:isolate" correctly for position at start of text by checking text direction and bidi embedding level rather than only checking bidi embedding level. BUG= 600334 TEST=run-webkit-unit-tests --gtest_filter=VisibleUnitsTest.computeInlineBoxPositionBidiIsolate Review-Url: https://codereview.chromium.org/2220923002 Cr-Commit-Position: refs/heads/master@{#410325} [modify] https://crrev.com/ec6d070e13bb453972f0c385e090df9e2e5f9478/third_party/WebKit/Source/core/editing/VisibleUnits.cpp [modify] https://crrev.com/ec6d070e13bb453972f0c385e090df9e2e5f9478/third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp
,
Aug 8 2016
,
Aug 12 2016
Issue 636665 has been merged into this issue.
,
Aug 23 2016
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by mans...@oxplot.com
, Apr 4 2016123 bytes
123 bytes View Download