https://bugs.winehq.org/show_bug.cgi?id=55833
Bug ID: 55833 Summary: HeidiSQL 12.5.0.6677 crashes on start since Wine 8.17 on ArchLinux Product: Wine Version: 8.17 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: comctl32 Assignee: wine-bugs@winehq.org Reporter: clemens.ml@gmx.net Distribution: ---
Created attachment 75330 --> https://bugs.winehq.org/attachment.cgi?id=75330 HeidiSQL Bug report output.
Arch Linux (latest) Starting heidisql 12.5.0.6677 vompiled with Delphi 11 on different wine versions:
wine 8.16 works fine.
wine 8.17 crashes: exception message : Access violation at address 00000002FB43949D in module 'comctl32.dll'. Write of address FFFFFFFFFE1FF500.
wine 8.18 crashes: exception message : Access violation at address 00006FFFFE13956D in module 'comctl32.dll'. Write of address FFFFFFFFFE1FF500.
Reproducable: always
I might be able to debug using gdb when I receive detailed instructions.
https://bugs.winehq.org/show_bug.cgi?id=55833
ckoller clemens.ml@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression URL| |https://www.heidisql.com/ Distribution|--- |ArchLinux CC| |clemens.ml@gmx.net
https://bugs.winehq.org/show_bug.cgi?id=55833
Alex Henrie alexhenrie24@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |a81c53504ae32715e6e91bd020f | |debd5bef20d48 Status|UNCONFIRMED |NEW Keywords| |download CC| |alexhenrie24@gmail.com URL|https://www.heidisql.com/ |https://www.heidisql.com/do | |wnloads/releases/HeidiSQL_1 | |2.5_64_Portable.zip Component|comctl32 |ntdll Ever confirmed|0 |1
--- Comment #1 from Alex Henrie alexhenrie24@gmail.com --- I can confirm. `git bisect` says:
a81c53504ae32715e6e91bd020fdebd5bef20d48 is the first bad commit commit a81c53504ae32715e6e91bd020fdebd5bef20d48 Author: Alexandre Julliard julliard@winehq.org Date: Thu Sep 28 16:30:32 2023 +0200
ntdll: Release the low address space reservation for 64-bit apps.
dlls/ntdll/unix/env.c | 2 +- dlls/ntdll/unix/server.c | 2 -- dlls/ntdll/unix/virtual.c | 11 ++++++++--- 3 files changed, 9 insertions(+), 6 deletions(-)
https://bugs.winehq.org/show_bug.cgi?id=55833
Alex Henrie alexhenrie24@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |untainsyd@gmail.com
--- Comment #2 from Alex Henrie alexhenrie24@gmail.com --- *** Bug 55846 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=55833
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
https://bugs.winehq.org/show_bug.cgi?id=55833
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|HeidiSQL 12.5.0.6677 |Multiple 64bit programs |crashes on start since Wine |crashe on start since Wine |8.17 on ArchLinux |8.17 due to memory address | |space changes (HeidiSQL | |12.5.0.6677, Falcon BMS | |4.37u3, PNGGauntlet, PLSQL | |Developer, ...)
--- Comment #3 from Fabian Maurer dark.shadow4@web.de --- Refining summary to collect duplicates.
In some cases this is proven to be a bug in the application, e.g. PNGGauntlet (bug 55908) and PLSQL Developer (bug 55761), although it doesn't happen on Windows since the upper 32bit of the pointer are always zero.
https://bugs.winehq.org/show_bug.cgi?id=55833
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |robertdejager@tutanota.com
--- Comment #4 from Fabian Maurer dark.shadow4@web.de --- *** Bug 55761 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=55833
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |NM64+bugs.winehq.org@PM.me
--- Comment #5 from Fabian Maurer dark.shadow4@web.de --- *** Bug 55908 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=55833
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |tefatronix@seznam.cz
--- Comment #6 from Fabian Maurer dark.shadow4@web.de --- *** Bug 55809 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=55833
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jkfloris@dds.nl
--- Comment #7 from Fabian Maurer dark.shadow4@web.de --- *** Bug 55783 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=55833
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |xeno@x-s.com.pl
--- Comment #8 from Fabian Maurer dark.shadow4@web.de --- *** Bug 55903 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=55833
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bugs@cometchaser.de
--- Comment #9 from Fabian Maurer dark.shadow4@web.de --- *** Bug 55703 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=55833
Zeb Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
--- Comment #10 from Zeb Figura z.figura12@gmail.com --- I don't think resolving all of those bugs as duplicates makes sense. a81c53504ae basically breaks any case where a 64-bit pointer is truncated, but that can have many different causes. I doubt all of these applications are going to be fixed in the same way.
https://bugs.winehq.org/show_bug.cgi?id=55833
--- Comment #11 from Fabian Maurer dark.shadow4@web.de --- Sorry, I thought it's useful since it all is due to suddenly having higher addresses. AFAIK usually reserved addresses got allocated first, and since that is not the case anymore different addresses get allocated. Starting to allocate the < 2G addresses first should fix those issues, no?
Anyways, please feel free to reopen the bugs if I made a mistake.
https://bugs.winehq.org/show_bug.cgi?id=55833
--- Comment #12 from Zeb Figura z.figura12@gmail.com --- (In reply to Fabian Maurer from comment #11)
Sorry, I thought it's useful since it all is due to suddenly having higher addresses. AFAIK usually reserved addresses got allocated first, and since that is not the case anymore different addresses get allocated. Starting to allocate the < 2G addresses first should fix those issues, no?
Anyways, please feel free to reopen the bugs if I made a mistake.
The problem is that at least in some cases these are Wine bugs that should be fixed. We've already encountered at least two IIRC. Simply preferring low addresses in every situation would just hide those bugs, and it's probably not the right thing to do anyway.
https://bugs.winehq.org/show_bug.cgi?id=55833
--- Comment #13 from Fabian Maurer dark.shadow4@web.de ---
The problem is that at least in some cases these are Wine bugs that should be fixed. We've already encountered at least two IIRC. Simply preferring low addresses in every situation would just hide those bugs, and it's probably not the right thing to do anyway.
Sorry, I'm not aware of those bugs being confirmed as wine bugs - but you probably know more than me. Should I just undo the duping then?
https://bugs.winehq.org/show_bug.cgi?id=55833
--- Comment #14 from Zeb Figura z.figura12@gmail.com --- (In reply to Fabian Maurer from comment #13)
The problem is that at least in some cases these are Wine bugs that should be fixed. We've already encountered at least two IIRC. Simply preferring low addresses in every situation would just hide those bugs, and it's probably not the right thing to do anyway.
Sorry, I'm not aware of those bugs being confirmed as wine bugs - but you probably know more than me. Should I just undo the duping then?
Well, bug 55696 was a Wine bug. I thought there were other examples, but there's just bug 55674 (which is a bit of a special case) and then a handful of bugs in the Wine tests themselves. The point probably still stands, though; we probably want to fully debug all of these to confirm they're application bugs before we change how virtual memory is allocated by default.
https://bugs.winehq.org/show_bug.cgi?id=55833
Bernhard Übelacker bernhardu@mailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bernhardu@mailbox.org
--- Comment #15 from Bernhard Übelacker bernhardu@mailbox.org --- Created attachment 75535 --> https://bugs.winehq.org/attachment.cgi?id=75535 test.cpp for testing high-entropy-va, with some results inside.
Could be the key another "OPTIONAL HEADER VALUE" / DllCharacteristics?
I found a test program with "High Entropy Virtual Addresses" enabled seems to behave different on windows than one with it disabled. (cl option /HIGHENTROPYVA)
Mingw side shows this as "HIGH_ENTROPY_VA". (gcc option -Wl,--high-entropy-va)
Attached test program shows a few example outputs. And at least the executables from #55809 and #55761 do not show "HIGH_ENTROPY_VA", therefore they seem to get the low addresses in windows.
https://bugs.winehq.org/show_bug.cgi?id=55833
tuxway+wine@posteo.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |tuxway+wine@posteo.de
--- Comment #16 from tuxway+wine@posteo.de --- I can confirm this issue with the game: Mafia: Definite Edition
Git bisect: a81c53504ae32715e6e91bd020fdebd5bef20d48 is the first bad commit
https://bugs.winehq.org/show_bug.cgi?id=55833
--- Comment #17 from Bernhard Übelacker bernhardu@mailbox.org --- A commit to modify behaviour based on HIGH_ENTROPY_VA dll characteristics got committed: https://source.winehq.org/git/wine.git/commitdiff/f03c3a167c2e4abe92b1e1bf2e...
Please re-check applications if they are working again with wine-9.0-rc1.
https://bugs.winehq.org/show_bug.cgi?id=55833
--- Comment #18 from tuxway+wine@posteo.de --- Thanks for the hint!
Tested with wine-9.0-rc1. Seems to not fix the issue for Mafia: Definite Edition unfortunately.
https://bugs.winehq.org/show_bug.cgi?id=55833
--- Comment #19 from Bernhard Übelacker bernhardu@mailbox.org --- (In reply to tuxway+wine from comment #18)
Tested with wine-9.0-rc1. Seems to not fix the issue for Mafia: Definite Edition unfortunately.
Thats bad to hear. To continue with this game, would it be possible to test if applying f03c3a16 on top of e.g. wine-8.17 still shows the issue? If this works, go through wine versions that way, until it breaks even with f03c3a16.
At least f03c3a16 does fix the crash for: - PLSQL Developer (55761) - FEMM42 (55809).
https://bugs.winehq.org/show_bug.cgi?id=55833
--- Comment #20 from tuxway+wine@posteo.de --- Same result with wine-8.17 and applied f03c3a167c2e4abe92b1e1bf2ea5f7c31a07fc3b.
I can also confirm that 'free_reserved_memory( 0, (char *)0x7ffe0000 );' was reached.
https://bugs.winehq.org/show_bug.cgi?id=55833
--- Comment #21 from Fabian Maurer dark.shadow4@web.de --- Quite a few bugs were fixed by f03c3a167c2e4abe92b1e1bf2ea5f7c31a07fc3b. I changed them to fixed since the dupe collection wasn't a good idea to begin with.
https://bugs.winehq.org/show_bug.cgi?id=55833
--- Comment #22 from tuxway+wine@posteo.de --- Created attachment 75608 --> https://bugs.winehq.org/attachment.cgi?id=75608 Check all required options for HIGHENTROPYVA
I've read in https://learn.microsoft.com/en-us/cpp/build/reference/highentropyva?view=msv... that for HIGHENTROPYVA also DYNAMICBASE and LARGEADDRESSAWARE are required.
They should be enabled by default for x64 images, but I've tried to add checks for them as well.
Not sure whether this is needed or sensible at all. At least this seems to prevent the issue for Mafia: Definite Edition with wine-9.0-rc1.
https://bugs.winehq.org/show_bug.cgi?id=55833
--- Comment #23 from stefan bugs@cometchaser.de --- Hi,
the developer of AstroArt (see https://bugs.winehq.org/show_bug.cgi?id=55833)
wrote to me:
it was inside a component (not written by me) which is used also in other software.
He will send me a fix to avoid this problem.
https://bugs.winehq.org/show_bug.cgi?id=55833
--- Comment #24 from tuxway+wine@posteo.de --- Created attachment 75619 --> https://bugs.winehq.org/attachment.cgi?id=75619 02 - Check all required options for HIGHENTROPYVA - fix indentation
Fix indentation
https://bugs.winehq.org/show_bug.cgi?id=55833
--- Comment #25 from Fabian Maurer dark.shadow4@web.de ---
Not sure whether this is needed or sensible at all. At least this seems to prevent the issue for Mafia: Definite Edition with wine-9.0-rc1.
That sound weird, would mean the docs are wrong here?
https://bugs.winehq.org/show_bug.cgi?id=55833
--- Comment #26 from tuxway+wine@posteo.de --- (In reply to Fabian Maurer from comment #25)
That sound weird, would mean the docs are wrong here?
Maybe only some calls are 'problematic'?
For testing I've added a debug WARN log near the 'free_reserved_memory' invocation.
Looked like this function is called multiple times even with my applied patch.
https://bugs.winehq.org/show_bug.cgi?id=55833
--- Comment #27 from Bernhard Übelacker bernhardu@mailbox.org --- (In reply to tuxway+wine from comment #26)
Looked like this function is called multiple times even with my applied patch.
Startup of an wine application includes start of wineserver and several other processes like winedevice.exe or explorer.exe. These might cross this WARN line too.
I guess common practice is to start in one terminal window all the wine infrasturcture processes by e.g. "wine notepad", and then in another terminal just the interesting process. To better distinguish better it mith also be helpful to start with WINEDEBUG=+pid. Then the first part of the logging lines show the PID.
https://bugs.winehq.org/show_bug.cgi?id=55833
NM64+bugs.winehq.org@PM.me changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|NM64+bugs.winehq.org@PM.me |
https://bugs.winehq.org/show_bug.cgi?id=55833
--- Comment #28 from tuxway+wine@posteo.de --- (In reply to Bernhard Übelacker from comment #27)
Startup of an wine application includes start of wineserver and several other processes like winedevice.exe or explorer.exe. These might cross this WARN line too.
I guess common practice is to start in one terminal window all the wine infrasturcture processes by e.g. "wine notepad", and then in another terminal just the interesting process. To better distinguish better it mith also be helpful to start with WINEDEBUG=+pid. Then the first part of the logging lines show the PID.
Thanks for the hints! You're right, the calls seem to come from other processes, but not from the actual game executable.
So this might indicate that the functionality works in general, but the Mafia: Definite Edition exe may not fulfil the other image characteristics.
I've restored the behavior of wine-9.0-rc1 and enhance the logging to show the exe characteristics.
Turned out that the game exe is missing the DYNAMICBASE characteristic.
According to https://learn.microsoft.com/en-us/cpp/build/reference/dynamicbase?view=msvc-..., this is enabled by default, but may was disabled by the developer to avoid random rebase of address space?
Since this characteristic is required by HIGHENTROPYVA, it might makes sense to also check for its presence?
https://bugs.winehq.org/show_bug.cgi?id=55833
--- Comment #29 from tuxway+wine@posteo.de --- Created attachment 75634 --> https://bugs.winehq.org/attachment.cgi?id=75634 Log image characteristics (LARGEADDRESSAWARE, DYNAMICBASE, HIGHENTROPYVA)
https://bugs.winehq.org/show_bug.cgi?id=55833
--- Comment #30 from tuxway+wine@posteo.de --- I've created a merge request: https://gitlab.winehq.org/wine/wine/-/merge_requests/4694
https://bugs.winehq.org/show_bug.cgi?id=55833
--- Comment #31 from Stan aka Xeno xeno@x-s.com.pl --- 9.0-rc1 patched with commit from MR 4694 seem to fix issue in FalconBMS, I hope it'll get into 9.0-rc2/final ...
https://bugs.winehq.org/show_bug.cgi?id=55833
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Multiple 64bit programs |Multiple 64bit programs |crashe on start since Wine |crash due to pointer |8.17 due to memory address |truncation (HeidiSQL |space changes (HeidiSQL |12.5.0.6677, Falcon BMS |12.5.0.6677, Falcon BMS |4.37u3, PNGGauntlet, PLSQL |4.37u3, PNGGauntlet, PLSQL |Developer, ...) |Developer, ...) |
https://bugs.winehq.org/show_bug.cgi?id=55833
--- Comment #32 from Fabian Maurer dark.shadow4@web.de --- Does https://gitlab.winehq.org/wine/wine/-/commit/7a7b82880a73e654933b7866e79f3e9... fix this?
https://bugs.winehq.org/show_bug.cgi?id=55833
Alex Henrie alexhenrie24@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |7a7b82880a73e654933b7866e79 | |f3e9a62a565ef Resolution|--- |FIXED Status|NEW |RESOLVED
--- Comment #33 from Alex Henrie alexhenrie24@gmail.com --- Yes, it appears to be fixed. Thanks Alexandre!
https://bugs.winehq.org/show_bug.cgi?id=55833
--- Comment #34 from tuxway+wine@posteo.de --- I can confirm 7a7b82880a73e654933b7866e79f3e9a62a565ef fix this as well for Mafia:Definite Edition.
Thanks!
I will close the merge request.
https://bugs.winehq.org/show_bug.cgi?id=55833
--- Comment #35 from ckoller clemens.ml@gmx.net --- Thank you so far! My conclusion is that HeidiSQL seems to crash on the following versions: wine 8.17 .. wine 8.21 and it's expected that with wine 9.0-rc1 it's fixed.
https://bugs.winehq.org/show_bug.cgi?id=55833
--- Comment #36 from stefan bugs@cometchaser.de --- AstroArt was fixed by the developer and the fixed version works also with Wine 8.17. It works also with Wine 9.0-rc1 See bug report https://bugs.winehq.org/show_bug.cgi?id=55703
Thank you, Stefan
https://bugs.winehq.org/show_bug.cgi?id=55833
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #37 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 9.0-rc2.
https://bugs.winehq.org/show_bug.cgi?id=55833
--- Comment #38 from Robert de Jager robertdejager@tutanota.com --- I can confirm that the issue with PL/SQL Developer is solved in 9.0-rc2. Thanks, everyone.