Late 2016 MBP with Touch Bar logs messages from IMKInputSession when focusing text fields

NEW
Unassigned

Status

()

Core
Widget: Cocoa
P1
normal
a year ago
a month ago

People

(Reporter: jryans, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: tpi:-)

I recently switched to a Late 2016 MacBook Pro with the Touch Bar.

When running Firefox from the terminal, I see many logs like the following:

2017-01-30 15:28:43.564 firefox[37614:3719041] IMKInputSession presentFunctionRowItemTextInputViewWithEndpoint:completionHandler: : *NO* NSRemoteViewController to client, NSError=Error Domain=NSCocoaErrorDomain Code=4097 "connection from pid 0" UserInfo={NSDebugDescription=connection from pid 0}, com.apple.inputmethod.EmojiFunctionRowItem

It seems one message is logged each time an input field is focused.
Looks like that other applications which handle keyboard events by themselves are also reported this bug, e.g., mvim, atom, etc. However, no threads in their communities have found the cause.

Updated

11 months ago
Flags: needinfo?(spohl.mozilla.bugs)

Comment 2

10 months ago
This appears to originate from IMKInputSession, which is part of HIToolbox. I was able to confirm what Masayuki said in comment 1 that many other applications report the same log messages with no solutions available at the moment. Some users have reported difficulty switching between applications, but this does not seem to be the case with Firefox. I've been able to reproduce these log messages locally with no obvious ill-effects besides the log messages.

Unless we hear reports of actual usability issues with Firefox I'm tempted to just wait for a fix from Apple.
Flags: needinfo?(spohl.mozilla.bugs)
Whiteboard: tpi:-
8 months later, this is still very noisy, and makes it hard to see other messages in the terminal when running a local Firefox or Thunderbird build. Is there anything that can be done to silence this?
Flags: needinfo?(spohl.mozilla.bugs)
Not that I'm aware of.
Flags: needinfo?(spohl.mozilla.bugs)
Priority: -- → P3
Blocks: 1425027
While looking into bug 1425027 I realized that these log messages were printed when the OS calls out to EmojiFunctionRowIM_Extension. By attaching to the EmojiFunctionRowIM_Extension process and breaking on Obj-C exceptions, the following exception was caught:

Exception: decodeObjectForKey: class "TitlebarAndBackgroundColor" not loaded or does not exist

TitlebarAndBackgroundColor is a subclass of NSColor that we use to draw separate colors in the titlebar and window background[1]. The fact that the exception is thrown in decodeObjectForKey indicates that the OS is encoding/decoding the NSWindow object[2]. This despite the fact that Apple's docs clearly state that NSWindow does not support coding[3].

I have not been able to come up with a solution so far. I did notice a project on github[4] that draws the window titlebar inside NSView's drawRect: method instead of tapping into NSColor's set: and setFill: methods. Markus, would this be a path worth exploring?

[1] https://dxr.mozilla.org/mozilla-central/source/widget/cocoa/nsCocoaWindow.h#164-166
[2] https://dxr.mozilla.org/mozilla-central/source/widget/cocoa/nsCocoaWindow.h#175-178
[3] https://developer.apple.com/documentation/appkit/nswindow?language=objc
[4] https://github.com/insidegui/FOTWindow
Flags: needinfo?(mstange)
Priority: P3 → P1
On 10.10 and above, we can use a titlebar accessory view to draw the titlebar gradient. I don't know of a solution for 10.9.
Flags: needinfo?(mstange)
You need to log in before you can comment on or make changes to this bug.