[Bug 38275] New: DeferWindowPos accept NULL HWND and fail at EndDeferWindowPos()
https://bugs.winehq.org/show_bug.cgi?id=38275 Bug ID: 38275 Summary: DeferWindowPos accept NULL HWND and fail at EndDeferWindowPos() Product: Wine Version: unspecified Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: user32 Assignee: wine-bugs(a)winehq.org Reporter: rozhuk.im(a)gmail.com Distribution: --- http://source.winehq.org/git/wine.git/blob/e882cdf55cc004b5ffb7b85d912b4733d... DeferWindowPos( HDWP hdwp, HWND hwnd... does not check: hwnd != NULL (windows does!) and later EndDeferWindowPos() fail in http://source.winehq.org/git/wine.git/blob/e882cdf55cc004b5ffb7b85d912b4733d... X11DRV_SetWindowPos(...) ... 763 /* Fix redundant flags */ 764 if (!fixup_flags( winpos )) return FALSE; fixup_flags() ... WND *wndPtr = WIN_GetPtr( winpos->hwnd ); 382 BOOL ret = TRUE; 383 384 if (!wndPtr || wndPtr == WND_OTHER_PROCESS) 385 { 386 SetLastError( ERROR_INVALID_WINDOW_HANDLE ); 387 return FALSE; 388 } Miranda NG was affected. Workaround: if (NULL != hwnd) /* Wine fix. */ hdwp = DeferWindowPos(hdwp, hwnd...); -- 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.
https://bugs.winehq.org/show_bug.cgi?id=38275 Ivan_83 <rozhuk.im(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |1.7.38 OS|Linux |FreeBSD -- 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.
https://bugs.winehq.org/show_bug.cgi?id=38275 Sebastian Lackner <sebastian(a)fds-team.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian(a)fds-team.de -- 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.
https://bugs.winehq.org/show_bug.cgi?id=38275 --- Comment #1 from Ivan_83 <rozhuk.im(a)gmail.com> --- http://trac.miranda-ng.org/changeset/12488 -- 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.
https://bugs.winehq.org/show_bug.cgi?id=38275 super_man(a)post.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man(a)post.com --- Comment #2 from super_man(a)post.com --- Do you have real world application (Miranda NG ?) that suffers from this and how to reproduce the error? Also if you are so aware of the problem are you able to send a patch against wine so it can be merged? -- 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.
https://bugs.winehq.org/show_bug.cgi?id=38275 --- Comment #3 from Nikolay Sivov <bunglehead(a)gmail.com> --- Hi, Ivan. This should be fixed now, see http://source.winehq.org/git/wine.git/?a=commit;h=5e65b65219bd56a5991c2c54df.... Please retest. Miranda changes don't look very Wine-specific, for example DeferWindowPos called repeatedly overwrites HWDP handle, and same will happen on Windows, when function fails. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=38275 winetest(a)luukku.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rozhuk.im(a)gmail.com, | |winetest(a)luukku.com -- 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.
https://bugs.winehq.org/show_bug.cgi?id=38275 --- Comment #4 from Ivan_83 <rozhuk.im(a)gmail.com> --- I think wine should return hdwp on fail and on success. https://msdn.microsoft.com/en-us/library/windows/desktop/ms632681(v=vs.85).a... =============================================================================== Return value Type: Type: HDWP The return value identifies the updated multiple-window – position structure. The handle returned by this function may differ from the handle passed to the function. The new handle that this function returns should be passed during the next call to the DeferWindowPos or EndDeferWindowPos function. If insufficient system resources are available for the function to succeed, the return value is NULL. To get extended error information, call GetLastError. =============================================================================== so NULL returned only on mallocal/realloc hdwp fail. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=38275 --- Comment #5 from winetest(a)luukku.com --- I think I found an application that it's impacted by this. bug 31775. It has a download and the console has messages like this when I quit the program. err:rebar:REBAR_MoveChildWindows DeferWindowPos returned NULL err:rebar:REBAR_MoveChildWindows DeferWindowPos returned NULL -- 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.
https://bugs.winehq.org/show_bug.cgi?id=38275 C. Leu <kle(a)bluewin.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kle(a)bluewin.ch --- Comment #6 from C. Leu <kle(a)bluewin.ch> --- And for the year 2024 here follows a short status update. I can confirm this bug for Wine 9.0 in conjunction with the old classic graphics software Paint Shop Pro 9. This was the last version which was released under the Jasc Software brand. All later variants were published by Corel. It looks that those "0024:err:rebar:REBAR_MoveChildWindows EndDeferWindowPos returned NULL" and "0024:err:rebar:REBAR_MoveChildWindows DeferWindowPos returned NULL" error messages always appears when a selection / selected area in a picture is moved around. But at least for Paint Shop 9 this doesn't affects the operation in a negative way. Well, perhaps some of the rare instabilities are related to this bug but usually this software runs almost perfectly. The program can be downloaded from here: https://www.tenforums.com/software-apps/191499-paint-shop-pro-4-12-7-04-8-1-... Note, it can be installed via the "Jasc Paint Shop Pro 9.msi" and "Jasc Animation Shop 3.msi" files without any registration and also without any serial. -- 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.
participants (2)
-
wine-bugs@winehq.org -
WineHQ Bugzilla