Open Bug 1527685 Opened 5 years ago Updated 2 years ago

[TSF] Hang in Firefox when switching IME if the Firefox instance runs several days

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P3)

67 Branch
x86_64
Windows 10
defect

Tracking

()

UNCONFIRMED

People

(Reporter: henry.fai.hang.chan, Unassigned, NeedInfo)

Details

(Keywords: hang, inputmethod)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0

Steps to reproduce:

Switch to the Microsoft Bopomofo IME (on Windows 10)

Actual results:

Firefox hangs -- it hangs in proportion to the number of days Firefox has been running non-stop

Stack Trace from procexp:

0x0000000000000000
imetip.dll+0x2cb1f
imetip.dll+0x2c72d
IMTCTIP.DLL!DllUnregisterServer+0x22e44
IMTCTIP.DLL!DllUnregisterServer+0x3c6e6
IMTCTIP.DLL!DllUnregisterServer+0xfee0
IMTCTIP.DLL!DllUnregisterServer+0xfc67
IMTCTIP.DLL!DllUnregisterServer+0x38b7
imetip.dll+0x2553f
imetip.dll+0x3003d
imetip.dll+0x2f54b
imetip.dll+0x467c0
imetip.dll+0x15757
imetip.dll+0x15881
imetip.dll+0x1539f
imetip.dll+0x15c49
imetip.dll+0x15ffa
imetip.dll+0x16588
MSCTF.dll!TF_UninitSystem+0x3fae
MSCTF.dll!TF_UninitSystem+0x5c87
MSCTF.dll!TF_CanUninitialize+0xee4a
MSCTF.dll!CtfImeAssociateFocus+0x6e45
MSCTF.dll!TF_CanUninitialize+0x638a
MSCTF.dll!TF_CanUninitialize+0xfbc4
user32.dll!IsThreadMessageQueueAttached+0x4c
ntdll.dll!KiUserCallbackDispatcher+0x24
win32u.dll!NtUserActivateKeyboardLayout+0x14
MSCTF.dll!TF_IsCtfmonRunning+0x19f4d
MSCTF.dll!TF_IsCtfmonRunning+0x1a0ee
MSCTF.dll!TF_IsCtfmonRunning+0x1a25f
MSCTF.dll!TF_Notify+0x1536
MSCTF.dll!TF_Notify+0x57e
user32.dll!SetPropW+0x110
user32.dll!IsProcessDPIAware+0x1b9
user32.dll!IsProcessDPIAware+0x145
ntdll.dll!KiUserCallbackDispatcher+0x24
win32u.dll!NtUserPeekMessage+0x14
user32.dll!PeekMessageW+0x173
user32.dll!PeekMessageW+0x105
MSCTF.dll!TF_IsCtfmonRunning+0x14106
xul.dll!XRE_GetBootstrap+0x21af7a
xul.dll!XRE_GetBootstrap+0x21adbb
xul.dll!XRE_GetBootstrap+0x48104
xul.dll!XRE_GetBootstrap+0x47c39
xul.dll!XRE_GetBootstrap+0x21a9a2
xul.dll!XRE_GetBootstrap+0x22098
xul.dll!XRE_GetBootstrap+0x47831
xul.dll!XRE_GetBootstrap+0x21a858
xul.dll!XRE_GetBootstrap+0x21a103
xul.dll!XRE_GetBootstrap+0x21a0b2
xul.dll!XRE_GetBootstrap+0xa17e4
xul.dll!XRE_GetBootstrap+0x619
xul.dll!XRE_GetBootstrap+0x1e3
firefox.exe!Ordinal0+0x184b
firefox.exe!Ordinal0+0x13c6
firefox.exe!Ordinal0+0x111e
firefox.exe!TargetNtUnmapViewOfSection+0x9ef0
KERNEL32.DLL!BaseThreadInitThunk+0x14
ntdll.dll!RtlUserThreadStart+0x21
Component: Untriaged → Widget: Win32
Keywords: hang, inputmethod
OS: Unspecified → Windows 10
Product: Firefox → Core
Hardware: Unspecified → x86_64
Priority: -- → P3

I have similar problem but between English (US) (US Keyboard) and Japanese (Microsoft IME). After few days it takes more than 5 seconds to switch to Japanese (not measured but long enough to be noticeable). AFAICT it doesn't happen when switching to English (i.e. EN ➡ JP hangs but JP ➡ EN doesn't).

Restarting Firefox "fixes" it but obviously not ideal. Happens on various Windows systems but only Firefox.

Browser: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:67.0) Gecko/20100101 Firefox/67.0
(also earlier versions)

OS: Windows 7, Windows 8.1

Moving all open keyboard/IME handling bugs to DOM: UI Events & Focus Handling component.

Component: Widget: Win32 → DOM: UI Events & Focus Handling

We need profile at hanging up.

See the following document how to get profile:
https://developer.mozilla.org/docs/Mozilla/Performance/Profiling_with_the_Built-in_Profiler

Summary: Hang in Firefox when using Microsoft Bopomofo IME → [TSF] Hang in Firefox when using Microsoft Bopomofo IME
Summary: [TSF] Hang in Firefox when using Microsoft Bopomofo IME → [TSF] Hang in Firefox when switching IME if the Firefox instance runs several days

My Firefox crashed at the ctrl-shift-2 step 😃

My Firefox crashed at the ctrl-shift-2 step 😃

I think this is the related crash report https://crash-stats.mozilla.org/report/index/efbf8e53-2cfa-4c72-8a6e-50da90200323

Can no longer reproduce under winver 1903 (build 18362.778).

I have uploaded a profile of me encountering the same problem on Firefox 68.10.0esr. I turned on Profiler, then quickly switched my IME from English input to Japanese input; Firefox immediately hanged for a long time.

https://share.firefox.dev/3hrDEUI

Blizihguh,
Can you still reproduce this?

Flags: needinfo?(blizihguh)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.