Due to a regression in 3b6185f4fdf408bc9e630a1951a8938aba730111, you might have seen an error dialog when you first enable Mozc while mozc_server is not running in Windows.
Steps to reproduce
Build Mozc for Windows
.\out_win\Release\Mozc64.msi
notepad.exe
Select Mozc as the current IME.
Tries to enable Mozc
Expected behavior
No error dialog is shown after the step 5.
Actual behavior
After the step 5, you may see the following error dialog.
Version or commit-id
3b6185f4fdf408bc9e630a1951a8938aba730111 and any later version
Description
Due to a regression in 3b6185f4fdf408bc9e630a1951a8938aba730111, you might have seen an error dialog when you first enable Mozc while
mozc_server
is not running in Windows.Steps to reproduce
.\out_win\Release\Mozc64.msi
notepad.exe
Expected behavior
No error dialog is shown after the step 5.
Actual behavior
After the step 5, you may see the following error dialog.
Version or commit-id
3b6185f4fdf408bc9e630a1951a8938aba730111 and any later version
Environment
Investigations
The root cause is that
SpawnSandboxedProcessImpl
inwin_sandbox.cc
no longer sets the spawned process ID topid
after 3b6185f4fdf408bc9e630a1951a8938aba730111. https://github.com/google/mozc/blob/006084cf4e3a31a37f48a55c7d4a73790ce39dfb/src/base/win32/win_sandbox.cc#L635-L664As a result,
ServerLauncher::StartServer
gets confused and thinks it's failed to launchmozc_server
and the error dialog should be shown.Here it's guaranteed to fall into
PROCESS_SIGNALED
block whenpid
is0
. https://github.com/google/mozc/blob/006084cf4e3a31a37f48a55c7d4a73790ce39dfb/src/ipc/named_event.cc#L162-L174 https://github.com/google/mozc/blob/006084cf4e3a31a37f48a55c7d4a73790ce39dfb/src/client/server_launcher.cc#L197-L214