https://bugs.winehq.org/show_bug.cgi?id=52779
Bug ID: 52779 Summary: Construction Set Extender crash with an Assertion Error in wine 7.5 Product: Wine Version: 7.5 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: lorenzofer@live.it Distribution: ---
Using wine 7.5 Consturction Set Extender (plugin for Oblivion Construction Set) crash with the following assertion
Assertion failed: Data != ActiveComboBoxes.cend(), file Y:\CSE\Construction-Set-Extender\UIManager.cpp, line 623
Everything works fine with wine 7.4
There is no log except the common imm fixme and a lot of d3d:wined3d_check_device_format_conversion and d3d:state_linepattern_w that are present even in 7.4
Bisection in progress
https://bugs.winehq.org/show_bug.cgi?id=52779
Lorenzo Ferrillo lorenzofer@live.it changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://www.nexusmods.com/o | |blivion/mods/36370/ Keywords| |regression
https://bugs.winehq.org/show_bug.cgi?id=52779
Lorenzo Ferrillo lorenzofer@live.it changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |0cfc7c445810c52622afa2b2635 | |e0a23861df386
--- Comment #1 from Lorenzo Ferrillo lorenzofer@live.it --- 0cfc7c445810c52622afa2b2635e0a23861df386 is the first bad commit commit 0cfc7c445810c52622afa2b2635e0a23861df386 Author: Jacek Caban jacek@codeweavers.com Date: Wed Mar 23 14:02:09 2022 +0100
user32: Merge WINPROC_call_window into call_window_proc.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Huw Davies huw@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
dlls/user32/message.c | 62 ++++++++++++++++++++++++++++++++++++++-------- dlls/user32/user_private.h | 3 +-- dlls/user32/winproc.c | 55 +++++----------------------------------- 3 files changed, 59 insertions(+), 61 deletions(-)
https://bugs.winehq.org/show_bug.cgi?id=52779
Jacek Caban jacek@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jacek@codeweavers.com
--- Comment #2 from Jacek Caban jacek@codeweavers.com --- Please attach logs with msg,message,win,seh channels enabled.
https://bugs.winehq.org/show_bug.cgi?id=52779
--- Comment #3 from Lorenzo Ferrillo lorenzofer@live.it --- Created attachment 72162 --> https://bugs.winehq.org/attachment.cgi?id=72162 Log
There is 012c:trace:message:spy_enter_message (0x100d0) L"{ComboBox}" [014b] CB_RESETCONTENT sent from self wp=00000000 lp=00000000 012c:trace:seh:raise (22) 012c:fixme:msvcrt:__clean_type_info_names_internal (03DC2494) stub
Just before the assertion. The assertion was included in to stderr output so it got taken in the log
https://bugs.winehq.org/show_bug.cgi?id=52779
--- Comment #4 from Lorenzo Ferrillo lorenzofer@live.it --- 012c:trace:message:SPY_EnterMessage (000100D0) L"{ComboBox}" [014b] CB_RESETCONTENT sent from self wp=00000000 lp=00000000 012c:trace:msg:WINPROC_CallProcAtoW (hwnd=000100D0,msg=CB_RESETCONTENT,wp=00000000,lp=00000000) 012c:trace:message:SPY_EnterMessage (000100D2) L"{ComboLBox}" [0184] LB_RESETCONTENT sent from self wp=00000000 lp=00000000 012c:trace:msg:WINPROC_CallProcWtoA (hwnd=000100D2,msg=LB_RESETCONTENT,wp=00000000,lp=00000000) 012c:trace:msg:WINPROC_CallProcAtoW (hwnd=000100D2,msg=LB_RESETCONTENT,wp=00000000,lp=00000000) 012c:trace:win:RedrawWindow 000100D2 whole window flags: RDW_INVALIDATE RDW_ERASE 012c:trace:message:SPY_ExitMessage (000100D2) L"{ComboLBox}" [0184] LB_RESETCONTENT returned 00000000 012c:trace:win:RedrawWindow 000100D0 whole window flags: RDW_INVALIDATE RDW_ERASE 012c:trace:message:SPY_ExitMessage (000100D0) L"{ComboBox}" [014b] CB_RESETCONTENT returned 00000001
That log part with wine 7.4
https://bugs.winehq.org/show_bug.cgi?id=52779
--- Comment #5 from Lorenzo Ferrillo lorenzofer@live.it --- Created attachment 72187 --> https://bugs.winehq.org/attachment.cgi?id=72187 execute hooks callbacks always when not an internal message
Found the cause. In the old code, the WH_CALLWNDPROC was always executed even when WINPROC_call_window was not calling it's procedure (exiting early) The parameter generation was moved in 0cfc7c445810c52622afa2b2635e0a23861df386 to init_window_call_params. This function still exit early with a FALSE. However in that commit the execution of WH_CALLWNDPROC is gated with an if(!init_window_call_params(...)) preventing WH_CALLWNDPROC to run. Before 0cfc7c445810c52622afa2b2635e0a23861df386 it was executed properly. After it isn't. This application ComboBoxes seems to need the old behaviour.
After the regression commit a lot of other commits moved this piece of code to win32u. This patch was made on the master. The patch restore the old behaviour the init_window_call_params call and gate the dispatch_win_proc_params but only after the WH_CALLWNDPROC execution. Differenlty from the old behaviour the patch make WH_CALLWNDPROCRET execute even when init_window_call_params is false, while in the pre regreession behaviour WINPROC_call_window returning false was causing the routine to exit early.
https://bugs.winehq.org/show_bug.cgi?id=52779
--- Comment #6 from Jacek Caban jacek@codeweavers.com --- That's a good finding, thanks. However, I don't see why init_window_call_params would fail in this case. If does that if we're called on a window that's either invalid or belongs to another thread. From what I can see in your logs, that should not be the case. Could you please check what exactly causes init_window_call_params to fail?
https://bugs.winehq.org/show_bug.cgi?id=52779
--- Comment #7 from Lorenzo Ferrillo lorenzofer@live.it --- Actually part of my analysis was wrong.
It's not that init_window_call_params is returing false, it's actually completing.
However it is the fact that is being called BEFORE WH_CALLWNDPROC hook.
Maybe the hook procedure change/initialize some stuffs, and it make some of the parameters invalid (or were never valid to begin with)
In fact by adding some traces steps. It works until call_hooks( WH_CALLWNDPROC, HC_ACTION, same_thread, (LPARAM)&cwp, unicode );
But rise an exception in: dispatch_win_proc_params( params, sizeof(*params) + size );
the trace after is never printed.
Moving init_window_call_paramsafter call_hooks( WH_CALLWNDPROC seems to solve this exception
https://bugs.winehq.org/show_bug.cgi?id=52779
Lorenzo Ferrillo lorenzofer@live.it changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
https://bugs.winehq.org/show_bug.cgi?id=52779
Jacek Caban jacek@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED Fixed by SHA1| |5075c31ed00b09f9bc0cbea9d94 | |0557e170eb17f
--- Comment #8 from Jacek Caban jacek@codeweavers.com --- This should be fixed in git: https://gitlab.winehq.org/wine/wine/-/commit/5075c31ed00b09f9bc0cbea9d940557...
Thanks for the report.
https://bugs.winehq.org/show_bug.cgi?id=52779
--- Comment #9 from Lorenzo Ferrillo lorenzofer@live.it --- Thanks, I didn't have much time to try to upstream it myself, expecially the test writing part.
https://bugs.winehq.org/show_bug.cgi?id=52779
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #10 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 8.0-rc2.