https://bugs.winehq.org/show_bug.cgi?id=47794
Bug ID: 47794 Summary: Rockstar Games Launcher installer button images do not display Product: Wine Version: 4.16 Hardware: x86 URL: https://gamedownloads.rockstargames.com/public/install er/Rockstar-Games-Launcher.exe OS: Linux Status: UNCONFIRMED Severity: trivial Priority: P2 Component: user32 Assignee: wine-bugs@winehq.org Reporter: bshanks@codeweavers.com Distribution: ---
Created attachment 65281 --> https://bugs.winehq.org/attachment.cgi?id=65281 Screenshot of Rockstar Games Launcher installer as it works now
When the Rockstar Games Launcher installer isn't crashing because of a buffer overrun (see bug 47783), the buttons are all missing their custom bitmaps and look very weird.
The code does the following:
CreateWindow("BUTTON", "Cancel", ...); hImage = LoadImage(NULL, "Icon_ButtonCancel.bmp", IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION | LR_LOADFROMFILE); SendMessage(hwndButton, BM_SETIMAGE, IMAGE_BITMAP, hImage); DeleteObject(hImage);
This seems to be fine on Windows, I assume the BM_SETIMAGE handler takes a ref on the bitmap and prevents it from being deleted. But Wine does delete the bitmap object, and then can't draw it ("warn:gdi: invalid handle" messages are printed).
Attached Wine screenshots of the installer currently and with DeleteObject() stubbed out
https://bugs.winehq.org/show_bug.cgi?id=47794
--- Comment #1 from Brendan Shanks bshanks@codeweavers.com --- Created attachment 65282 --> https://bugs.winehq.org/attachment.cgi?id=65282 Rockstar Games Launcher installer with gdi32 DeleteObject() stubbed
https://bugs.winehq.org/show_bug.cgi?id=47794
--- Comment #2 from Brendan Shanks bshanks@codeweavers.com --- Also, I'll upload a test app shortly
https://bugs.winehq.org/show_bug.cgi?id=47794
Brendan Shanks bshanks@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |aeikum@codeweavers.com
https://bugs.winehq.org/show_bug.cgi?id=47794
Jacob Hrbek werifGX@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |werifGX@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=47794
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|user32 |comctl32
--- Comment #3 from Nikolay Sivov bunglehead@gmail.com --- Turns out it's a feature of comctl32 v6 buttons. It continues to draw bitmaps even after original object was deleted. Class button control from user32 behaves like wine currently does - it fails to draw. However BM_GETIMAGE return value is consistent and is always the original handle.
https://bugs.winehq.org/show_bug.cgi?id=47794
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1
--- Comment #4 from Nikolay Sivov bunglehead@gmail.com --- Confirming.
https://bugs.winehq.org/show_bug.cgi?id=47794
Brendan Shanks bshanks@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |5fcd20396fb29a1f2ce87645cbb | |0d045ce5cf2d8 Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #5 from Brendan Shanks bshanks@codeweavers.com --- Fixed by 5fcd20396fb29a1f2ce87645cbb0d045ce5cf2d8, thanks Nikolay
https://bugs.winehq.org/show_bug.cgi?id=47794
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 5.6.
https://bugs.winehq.org/show_bug.cgi?id=47794
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |5.0.x
https://bugs.winehq.org/show_bug.cgi?id=47794
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|5.0.x |---
--- Comment #7 from Michael Stefaniuc mstefani@winehq.org --- Removing the 5.0.x milestone from bug fixes included in 5.0.2.