https://bugs.winehq.org/show_bug.cgi?id=53189
Bug ID: 53189 Summary: Cheat Engine crashes when opening a drop-down menu Product: Wine Version: 7.11 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: win32u Assignee: wine-bugs@winehq.org Reporter: lennard.hofmann@web.de CC: jacek@codeweavers.com Regression SHA1: b9d8a842f0ba1e4c3c59b9e9ede667bea1761e6e Distribution: ArchLinux
How to reproduce:
1. Download the installer for Cheat Engine 7.4 from https://github.com/cheat-engine/cheat-engine/releases/download/7.4/CheatEngi... 2. Run the installer (if it fails you might be missing ntlm_auth and gnutls which are provided by samba and lib32-gnutls on Arch Linux) 3. Run Cheat Engine and open a drop-down menu, e.g. by clicking on "File" in the menu bar or pressing alt+F
In Wine 7.10 this works as expected; in Wine 7.11 the menu quickly disappears, a window with "External exception 80000101" pops up, and this gets printed to the console:
m Files\Cheat Engine 7.4\cheatengine-x86_64.exe: ../wine/dlls/ntdll/unix/thread.c:1739: ntdll_set_exception_jmp_buf: Assertion `!jmp || !ntdll_get_thread_data()->jmp_buf' failed.
Using git-bisect I found the first bad commit:
b9d8a842f0ba1e4c3c59b9e9ede667bea1761e6e win32u: Move menu tracking implementation from user32
https://bugs.winehq.org/show_bug.cgi?id=53189
lennard.hofmann@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, regression, | |source
https://bugs.winehq.org/show_bug.cgi?id=53189
Santino Mazza tatidev1454@protonmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |tatidev1454@protonmail.com
--- Comment #1 from Santino Mazza tatidev1454@protonmail.com --- I can confirm this bug.
After some investigation, the problem is in the way of handling exceptions implemented in unixlib.h
Basically, there can't be a try except inside another one, because of the way ntdll_set_exception_jmp_buf works. It throws an exception when jmpbuf is already set and you want to set it to something else which isn't null.
This commit is responsible of this because it adds another case to the function handle_sys_command, specifically SC_MOUSEMENU which calls track_mouse_menu_bar, this leads to the function NtUserDispatchMessage get called at some point which runs a try except block, and inside this at some point convert_bitmapinfo gets called, and this function also runs a try except block, generating the assert exception.
https://bugs.winehq.org/show_bug.cgi?id=53189
--- Comment #2 from Jacek Caban jacek@codeweavers.com --- Yes, NtUserDispatchMessage is currently broken. As a hack, we could use a similar to track_menu() or move exception handling to PE side, but we need some more improvements for exception handling in client callbacks anyway. I'm working on it, but it's not ready yet.
https://bugs.winehq.org/show_bug.cgi?id=53189
--- Comment #3 from Jacek Caban jacek@codeweavers.com --- Please test with current git, it should be fixed with: https://gitlab.winehq.org/wine/wine/-/commit/1e5d4e94229201b66f62a89138bf6c6...
https://bugs.winehq.org/show_bug.cgi?id=53189
lennard.hofmann@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
--- Comment #4 from lennard.hofmann@web.de --- Thanks, this fixes it!
https://bugs.winehq.org/show_bug.cgi?id=53189
Jacek Caban jacek@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |1e5d4e94229201b66f62a89138b | |f6c654e91f335
https://bugs.winehq.org/show_bug.cgi?id=53189
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 7.14.