http://bugs.winehq.org/show_bug.cgi?id=18371
Summary: Lord of the Rings Online: mouse cursor corrupted on focus change Product: Wine Version: 1.1.20 Platform: Other OS/Version: other Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: daniel.santos@pobox.com
When playing Lord of the Rings Online in windowed mode and changing the focus away from and back to the game, the mouse cursor becomes corrupted. The corrupted image may be blank or it may be a large area of animated gibberish. Once you are able to position the cursor over an object in the game that normally changes the cursor it is restored, so there is a work around, although it can be difficult to do, especially when the cursor image is completely blank. It is usually necessary to move the mouse outside of the game window and position it so that you are on either the x or y axis of the object in the game window you want to mouse over and then move slowly along the other axis until it changes.
This bug has existed since Book 11 and exists up to the current version (Mines of Moria) and for the last year (so around wine 0.9.something).
Other notes: LOTRO can have very large mouse cursors (perhaps up to 100x300 pixels), so I'm not certain which API they are using.
http://bugs.winehq.org/show_bug.cgi?id=18371
Enrico Zschemisch dirtbag@gmx.li changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dirtbag@gmx.li
--- Comment #1 from Enrico Zschemisch dirtbag@gmx.li 2009-05-07 02:53:08 --- I can confirm this problem on my setup since the last year with every Wine-version and Nvidia-drivers. Additionally, the mouse cursor usually disappears instead of appearing corrupted.
Workaround for both problems: Open the inventory or character screen and move the mouse, so the mouse cursor image changes. Somewhen it will be correct.
http://bugs.winehq.org/show_bug.cgi?id=18371
--- Comment #2 from Daniel Santos daniel.santos@pobox.com 2009-05-09 21:15:06 --- Further experimentation has revealed that the mouse cursor becomes corrupted when focus to the application window is lost. If I have another window up front and I mouse over an area in the game window that changes the cursor, the cursor will be restored. Then if I change focus to the game window, the cursor is still OK, so it doesn't happen when the window gains focus, only when it looses it.
This could possibly be related to another bug where the game sometimes crashes when (in windowed mode) you change focus away and then back to the game (it always happens when the window is gaining focus).
http://bugs.winehq.org/show_bug.cgi?id=18371
--- Comment #3 from Daniel Santos daniel.santos@pobox.com 2009-05-17 14:29:12 --- When the app's window is deactivated, it responsibly calls LoadCursor(NULL, IDC_ARROW) to get the default arrow cursor and then calls SetCursor() passing the result and saving the return value, or otherwise remembering the handle to the previous cursor. However, it then irresponsibly calls DestroyCursor, passing the handle to the old cursor. This would be fine, except that when a mouse move event is sent to the window, it calls SetCursor() passing that old handle.
I haven't tested this behavior on windows yet, but the current wine SetCursor implementation fails to verify that the handle passed is valid and that it is even a handle to an object that can be used as a cursor. Instead, if the handle is invalid, then it clears the cursor (same as calling SetCursor(NULL)), this is incorrect behavior. I'm also getting that calling SetCursor and passing a handle to an object that is not a valid cursor can result in undefined behavior that would not occur on windows, as the msdn docs claim the call will fail if it isn't a handle to a cursor.
I'll post & submit a patch once I've tested this behavior further on windows. I'm probably also going to submit a second patch that cleans up similar problems in other areas of user32
http://bugs.winehq.org/show_bug.cgi?id=18371
--- Comment #4 from Daniel Santos daniel.santos@pobox.com 2009-05-17 14:58:32 --- So it appears that my concern about not checking the handle type may indeed be valid. Upon further testing, I can still get the corrupted cursor, although I don't get an empty one any more. A call to X11DRV_SetCursor (I presume by pointer from ShowCursor) is made passing a handle with CURSORINFO that is 280x382 with zero bits per pixel!! Sounds screwy to me. Actually, it sounds like we took a handle, found out it was valid, got the memory address and cast it to a CURSORINFO struct, which it wasn't.
0017:trace:cursor:X11DRV_MotionNotify hwnd 0x20032, event->is_hint 0 0017:trace:cursor:SetCursor 0x115e 0017:trace:cursor:SetCursor 0x115e 0017:trace:cursor:ShowCursor 0, count=0 0017:trace:cursor:X11DRV_SetCursor NULL 0017:trace:cursor:X11DRV_MotionNotify hwnd 0x20032, event->is_hint 0 0017:trace:cursor:X11DRV_SetCursorPos warping to (1196,470) ... repeated ... 0017:trace:cursor:X11DRV_MotionNotify hwnd 0x20032, event->is_hint 0 0017:trace:cursor:X11DRV_SetCursorPos warping to (1334,568) 0017:trace:cursor:ShowCursor 1, count=-1 0017:trace:cursor:X11DRV_SetCursor 280x382, planes 0, bpp 0 0017:fixme:cursor:create_cursor_image Currently no support for cursors with 0 bits per pixel 0017:trace:global:GlobalUnlock16 115e 0017:trace:cursor:X11DRV_MotionNotify hwnd 0x20032, event->is_hint 0 0017:trace:cursor:SetCursor 0x115e
http://bugs.winehq.org/show_bug.cgi?id=18371
--- Comment #5 from Daniel Santos daniel.santos@pobox.com 2009-05-19 20:43:51 --- Can you please changed title to the following?
Lord of the Rings Online: mouse cursor corruption & hang on focus change
I tested for several hours using a hack to prevent the lotro client from destroying its cursor and experienced no hangs or cursor problems, so I am certain now that the bug is also the cause of hangs after switching focus away from and back to the app's window.
http://bugs.winehq.org/show_bug.cgi?id=18371
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Lord of the Rings Online: |Lord of the Rings Online: |mouse cursor corrupted on |mouse cursor corruption & |focus change |hang on focus change
http://bugs.winehq.org/show_bug.cgi?id=18371
Eric Sandall sandalle@sourcemage.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sandalle@sourcemage.org
--- Comment #6 from Eric Sandall sandalle@sourcemage.org 2009-06-19 13:54:40 --- Isn't this just Bug #16136?
http://bugs.winehq.org/show_bug.cgi?id=18371
--- Comment #7 from Daniel Santos daniel.santos@pobox.com 2009-07-05 10:42:06 --- (In reply to comment #6)
Isn't this just Bug #16136?
Unfortunately, I do not believe so although I haven't confirmed it by testing on the patched wine that fixes the cursor problem. I avoid loosing focus when in full screen because it will either hang or do very strange things (like working, but all contents will be scooted up the width of the panel I keep at the bottom of my KDE desktop). You can be in windowed mode and still have this problem. Additionally, it doesn't always cause the hang.
I have the underlying problem fixed, but the patch set is rather large as it addresses the underlying deficiencies in wine's cursor & icon management, so it will take some work to get it all though. As such, it would probably be helpful for me to post the hack.
http://bugs.winehq.org/show_bug.cgi?id=18371
--- Comment #8 from Daniel Santos daniel.santos@pobox.com 2009-07-05 13:51:38 --- Created an attachment (id=22205) --> (http://bugs.winehq.org/attachment.cgi?id=22205) Temporary work-around
This is a temporary work-around generated from 1.1.25, but should also work for several older versions (at least back to 1.1.20). Because it's tailored to LOTRO's behavior, I wouldn't recommend it for for any other apps (i.e., it doesn't solve the underlying problem).
http://bugs.winehq.org/show_bug.cgi?id=18371
--- Comment #9 from Florian Friedrich friedrich@hooster.de 2010-02-22 09:05:33 --- Created an attachment (id=26404) --> (http://bugs.winehq.org/attachment.cgi?id=26404) Workaround for newer versions
Because this bug still exists in newer wine-versions I have rewritten the workaround, so it applies to versions after 1.1.36 (tested with 1.1.38).
http://bugs.winehq.org/show_bug.cgi?id=18371
Daniel Santos daniel.santos@pobox.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #22205|0 |1 is obsolete| |
--- Comment #10 from Daniel Santos daniel.santos@pobox.com 2010-04-28 02:15:40 --- Created an attachment (id=27587) --> (http://bugs.winehq.org/attachment.cgi?id=27587) Updated hack for 1.1.43
This area of code has changed a bit, so here's an updated hack (work around). Once school is out, I may dig up last year's cursoricon fix (the real fix) and see about getting it accepted again, but it will take a lot of work because they've changed a lot of that code now, although the problem is yet unresolved. :(
http://bugs.winehq.org/show_bug.cgi?id=18371
--- Comment #11 from Daniel Santos daniel.santos@pobox.com 2010-04-28 02:18:58 --- Also, can we please get this bug marked as confirmed. Additionally, this would not be an "enhancement", it should be a "normal" bug, as something is broken (often crashing). You can mark the difficulty as "weeks" because it requires extensive changes to the server (beyond what's already been added recently in queue.c).
http://bugs.winehq.org/show_bug.cgi?id=18371
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Severity|enhancement |normal
--- Comment #12 from Juan Lang juan_lang@yahoo.com 2010-04-28 19:52:48 --- Confirming per comment 1, and adjusting the priority due to hang.
http://bugs.winehq.org/show_bug.cgi?id=18371
--- Comment #13 from Daniel Santos daniel.santos@pobox.com 2010-04-30 14:52:53 --- thanks! I don't think it ever hangs, but it will sometimes crash. It's one of those things that varies from one release to another. Sometimes, it crashes constantly, other times it wont crash.
http://bugs.winehq.org/show_bug.cgi?id=18371
--- Comment #14 from Daniel Santos daniel.santos@pobox.com 2010-09-14 07:21:32 CDT --- Note that the hack posted here no longer works as of the Volume III, Book 2 release. This is because the hack relied upon the order of events that were predictable in the lotro client and the order of these windows calls have now changed, so I'll have to find something else to key off of to enable the hack.
Currently, even with this hack in place, mouse cursor corruption still occurs as does the occasional crash (no hanging this time). However, I'm not getting the garbled cursor anymore, I'm just getting the default windows cursor that doesn't change on mouse overs.
And again, please change this bug status to confirmed.
http://bugs.winehq.org/show_bug.cgi?id=18371
--- Comment #15 from Daniel Santos daniel.santos@pobox.com 2010-09-14 07:22:42 CDT --- oh wait, is "new" the same as "confirmed"?
http://bugs.winehq.org/show_bug.cgi?id=18371
--- Comment #16 from Austin English austinenglish@gmail.com 2010-09-14 12:05:41 CDT --- (In reply to comment #15)
oh wait, is "new" the same as "confirmed"?
Yes.
http://bugs.winehq.org/show_bug.cgi?id=18371
--- Comment #17 from Alexandre Julliard julliard@winehq.org 2010-10-13 11:48:08 CDT --- Please retest with current git.
http://bugs.winehq.org/show_bug.cgi?id=18371
--- Comment #18 from butraxz@gmail.com 2013-06-21 15:38:19 CDT --- This ticket has not been updated for over 900 days.
Is this still an issue in wine version 1.6-rc3 or higher or is this to be closed as abandoned ?
https://bugs.winehq.org/show_bug.cgi?id=18371
roger@mailinator.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |roger@mailinator.com
--- Comment #19 from roger@mailinator.com --- ABANDON
https://bugs.winehq.org/show_bug.cgi?id=18371
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |ABANDONED
--- Comment #20 from Austin English austinenglish@gmail.com --- Abandoned.
https://bugs.winehq.org/show_bug.cgi?id=18371
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #21 from Bruno Jesus 00cpxxx@gmail.com --- Closing abandoned.