[Bug 9615] RPG Maker, Fritz9, Amazon Music Downloader: crash when clicking menu bar

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Oct 4 08:16:25 CDT 2008


--- Comment #21 from Dusan Saiko <dusan.saiko at gmail.com>  2008-10-04 08:16:24 ---
This bug is quite annoying for me, I have tried even Crossover office, menu is
not working there as well. 
.. So I have downloaded wine source, CDT eclipse plugin and found fix for the


Error can be easily reproduced by installing free chess client from playchess
homepage, then running the app, entering as guest and clicking any menu item.
Gnome completly freezes for me in current wine version.

As I was debugging the code, it seems to me application does not have simple
winapi menu, rather some sort of button which open independent popup menus.

The fix has two parts in user32.dll/menu.c:
- the crash was caused by sending null value to application as lparam in
WM_ENTERIDLE message, see msdn description of the event 
lParam - Handle to the dialog box (if wParam is MSGF_DIALOGBOX) or window
containing the displayed menu (if wParam is MSGF_MENU). 

fix in MENU_TrackMenu (line 3035 in current git source):

HWND win = (wFlags & TPM_ENTERIDLEEX && menu->wFlags & MF_POPUP) ? menu->hWnd :
enterIdleSent = TRUE;
if(win) { //added condition
 SendMessageW( mt.hOwnerWnd, WM_ENTERIDLE, MSGF_MENU, (LPARAM)win );


but as was already noticed, this does not close the popup menus then at all.
after further debugging, the application sends message to popup menu to be
closed before opening a new popup. The message is 0xb09, and I have not found
any reference to it on the internet. After adding following fix, the menu
behaves correctly.

fix in MENU_TrackMenu (line 3044 in current git source):

        if(msg.message == 0xb09) {
                fEndMenu = TRUE;
                //do not remove message from queue


I am attaching patch for the trunk git version of menu.c.

Please comment the fix (and possibly find meaning of 0xb09 message), hopefully
it can be included in the source tree.


Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
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.

More information about the wine-bugs mailing list