New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 618739 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Chrome
Pri: 1
Type: Bug



Sign in to add a comment

"Not implemented reached in static bool blink::PlatformKeyboardEvent::currentCapsLockState()"

Project Member Reported by rbyers@chromium.org, Jun 9 2016

Issue description

Version: 53.0.2756.0
OS: Linux

What steps will reproduce the problem?
Run chrome from the command line and use it for awhile

What is the expected output?
No ERRORS in the output

What do you see instead?
[1:1:0609/105005:ERROR:PlatformKeyboardEvent.cpp(84)] Not implemented reached in static bool blink::PlatformKeyboardEvent::currentCapsLockState()
[1:1:0609/105017:ERROR:PlatformKeyboardEvent.cpp(84)] Not implemented reached in static bool blink::PlatformKeyboardEvent::currentCapsLockState()
[1:1:0609/105049:ERROR:PlatformKeyboardEvent.cpp(84)] Not implemented reached in static bool blink::PlatformKeyboardEvent::currentCapsLockState()
[1:1:0609/105121:ERROR:PlatformKeyboardEvent.cpp(84)] Not implemented reached in static bool blink::PlatformKeyboardEvent::currentCapsLockState()
[1:1:0609/105129:ERROR:PlatformKeyboardEvent.cpp(84)] Not implemented reached in static bool blink::PlatformKeyboardEvent::currentCapsLockState()
[1:1:0609/105129:ERROR:PlatformKeyboardEvent.cpp(84)] Not implemented reached in static bool blink::PlatformKeyboardEvent::currentCapsLockState()

Please use labels and text to provide additional information.

 
Owner: dtapu...@chromium.org
Status: Assigned (was: Untriaged)
Cc: wkorman@chromium.org abodenha@chromium.org
Labels: OS-Chrome
This is similar to issue 538289.

This also shows up in the Chrome OS (8743.44.0 / 54.0.2840.43) in /var/log/chrome/chrome, but I only see it once, during the sign-in screen:

[22074:22074:1007/003356:VERBOSE1:signin_screen_handler.cc(1243)] Login WebUI >> loginVisible, src: oobe, webui_visible_: 0
[22074:22074:1007/003356:VERBOSE1:login_display_host_impl.cc(819)] Login WebUI >> WEBUI_VISIBLE
[22074:22074:1007/003356:VERBOSE1:webui_login_view.cc(514)] Login WebUI >> not emitting signal, hidden: 0
[22074:22074:1007/003356:WARNING:remote_commands_invalidator.cc(125)] RemoteCommandsInvalidator ReloadPolicyData.
[1:1:1007/003356:ERROR:PlatformKeyboardEvent.cpp(93)] Not implemented reached in static bool blink::PlatformKeyboardEvent::currentCapsLockState()
[22074:22074:1007/003356:INFO:signin_screen_handler.cc(1198)] Login WebUI >> AccountPickerReady

This is the code:

bool PlatformKeyboardEvent::currentCapsLockState()
{
    switch (s_overrideCapsLockState) {
    case OverrideCapsLockState::Default:
#if OS(WIN)
            // FIXME: Does this even work inside the sandbox?
            return GetKeyState(VK_CAPITAL) & 1;
#elif OS(MACOSX)
            return GetCurrentKeyModifiers() & alphaLock;
#else
            notImplemented();
            return false;
#endif
    case OverrideCapsLockState::On:
        return true;
    case OverrideCapsLockState::Off:
    default:
        return false;
    }
}


Seems like there should be some way to get the current Caps Lock state on Chrome OS, considering I can toggle it with Alt+Search.
I upgraded to chromium 56.0.2924.76 (gentoo linux). Now, I am getting this error each time I visit google's gmail web site (https://mail.google.com/mail/...). The page displays "Aw, Snap! Something went wrong when displaying this web site. ". (Hangouts crashes, too.) If I start Chromium from the command line, I see:

4656:4656:0128/113453.884785:ERROR:browser_main_loop.cc(250)] GTK theme error: Unable to locate theme engine in module_path: "adwaita",
[4656:4656:0128/113453.888047:ERROR:browser_main_loop.cc(250)] GTK theme error: Unable to locate theme engine in module_path: "adwaita",
[4698:4698:0128/113454.218592:ERROR:sandbox_linux.cc(343)] InitializeSandbox() called with multiple threads in process gpu-process. 
[1:1:0128/113514.911489:ERROR:KeyboardEventManager.cpp(424)] Not implemented reached in static bool blink::KeyboardEventManager::currentCapsLockState()
Received signal 11 SEGV_MAPERR 000000000000
#0 0x55f5fe96bd0e <unknown>
#1 0x55f5fe96c0cb <unknown>
#2 0x7ff2f8419eb0 <unknown>
#3 0x55f60232760e <unknown>
#4 0x55f5fe1aba7c <unknown>
#5 0x55f5fe9c5b5c <unknown>
#6 0x55f5fe9f3ece <unknown>
#7 0x55f5fe98bf08 <unknown>
#8 0x55f5fe98dc0d <unknown>
#9 0x55f5fe98eb05 <unknown>
#10 0x55f5fe98edf9 <unknown>
#11 0x55f5fe98ade2 <unknown>
#12 0x55f5fe9ac58a <unknown>
#13 0x55f5fe9c9ac7 <unknown>
#14 0x55f5fe9c5a02 <unknown>
#15 0x7ff2f8410444 start_thread
#16 0x7ff2efb6f5ed clone
  r8: 0000000000000000  r9: 00000c94d1000580 r10: fffff3698161db62 r11: fffffffd50501762
 r12: 0000000000000000 r13: 0000000000000000 r14: 00000c94d13df8c0 r15: 00000c94d105ca00
  di: 00000c94d1039400  si: 00000c94d1000580  bp: 00000c94d131fc00  bx: 0000000000000000
  dx: 0000000000000001  ax: 0000000000000000  cx: 0000000000000002  sp: 00007ff2e31173b0
  ip: 000055f60232760e efl: 0000000000010246 cgf: 0000000000000033 erf: 0000000000000004
 trp: 000000000000000e msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]
[4656:4656:0128/113556.241540:ERROR:navigation_entry_screenshot_manager.cc(141)] Invalid entry with unique id: 22

The log message has nothing to do with the crash.

Is this chrome or chromium? If it's chromium you'll need to get the debug symbols for your build for a symbolized stack trace. If it is chrome provide the server crash Id and we can check.
Cc: jdufault@chromium.org
 Issue 700961  has been merged into this issue.
Labels: -Pri-3 Pri-1
I'm raising the priority on this because ERROR messages in released code under normal circumstances are confusing and make it more difficult to track down the actual cause.

It occurs under normal circumstances on my Pixel 2.

I'll see if I can generate a call stack.

There is only one piece of code calling this;

https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/layout/LayoutTextControlSingleLine.cpp?l=205

I don't believe any themes implement the caps lock indicator on password fields anymore do they? So really all this code is dead.. Why would this be considered a P1?
I did some work here a couple of years ago specifically for showing caps lock icon in Mac password fields. I think that was the only use at that time. If it's gone then we don't need this, but AFAIK it's probably still around?

It was this change: https://codereview.chromium.org/1177043016

which included a test fast/text/caps-lock-indicator-enabled.html which is still around.

https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/fast/text/caps-lock-indicator-enabled.html?type=cs&q=fast/text/caps-lock-indicator-enabled.html&sq=package:chromium&l=1

Someone modified the internals subsequent to my change to add this logging. Potentially we should just change the log level but I have not looked closely. It may be ok if a platform doesn't implement currentCapsLockState.
Cc: chrishtr@chromium.org
This looks only implemented for the Mac Platform and I thought that this isn't being done anymore because of slimming paint..

See the early return here:

https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/layout/LayoutTextControlSingleLine.cpp?type=cs&q=paintCapsLockIndicator+package:%5Echromium$&l=75

Can someone try Mac and perhaps all of this could just be removed.
Owner: wkorman@chromium.org
That early return just avoid painting more than once, it does not bail out entirely. I can look at this if you'd like.
Here is the Chrome OS callstack. This occurs during our Login page rendering (which is Web UI).

[1:1:0313/194103.884977:FATAL:KeyboardEventManager.cpp(440)] NOTIMPLEMENTED()
#0 0x7fb928db65cb base::debug::StackTrace::StackTrace()
#1 0x7fb928db4c9c base::debug::StackTrace::StackTrace()
#2 0x7fb928e1b5ec logging::LogMessage::~LogMessage()
#3 0x7fb90eab8778 blink::KeyboardEventManager::currentCapsLockState()
#4 0x7fb90eda31eb blink::LayoutTextControlSingleLine::capsLockStateMayHaveChanged()
#5 0x7fb90e998eae blink::TextFieldInputType::forwardEvent()
#6 0x7fb90e8aafc6 blink::HTMLInputElement::defaultEventHandler()
#7 0x7fb90e6e3f7a blink::EventDispatcher::dispatchEventPostProcess()
#8 0x7fb90e6e2dce blink::EventDispatcher::dispatch()
#9 0x7fb90e6e1f80 blink::EventDispatchMediator::dispatchEvent()
#10 0x7fb90e7002ba blink::FocusEventDispatchMediator::dispatchEvent()
#11 0x7fb90e6e22e1 blink::EventDispatcher::dispatchEvent()
#12 0x7fb90e4a3634 blink::Node::dispatchEventInternal()
#13 0x7fb90e6fca5c blink::EventTarget::dispatchEvent()
#14 0x7fb90e4207af blink::Element::dispatchFocusEvent()
#15 0x7fb90e87a9f1 blink::HTMLFormControlElement::dispatchFocusEvent()
#16 0x7fb90e93df12 blink::TextControlElement::dispatchFocusEvent()
#17 0x7fb90e3b1327 blink::Document::setFocusedElement()
#18 0x7fb90ef81f8a blink::FocusController::setFocusedElement()
#19 0x7fb90e41ff10 blink::Element::focus()
#20 0x7fb90f51d837 blink::HTMLElementV8Internal::focusMethod()
#21 0x7fb90f51d7b5 blink::V8HTMLElement::focusMethodCallback()
#22 0x7fb917a0faa8 v8::internal::FunctionCallbackArguments::Call()
#23 0x7fb917aef101 v8::internal::(anonymous namespace)::HandleApiCallHelper<>()
#24 0x7fb917aedaa7 v8::internal::Builtin_Impl_HandleApiCall()
#25 0x2b1cb2c84204 <unknown>

KeyboardEventManager::currentCapsLockState is still used for Mac password fields, see fast/text/caps-lock-indicator-enabled.html and Mac expectation image:

https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/platform/mac/fast/text/caps-lock-indicator-enabled-expected.png?q=caps-lock-indicator-enabled&dr

Images for other platforms including Windows do not show the icon as it's Mac theme painting logic specific.

Am considering whether we should just remove the NOTIMPLEMENTED() call in KeyboardEventManager::currentCapsLockState(). We know this is only used for the Mac password caps lock icon case. Logging a stack trace isn't useful. Adding debug logging instead would just produce debug log spam on non-Win/Mac platforms. I'll send a change to do this.
Adding verbose comment here as part of code review feedback on http://crrev.com/2748993004.

      // Note that the caps lock state provided by this method is only                                                                                                                          
      // used to paint a caps lock icon for Mac password input fields.                                                                                                                          
      // We may as well just return false if we end up here. Calling                                                                                                                            
      // NOTIMPLEMENTED() just produces a verbose debug stack trace                                                                                                                             
      // whenever an event is forwarded to a                                                                                                                                                    
      // LayoutTextControlSingleLine on platforms lacking an                                                                                                                                    
      // implementation, such as CrOS, which isn't helpful as we have                                                                                                                           
      // no current plans or need to use this.

Project Member

Comment 14 by bugdroid1@chromium.org, Mar 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7599eb3eee0daef81cef0bdf79294849b5d52e6d

commit 7599eb3eee0daef81cef0bdf79294849b5d52e6d
Author: wkorman <wkorman@chromium.org>
Date: Wed Mar 15 09:51:42 2017

Don't call NOTIMPLEMENTED for caps lock state on non-Mac/Win platforms.

BUG= 618739 

Review-Url: https://codereview.chromium.org/2748993004
Cr-Commit-Position: refs/heads/master@{#457043}

[modify] https://crrev.com/7599eb3eee0daef81cef0bdf79294849b5d52e6d/third_party/WebKit/Source/core/input/KeyboardEventManager.cpp

Status: Fixed (was: Assigned)

Sign in to add a comment