https://bugs.winehq.org/show_bug.cgi?id=51564
Bug ID: 51564 Summary: Can't run winevdm Product: Wine Version: 6.14 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: dos Assignee: wine-bugs@winehq.org Reporter: uleysky@gmail.com Distribution: ---
Win16 applications, COM files does'nt start with error:
018c:err:module:import_dll Loading library krnl386.exe16 (which is needed by L"C:\windows\syswow64\winevdm.exe") failed (error c0000131).
018c:err:module:LdrInitializeThunk Importing dlls for L"C:\windows\syswow64\winevdm.exe" failed, status c0000135
wine "C:\windows\syswow64\winevdm.exe" gives the same error.
Wine version 6.14, 6.0.1 works fine.
https://bugs.winehq.org/show_bug.cgi?id=51564
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
--- Comment #1 from Fabian Maurer dark.shadow4@web.de --- Could you link an application to test with?
wine "C:\windows\syswow64\winevdm.exe" works fine for me.
https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #2 from Michael Uleysky uleysky@gmail.com --- Any DOS executable. Stars! game as example of win16 executable.
https://bugs.winehq.org/show_bug.cgi?id=51564
Michael McGuire spoon0042@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |spoon0042@hotmail.com
--- Comment #3 from Michael McGuire spoon0042@hotmail.com --- fwiw there's two forums threads with this same error but I didn't get a response from the op for either. Plus one on gentoo forums with no response.
https://forum.winehq.org/viewtopic.php?f=8&t=35476 https://forum.winehq.org/viewtopic.php?f=8&t=35349 https://forums.gentoo.org/viewtopic-p-8639854.html
In the gentoo post I see they have -mingw in their USE flags, perhaps that's relevant.
https://bugs.winehq.org/show_bug.cgi?id=51564
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression
--- Comment #4 from Fabian Maurer dark.shadow4@web.de --- AFAIK this is due to commit f304b2ae23bb537029fe51983f060f680de66a12 Author: Zhiyi Zhang zzhang@codeweavers.com Date: Fri Jun 11 10:05:33 2021 +0800
winevdm: Enable visual styles.
Can you confirm?
https://bugs.winehq.org/show_bug.cgi?id=51564
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |51570
https://bugs.winehq.org/show_bug.cgi?id=51564
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |win16
https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #5 from Michael Uleysky uleysky@gmail.com --- No. For me the offending commit was commit bb065801a693e1cd305d2a507c206f1b21a142d3 Author: Alexandre Julliard julliard@winehq.org Date: Tue Mar 30 10:12:07 2021 +0200
ntdll: Map the builtin or fake dll from the Wine dirs if it's missing from the prefix.
Signed-off-by: Alexandre Julliard julliard@winehq.org
Version bb065801a693e1cd305d2a507c206f1b21a142d3^ works.
Unfortunately, it is not possible to remove this commit from history for version 6.14 to see if the bug goes away.
https://bugs.winehq.org/show_bug.cgi?id=51564
Damjan Jovanovic damjan.jov@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |damjan.jov@gmail.com
--- Comment #6 from Damjan Jovanovic damjan.jov@gmail.com --- (In reply to Michael Uleysky from comment #5)
No. For me the offending commit was commit bb065801a693e1cd305d2a507c206f1b21a142d3 Author: Alexandre Julliard julliard@winehq.org Date: Tue Mar 30 10:12:07 2021 +0200
ntdll: Map the builtin or fake dll from the Wine dirs if it's missing
from the prefix.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Version bb065801a693e1cd305d2a507c206f1b21a142d3^ works.
Unfortunately, it is not possible to remove this commit from history for version 6.14 to see if the bug goes away.
This commit is also one of the commits causing the regression in bug 51345.
https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #7 from Fabian Maurer dark.shadow4@web.de --- Are you building with or without mingw? Because when building without mingw I get the same error as you.
https://bugs.winehq.org/show_bug.cgi?id=51564
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Regression SHA1| |bb065801a693e1cd305d2a507c2 | |06f1b21a142d3 Ever confirmed|0 |1
--- Comment #8 from Fabian Maurer dark.shadow4@web.de --- I made a new bug to track the visual style issue: bug 51583.
Lets' make this about commit bb065801a693e1cd305d2a507c206f1b21a142d3
https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #9 from Michael Uleysky uleysky@gmail.com --- (In reply to Fabian Maurer from comment #7)
Are you building with or without mingw? Because when building without mingw I get the same error as you.
Without
https://bugs.winehq.org/show_bug.cgi?id=51564
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |51624
https://bugs.winehq.org/show_bug.cgi?id=51564
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mmikeinsantarosa@gmail.com
--- Comment #10 from Fabian Maurer dark.shadow4@web.de --- *** Bug 51705 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=51564
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Can't run winevdm |Can't run 16bit programs | |when built without mingw
https://bugs.winehq.org/show_bug.cgi?id=51564
O. Nykyforchyn oleh.nyk@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |oleh.nyk@gmail.com
--- Comment #11 from O. Nykyforchyn oleh.nyk@gmail.com --- Created attachment 70728 --> https://bugs.winehq.org/attachment.cgi?id=70728 Patch to NTDLL and Wineserver
https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #12 from O. Nykyforchyn oleh.nyk@gmail.com --- I am also affected by this bug, it makes it impossible to use old but nice 16-bit WinEdt 1.41e with TeXLive on Linux. After some digging in the latest wine-6.18 sources I found out the cause of the problem. After the above mentioned commit for launching 16 bit modules Wine in ntdll uses find_builtin_without_file -> open_dll_file -> NtCreateSection, which makes a request ( create_mapping ) to wineserver, which in turn fails with STATUS_INVALID_IMAGE_WIN_16 and returns no mapping.
Hence I made some changes to ntdll and a bit to wineserver to provide a partial solution. Now wineserver still issues STATUS_INVALID_IMAGE_WIN_16 but returns a fake (almost zeroed) mapping with WineFakeDll flag if fake 16 bit dll is found. Upon this open_dll_file stops search and replaces STATUS_INVALID_IMAGE_WIN_16 with STATUS_INVALID_IMAGE_NOT_MZ that asks to try .so library instead. It its path "-windows", if found, is replaced with "-unix", ".so" is appended, so real library is loaded instead of fake 16 bit one.
All this is in unix-16bit.patch against wine-6.18 source, hope it applies cleanly also to git wine sources.
I am not sure whether it is a proper fix, but at least WinEdt.exe starts now. Unfortunately, all checkboxes in configuration dialogs are dead (empty and not responding), and text input field is black instead of white with text in strange colors and displaced randomly. I would be grateful for a hint whether it connected with this bug or the cause is somewhere else.
Probably the attached patch, if does not solve the problem, can be a step in right direction. It could be interesting to try it with other apps. If it helps, I could polish it and submit to Wine developers.
https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #13 from Michael Uleysky uleysky@gmail.com --- The patch seems to be working.
https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #14 from Mike Purtell mmikeinsantarosa@gmail.com --- if the patch was included in wine-staging-6.19, it did not solve the problem.
https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #15 from O. Nykyforchyn oleh.nyk@gmail.com --- (In reply to Mike Purtell from comment #14)
if the patch was included in wine-staging-6.19, it did not solve the problem.
With what application did You test this and what happened?
https://bugs.winehq.org/show_bug.cgi?id=51564
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|dos |-unknown CC| |z.figura12@gmail.com
--- Comment #16 from Zebediah Figura z.figura12@gmail.com --- No, the patch was not included in wine nor wine-staging.
https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #17 from Mike Purtell mmikeinsantarosa@gmail.com --- (In reply to O. Nykyforchyn from comment #15)
(In reply to Mike Purtell from comment #14)
if the patch was included in wine-staging-6.19, it did not solve the problem.
With what application did You test this and what happened?
cardfile.exe. details are explained in my original bug submitted @ https://bugs.winehq.org/show_bug.cgi?id=51705
https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #18 from O. Nykyforchyn oleh.nyk@gmail.com --- Patches submitted to wine-devel:
https://source.winehq.org/patches/data/217227 https://source.winehq.org/patches/data/217228
https://bugs.winehq.org/show_bug.cgi?id=51564
Julian Rüger jr98@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jr98@gmx.net
https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #19 from O. Nykyforchyn oleh.nyk@gmail.com --- Those two patches seemed to be way too radical :) so I submitted two more discreet, with only minimal changes:
https://source.winehq.org/patches/data/217275 https://source.winehq.org/patches/data/217276
The same is attached in one patch, for convenience of potential testers. It is against wine-6.19, but applies cleanly to wine-git.
I also run 16 bit editor WinEdt under both unpatched and patched Wine, and parts of a log for the patched version with WINEDEBUG=+module,+process is attached (most lines unrelated to 16 bit are cut out). Observe that krnl386.exe16.so is found in its real location and loaded, as well as other 16 bit modules.
For vanilla Wine there is simply:
0104:trace:module:load_dll looking for L"krnl386.exe16" in (null) 0104:warn:module:load_dll Failed to load module L"krnl386.exe16"; status=c0000131 0104:err:module:import_dll Loading library krnl386.exe16 (which is needed by L"C:\windows\syswow64\winevdm.exe") failed (error c0000131).
https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #20 from O. Nykyforchyn oleh.nyk@gmail.com --- Created attachment 70819 --> https://bugs.winehq.org/attachment.cgi?id=70819 Log of winedt.exe under wine-6.19 patched
https://bugs.winehq.org/show_bug.cgi?id=51564
O. Nykyforchyn oleh.nyk@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #70728|0 |1 is obsolete| |
--- Comment #21 from O. Nykyforchyn oleh.nyk@gmail.com --- Created attachment 70820 --> https://bugs.winehq.org/attachment.cgi?id=70820 Patch to NTDLL and Wineserver
https://bugs.winehq.org/show_bug.cgi?id=51564
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |5a8f7d1f745d3fb8fd48d577103 | |ac5068d3c1746 Resolution|--- |FIXED Status|NEW |RESOLVED
--- Comment #22 from Alexandre Julliard julliard@winehq.org --- This should be fixed by 5a8f7d1f745d3fb8fd48d577103ac5068d3c1746.
https://bugs.winehq.org/show_bug.cgi?id=51564
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #23 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.20.
https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #24 from Mike Purtell mmikeinsantarosa@gmail.com --- (In reply to O. Nykyforchyn from comment #12)
I am also affected by this bug, it makes it impossible to use old but nice 16-bit WinEdt 1.41e with TeXLive on Linux. After some digging in the latest wine-6.18 sources I found out the cause of the problem. After the above mentioned commit for launching 16 bit modules Wine in ntdll uses find_builtin_without_file -> open_dll_file -> NtCreateSection, which makes a request ( create_mapping ) to wineserver, which in turn fails with STATUS_INVALID_IMAGE_WIN_16 and returns no mapping.
Hence I made some changes to ntdll and a bit to wineserver to provide a partial solution. Now wineserver still issues STATUS_INVALID_IMAGE_WIN_16 but returns a fake (almost zeroed) mapping with WineFakeDll flag if fake 16 bit dll is found. Upon this open_dll_file stops search and replaces STATUS_INVALID_IMAGE_WIN_16 with STATUS_INVALID_IMAGE_NOT_MZ that asks to try .so library instead. It its path "-windows", if found, is replaced with "-unix", ".so" is appended, so real library is loaded instead of fake 16 bit one.
All this is in unix-16bit.patch against wine-6.18 source, hope it applies cleanly also to git wine sources.
I am not sure whether it is a proper fix, but at least WinEdt.exe starts now. Unfortunately, all checkboxes in configuration dialogs are dead (empty and not responding), and text input field is black instead of white with text in strange colors and displaced randomly. I would be grateful for a hint whether it connected with this bug or the cause is somewhere else.
Probably the attached patch, if does not solve the problem, can be a step in right direction. It could be interesting to try it with other apps. If it helps, I could polish it and submit to Wine developers.
where is unix-16bit.patch located? I'd like to try it in a build for wine-6.22
https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #25 from O. Nykyforchyn oleh.nyk@gmail.com --- (In reply to Mike Purtell from comment #24)
It was not accepted, but Alexandre Julliard has solved this other way, probably more conformant to the general line of Wine development.
Thus unix-16bit patch is superseded now, but there is another patch in the queue that solves an issue with colors and redrawing of background:
https://source.winehq.org/patches/data/218050
There is still no reaction to this patch. You could try it instead :)
where is unix-16bit.patch located? I'd like to try it in a build for wine-6.22
https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #26 from Mike Purtell mmikeinsantarosa@gmail.com --- thanks! I will reply later with my results.
https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #27 from Mike Purtell mmikeinsantarosa@gmail.com --- (In reply to Mike Purtell from comment #26)
thanks! I will reply later with my results.
All selected windows are gray and unreadable after building wine-6.22 with this patch.
https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #28 from O. Nykyforchyn oleh.nyk@gmail.com --- Which application You encountered this bug with?
(In reply to Mike Purtell from comment #27)
(In reply to Mike Purtell from comment #26)
thanks! I will reply later with my results.
All selected windows are gray and unreadable after building wine-6.22 with this patch.
I compiled wine-6.22 with this patch and see no problems with two test 16-bit apps, namely with WinEdt Tex shell and with Collins Dictionary.
https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #29 from O. Nykyforchyn oleh.nyk@gmail.com --- Created attachment 71113 --> https://bugs.winehq.org/attachment.cgi?id=71113 Screenshot of Collins Dictionary
https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #30 from O. Nykyforchyn oleh.nyk@gmail.com --- Created attachment 71114 --> https://bugs.winehq.org/attachment.cgi?id=71114 Screenshot of WinEdt 1.41e
https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #31 from Mike Purtell mmikeinsantarosa@gmail.com --- (In reply to O. Nykyforchyn from comment #30)
Created attachment 71114 [details] Screenshot of WinEdt 1.41e
Here's a goggle drive link to cardfile.exe and it's help.
https://drive.google.com/file/d/1uIJo1qtE1sQYQvgUsjiYHxBbU-ZhXehk/view?usp=s...
Would you mind try running it in your build, please?
https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #32 from O. Nykyforchyn oleh.nyk@gmail.com --- Created attachment 71115 --> https://bugs.winehq.org/attachment.cgi?id=71115 Screenshot of Cardfile.exe
(In reply to Mike Purtell from comment #31)
(In reply to O. Nykyforchyn from comment #30)
Created attachment 71114 [details] Screenshot of WinEdt 1.41e
Here's a goggle drive link to cardfile.exe and it's help.
https://drive.google.com/file/d/1uIJo1qtE1sQYQvgUsjiYHxBbU-ZhXehk/ view?usp=sharing
Would you mind try running it in your build, please?
I am afraid it is indeed not what You need. Text fields are dead, and the only thing that can be changed is a card title.
Does this behavior appear only with my patch? It would be strange...
https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #33 from Mike Purtell mmikeinsantarosa@gmail.com --- (In reply to O. Nykyforchyn from comment #32)
Created attachment 71115 [details] Screenshot of Cardfile.exe
(In reply to Mike Purtell from comment #31)
(In reply to O. Nykyforchyn from comment #30)
Created attachment 71114 [details] Screenshot of WinEdt 1.41e
Here's a goggle drive link to cardfile.exe and it's help.
https://drive.google.com/file/d/1uIJo1qtE1sQYQvgUsjiYHxBbU-ZhXehk/ view?usp=sharing
Would you mind try running it in your build, please?
I am afraid it is indeed not what You need. Text fields are dead, and the only thing that can be changed is a card title.
Does this behavior appear only with my patch? It would be strange...
The windows are blacked out with a stock wine-6.22. I have tried 6.22 rebuilds with the patch that was suggested here. I have 2 slightly different versions that I am adding as attachments.
https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #34 from Mike Purtell mmikeinsantarosa@gmail.com --- Created attachment 71127 --> https://bugs.winehq.org/attachment.cgi?id=71127 version 1 of recommended patch
minimal version
https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #35 from Mike Purtell mmikeinsantarosa@gmail.com --- Created attachment 71128 --> https://bugs.winehq.org/attachment.cgi?id=71128 version 2 of recommended patch
verbose version of the same patch
https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #36 from Mike Purtell mmikeinsantarosa@gmail.com --- maybe I've been using the wrong patch? Rebuilding 6.22 again with "Patch to NTDLL and Wineserver"
https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #37 from Mike Purtell mmikeinsantarosa@gmail.com --- This bug is marked as "Status: CLOSED FIXED". Can we continue to pursue a solution here or do I need to submit a new bug?
https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #38 from O. Nykyforchyn oleh.nyk@gmail.com --- (In reply to Mike Purtell from comment #37)
This bug is marked as "Status: CLOSED FIXED". Can we continue to pursue a solution here or do I need to submit a new bug?
I'd rather file a new one, because the original bug report states that ANY 16 bit program cannot be run at all. Now cardfile.exe starts, but there are troubles with background and/or with usability.
https://bugs.winehq.org/show_bug.cgi?id=51564
--- Comment #39 from Mike Purtell mmikeinsantarosa@gmail.com --- I will file a new bug for this specific problem.