http://bugs.winehq.org/show_bug.cgi?id=28884
Bug #: 28884 Summary: keyboard input does not work properly for Sculptris Product: Wine Version: 1.3.31 Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: peter@light-bg.com Classification: Unclassified
Created attachment 37113 --> http://bugs.winehq.org/attachment.cgi?id=37113 console output
The application runs flawlessly while controlled with the mouse only or with a combination of keyboard and mouse input simultaneously. But upon pressing any button on the keyboard alone, with the only exception of the F* keys and the NumLock, the application freezes until focus is changed to another window and returned to the application window. After returning focus to the application window Sculptris continues to work as if no keyboard shortcut was pressed. The only exception to this are the square brackets and the numpad Del keys, which have the effect of increasing/decreasing the brush size. They too do freeze the app, but the brush is larger/smaller after returning to the app. No other keyboard shortcuts (most notably ctrl-z - undo) are not working. This makes the application unusable for serious work, because many things are controlled only via keyboard and are not present in the UI.
There is nothing on the console, except the following three lines:
--attached--
http://bugs.winehq.org/show_bug.cgi?id=28884
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal
--- Comment #1 from Dmitry Timoshkov dmitry@baikal.ru 2011-10-24 22:16:19 CDT --- http://bugs.winehq.org/page.cgi?id=fields.html#bug_severity
http://bugs.winehq.org/show_bug.cgi?id=28884
cru5n1k.n4n0@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |cru5n1k.n4n0@gmail.com
--- Comment #2 from cru5n1k.n4n0@gmail.com 2012-09-08 03:28:19 CDT --- Problem persists still on 1.5.12. Every single hotkey except for those used in combination with the mouse and the F* keys cause the program to freeze until focus is shifted away and then back again.
There is no output whatsoever when the bug occurs nor after, and the console log is exactly the same as the one previously attached, minus the final line.
http://bugs.winehq.org/show_bug.cgi?id=28884
Saverio Venezia santogiuseppe@inwind.it changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |santogiuseppe@inwind.it
--- Comment #3 from Saverio Venezia santogiuseppe@inwind.it 2013-11-25 09:25:37 CST --- I confirm all that Peter said, the problem persist in wine-1.6 There is not console output when the issue occurs (the console output in Peter's attachment happens before a key is pressed)
https://bugs.winehq.org/show_bug.cgi?id=28884
--- Comment #4 from Austin English austinenglish@gmail.com --- This is your friendly reminder that there has been no bug activity for over a year. Is this still an issue in current (1.7.37 or newer) wine? If so, please attach the terminal output in 1.7.37 (see http://wiki.winehq.org/FAQ#get_log).
https://bugs.winehq.org/show_bug.cgi?id=28884
Roland Baudin roland65@free.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |roland65@free.fr
--- Comment #5 from Roland Baudin roland65@free.fr --- The bug is still there in wine 1.7.33. Same symptoms, no console output.
https://bugs.winehq.org/show_bug.cgi?id=28884
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de
--- Comment #6 from Sebastian Lackner sebastian@fds-team.de --- Is this the app this bug report is about? http://pixologic.com/sculptris/
If yes, is there also some download available without filling out this subscription form? ;)
https://bugs.winehq.org/show_bug.cgi?id=28884
Béla Gyebrószki gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gyebro69@gmail.com
--- Comment #7 from Béla Gyebrószki gyebro69@gmail.com --- (In reply to Sebastian Lackner from comment #6)
Is this the app this bug report is about? http://pixologic.com/sculptris/
If yes, is there also some download available without filling out this subscription form? ;)
Still present in wine-1.7.38-142-ged92458
Sculptris Alpha 6 direct download link: http://csillagpor.org/programok/sculptris.exe
sculptris.exe sha1: 5650a061670e86ab5d7ed4203ceadda47de052c0
https://bugs.winehq.org/show_bug.cgi?id=28884
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |http://csillagpor.org/progr | |amok/sculptris.exe
--- Comment #8 from Sebastian Lackner sebastian@fds-team.de --- Thanks for providing the download url. Actually the following (very bad) hack is sufficient to make the app working fine here (well, at least what I tested):
--- snip --- diff --git a/dlls/user32/message.c b/dlls/user32/message.c index eac4e4d..27a4988 100644 --- a/dlls/user32/message.c +++ b/dlls/user32/message.c @@ -3908,6 +3908,7 @@ BOOL WINAPI TranslateMessage( const MSG *msg ) message = (msg->message == WM_KEYDOWN) ? WM_CHAR : WM_SYSCHAR; TRACE_(key)("%d -> PostMessageW(%p,%s,<x>,%08lx) for <x> in %s\n", len, msg->hwnd, SPY_GetMsgName(message, msg->hwnd), msg->lParam, debugstr_wn(wp, len)); + return TRUE; for (i = 0; i < len; i++) PostMessageW( msg->hwnd, message, wp[i], msg->lParam ); } --- snip ---
The app calls PeekMessage and afterwards GetMessage in a loop. When the app receives the first WM_KEYDOWN message, Wine translates this to a WM_CHAR message. When the app tries to remvoe the WM_KEYDOWN message, it gets the WM_CHAR message instead. Since the WM_KEYDOWN message is never removed new WM_CHAR messages are generated all the time, which causes the app to hang. Excerpt from the log, only relevant lines:
--- snip --- 371956.632:0009:Call user32.PeekMessageA(0033fd6c,00000000,00000000,00000000,00000000) ret=0045b98e 371956.632:0009:trace:msg:peek_message got type 7 msg 100 (WM_KEYDOWN) hwnd 0x20050 wp 41 lp 1e0001 371956.632:0009:Ret user32.PeekMessageA() retval=00000001 ret=0045b98e 371956.632:0009:Call user32.TranslateMessage(0033fd6c) ret=0045b966 371956.632:0009:trace:key:TranslateMessage 1 -> PostMessageW(0x20050,WM_CHAR,<x>,001e0001) for <x> in L"a" 371956.632:0009:Ret user32.TranslateMessage() retval=00000001 ret=0045b966 371956.632:0009:Call user32.GetMessageA(0033fd6c,00000000,00000000,00000000) ret=0045b972 371956.632:0009:trace:msg:peek_message got type 6 msg 102 (WM_CHAR) hwnd 0x20050 wp 61 lp 1e0001 371956.632:0009:Ret user32.GetMessageA() retval=00000001 ret=0045b972 371956.632:0009:Call user32.DispatchMessageA(0033fd6c) ret=0045b980 0009:Call window proc 0x45ae90 (hwnd=0x20050,msg=WM_CHAR,wp=00000061,lp=001e0001) 0009:Ret window proc 0x45ae90 (hwnd=0x20050,msg=WM_CHAR,wp=00000061,lp=001e0001) retval=00000000 371956.632:0009:Ret user32.DispatchMessageA() retval=00000000 ret=0045b980
(now the same starts again, until PeekMessageA finally gets something else than WM_KEYDOWN)
371956.633:0009:Call user32.PeekMessageA(0033fd6c,00000000,00000000,00000000,00000000) ret=0045b98e ... --- snip ---
Will have to take a closer look whats the difference to Windows here. Either TranslateMessage() should behave differently, depending on if the message was already translated before - or, more likely, messages are dequeued with different priorities, which has the effect that WM_KEYDOWN is removed earlier.
Component is either user32 or wineserver.
https://bugs.winehq.org/show_bug.cgi?id=28884
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download Component|-unknown |wineserver Summary|keyboard input does not |keyboard input does not |work properly for Sculptris |work properly for Sculptris | |(GetMessage should remove | |already seen messages with | |higher priority)
--- Comment #9 from Sebastian Lackner sebastian@fds-team.de --- Some more small test apps later, and I am sure now what the problem is exactly, and what the expected behaviour should be. The app relies on the fact that GetMessage() or PeekMessage(..., PM_REMOVE) removes "already seen" messages with higher priority than newly added messages.
Example test code which reproduces the same issue with timers:
--- snip --- SetTimer(hwnd, 1, 0, NULL); while (!PeekMessage(&msg, NULL, 0, 0, 0)) ; /* msg.message is now WM_TIMER */ PostMessage(hwnd, WM_USER, 0, 0); GetMessage(&msg, NULL, 0, 0); /* msg.message should be WM_TIMER, but it is WM_USER */ --- snip ---
This requires wineserver changes in order to fix it -> setting component accordingly.
https://bugs.winehq.org/show_bug.cgi?id=28884
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
--- Comment #10 from Sebastian Lackner sebastian@fds-team.de --- A patch was added to Wine-Staging: https://github.com/wine-compholio/wine-staging/blob/master/patches/server-Pe...
The app works fine with this patch applied. Still needs a lot more tests before even thinking about sending it upstream, but passed all the manual testing I did so far.
https://bugs.winehq.org/show_bug.cgi?id=28884
--- Comment #11 from Roland Baudin roland65@free.fr --- Thanks a lot! With this patch, Sculptris works as expected. There seems to be no regression with the other applications I tested (Lightroom 5 and Acrobat 8). Well done!
https://bugs.winehq.org/show_bug.cgi?id=28884
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |testcase
--- Comment #12 from Sebastian Lackner sebastian@fds-team.de --- A testcase for this issue was accepted upstream: http://source.winehq.org/git/wine.git/patch/1acf20779f93603907ff2c816509a30f...
https://bugs.winehq.org/show_bug.cgi?id=28884
razzylaqui@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |razzylaqui@gmail.com
--- Comment #13 from razzylaqui@gmail.com --- I still have this bug in normal Wine 1.7.45, but the patch in Staging does work. Thank you!
https://bugs.winehq.org/show_bug.cgi?id=28884
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |allenparkchem@wyan.org
--- Comment #14 from Sebastian Lackner sebastian@fds-team.de --- *** Bug 7831 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=28884
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|keyboard input does not |keyboard/mouse input does |work properly for Sculptris |not work properly for |(GetMessage should remove |Sculptris and Snood 3.52 |already seen messages with |(GetMessage should remove |higher priority) |already seen messages with | |higher priority)
--- Comment #15 from Sebastian Lackner sebastian@fds-team.de --- As reported in bug 7831 this also affects Snood 3.52.
Download: http://snoodworld.com/demos/SnoodSetup352.exe SHA1: 52bd0a394c2154a38d18dfb90eb7ef324de5f4c4
https://bugs.winehq.org/show_bug.cgi?id=28884
Michael Müller michael@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |STAGED CC| |michael@fds-team.de Ever confirmed|0 |1 Staged patchset| |https://github.com/wine-com | |pholio/wine-staging/tree/ma | |ster/patches/server-PeekMes | |sage
https://bugs.winehq.org/show_bug.cgi?id=28884
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nerv@dawncrow.de Staged patchset|https://github.com/wine-com |https://github.com/wine-sta |pholio/wine-staging/tree/ma |ging/wine-staging/tree/mast |ster/patches/server-PeekMes |er/patches/server-PeekMessa |sage |ge
https://bugs.winehq.org/show_bug.cgi?id=28884
Andrey Regentov ra@scalpnet.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ra@scalpnet.ru
--- Comment #16 from Andrey Regentov ra@scalpnet.ru --- Still reproduces in wine-3.0 (Ubuntu 3.0-1ubuntu1) with Sculptris Alpha 6.
https://bugs.winehq.org/show_bug.cgi?id=28884
--- Comment #17 from Andrey Regentov ra@scalpnet.ru --- (In reply to Andrey Regentov from comment #16)
Still reproduces in wine-3.0 (Ubuntu 3.0-1ubuntu1) with Sculptris Alpha 6.
Works fine in wine-5.4 (Staging) though.