http://bugs.winehq.org/show_bug.cgi?id=59393 Bug ID: 59393 Summary: SERVICE_INTERACTIVE_PROCESS services don't work properly Product: Wine Version: 11.0 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: wineserver Assignee: wine-bugs@list.winehq.org Reporter: lina@lina.yt Distribution: --- service_run_main_thread() calls ProcessWineMakeProcessSystem, which makes the thread a system process. A system process is not allowed to keep a desktop alive, per the logic in server/winstation.c. When such a process tries to create a window, such as by calling MessageBoxA(), it ends up in winstation_init(), which creates a desktop and assigns it to the current process. This launches explorer.exe. However, this desktop isn't actually ever owned by the service, because it is a system process. This is an unstable state. If any other process/thread is assigned/released a desktop at this point, server/winstation.c will kill explorer.exe by sending it WM_CLOSE. This a race. Sequence of events: - Service Process starts - It becomes a system process after running the main service dispatcher - Service calls MessageBoxA() - X11DRV_create_win_data -> init_clip_window() grabs the clip_window ID from explorer.exe - Some other process/thread owns a desktop and becomes system, exits, or whatever. - The close_timeout triggers, and explorer.exe is told to exit - The clip_window is destroyed - Any clip_window operations (such as ungrab_clipping_window() via X11DRV_ClipCursor) trigger a BadWindow X11 error and kill the service This is happening on Proton partially due to some Proton changes (that cause the sequence of events above to actually happen almost 100% reliably), but I believe the fundamental problem exists in vanilla Wine. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.