http://bugs.winehq.org/show_bug.cgi?id=58503
Bug ID: 58503 Summary: Mouse cursor vanishes when using winewayland Product: Wine Version: 10.12 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winewayland Assignee: wine-bugs@winehq.org Reporter: sutupud@yahoo.com Distribution: ---
Since the cursor changes on winewayland in wine 10.12, I see a regression when playing Saints Row 3 Remastered (GOG).
After some time in game, the mouse cursor no longer appears when switching to the menu. When that happens, the log is filled with:
0024:err:gdi:alloc_gdi_handle out of GDI object handles, expect a crash [... repeated ~100 times ...] 0024:err:gdi:alloc_gdi_handle out of GDI object handles, expect a crash 0024:err:gdi:alloc_gdi_handle out of GDI object handles, expect a crash 0024:err:waylanddrv:wayland_pointer_update_cursor_buffer Failed to get icon info for cursor=0xa70076 0024:err:gdi:alloc_gdi_handle out of GDI object handles, expect a crash 0024:err:gdi:alloc_gdi_handle out of GDI object handles, expect a crash 0024:err:waylanddrv:wayland_pointer_update_cursor_buffer Failed to get icon info for cursor=0xa70076 0024:err:gdi:alloc_gdi_handle out of GDI object handles, expect a crash 0024:err:gdi:alloc_gdi_handle out of GDI object handles, expect a crash 0024:err:waylanddrv:wayland_pointer_update_cursor_buffer Failed to get icon info for cursor=0xa70076 0024:err:gdi:alloc_gdi_handle out of GDI object handles, expect a crash 0024:err:gdi:alloc_gdi_handle out of GDI object handles, expect a crash [... keeps repeating ...]
The game normally switches between hidden and visible mouse cursor when accessing the menu or in-game phone screen. Except from that the game keeps running, just without visible mouse cursor.
It doesn't trigger immediately, which makes testing not so easy. Most of the time it runs fine for something between half an hour and an hour. For that reason I can't say if other applcations are affected too, since I didn't test anything else long enough.
It did not happen in wine 10.11, and I could not reproduce it after reverting https://gitlab.winehq.org/wine/wine/-/commit/6a9df1f4c5a8448f426ba3454faf25d...
http://bugs.winehq.org/show_bug.cgi?id=58503
mata sutupud@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |6a9df1f4c5a8448f426ba3454fa | |f25d00ad770d5
http://bugs.winehq.org/show_bug.cgi?id=58503
mata sutupud@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression Distribution|--- |ArchLinux
http://bugs.winehq.org/show_bug.cgi?id=58503
daniel daniel.penalized@proton.me changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |daniel.penalized@proton.me
--- Comment #1 from daniel daniel.penalized@proton.me --- I think Mount & Blade: Warband (Native) is also affected by this issue. It happened similarly to your description. MBW uses a custom cursor, this cursor is always visible, except when you take control of the character, the cursor disappears (this is normal behavior of the game). The issue happened when I was navigating on the overland map (cursor was visible), I entered an area that I control my character (cursor becomes invisible) and then I go back to the overland map (cursor is still invisible, it was supposed to be visible again). I haven't found an effective way of reproducing it either.
http://bugs.winehq.org/show_bug.cgi?id=58503
Miliardo agarplayerarlon@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |agarplayerarlon@gmail.com
--- Comment #2 from Miliardo agarplayerarlon@gmail.com --- I have a similar issue where, on FL Studio, if I hover over certain elements of the UI, the mouse cursor disappears and becomes invisible
http://bugs.winehq.org/show_bug.cgi?id=58503
--- Comment #3 from mata sutupud@yahoo.com --- Created attachment 79195 --> http://bugs.winehq.org/attachment.cgi?id=79195 fix info.hbmColor and info.hbmMask never being freed
Since it still happens on wine 10.13 I investigated some more.
Running with WINEDEBUG=+gdi shows that (only) while the mouse cursor is visible in the game menu, the gdi allocated object count keeps incrasing rapidly, e.g. after a little while:
0024:trace:gdi:alloc_gdi_handle allocated NTGDI_OBJ_BITMAP 0x3009006a 1051/65536
I tried other applications, but from those I tested only Saints Row 3 and 4 showed this rapid increase and therfore can reach the maximum of 65536 in a reasonable time (the more time is spent with the menu open the faster it happens). The problem itself is also observable by running
WINEDEBUG=+gdi DISPLAY= wine notepad
and then moving the mouse in and out of the text area so the cursor changes, and observer the constant increase in allocations with each change.
Seems that there is a leak in wayland_pointer.c:wayland_pointer_set_cursor_shape(...), the bitmaps allocated inside the info object by get_icon_info(...) are never released.
The attached patch seems to work to stop this issue.
http://bugs.winehq.org/show_bug.cgi?id=58503
mata sutupud@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Mouse cursor vanishes when |Resource leak in |using winewayland |wayland_pointer_set_cursor_ | |shape can cause mouse | |cursor to dissappear after | |exhausting gdi handles
http://bugs.winehq.org/show_bug.cgi?id=58503
alexandros.frantzis@collabora.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |alexandros.frantzis@collabo | |ra.com
--- Comment #4 from alexandros.frantzis@collabora.com --- Thanks for the report and the fix. The patch seems fine to me. Would you like to try to create a MR yourself? If not, I can do it on your behalf.
http://bugs.winehq.org/show_bug.cgi?id=58503
--- Comment #5 from mata sutupud@yahoo.com --- (In reply to alexandros.frantzis from comment #4)
Thanks for the report and the fix. The patch seems fine to me. Would you like to try to create a MR yourself? If not, I can do it on your behalf.
I'm on a mobile device and won't have access to my regular PC until next week, so I'd appreciate if you would do that. Thank you!