lhmouse/mcfgthread

In Wine 3.0 `NtWaitForKeyedEvent()` does not accept null handles

lhmouse opened this issue · 4 comments

... in which case it fails with 0xc0000008 (STATUS_INVALID_HANDLE).

On Windows 7 if the handle is null, the global keyed event with the name \KernelObjects\CritSecOutOfMemoryEvent is used. Since this is not the case for Wine, a handle has to be opened explicitly at lease once per process. It must not be closed thereafter, unless as a result of process exit of course.

This is contingent on the opinion of Wine people on https://bugs.winehq.org/show_bug.cgi?id=44620.

gverm commented

@lhmouse I also wrote this in the bug report, but thought it might be good to post it here too.

This seems to be fixed by: https://source.winehq.org/git/wine.git/commit/a0050be13f77d364609306efb815ff8502e332ee

At least the testcase attached to that bug works now, could you test if it fixes this issue too?

@gverm Thank you I will keep an eye on this. I don't build Wine myself so I have to wait for an unstable development version available from winehq.

I can confirm this has been fixed on the following version:

lh_mouse@lhmouse-ideapad ~/GitHub/mcfgthread/.build_x86_64_debug $ aptitude show winehq-devel 
Package: winehq-devel                    
Version: 3.19.0~bionic
New: yes
State: installed
Automatically installed: no
Priority: optional
Section: otherosfs
Maintainer: WineHQ Builds <webmaster@fds-team.de>
Architecture: amd64
Uncompressed Size: 73.7 k
Depends: wine-devel (= 3.19.0~bionic)
Conflicts: wine, wine-amd64, wine-i386, wine:i386, wine-i386:i386, winehq-devel:i386
Replaces: wine, wine-amd64, wine-i386, wine1.4, wine1.4-amd64, wine1.4-i386, wine1.5, wine1.5-amd64, wine1.5-i386, wine1.6, wine1.6-amd64, wine1.6-i386, wine1.7, wine1.7-amd64, wine1.7-i386, wine32, wine64,
          wine:i386, wine-i386:i386, wine1.4:i386, wine1.4-i386:i386, wine1.5:i386, wine1.5-i386:i386, wine1.6:i386, wine1.6-i386:i386, wine1.7:i386, wine1.7-i386:i386, wine32:i386
Provides: wine, wine-amd64, wine-i386, wine1.4, wine1.4-amd64, wine1.4-i386, wine1.5, wine1.5-amd64, wine1.5-i386, wine1.6, wine1.6-amd64, wine1.6-i386, wine1.7, wine1.7-amd64, wine1.7-i386, wine32, wine64
Description: WINE Is Not An Emulator - runs MS Windows programs
 Wine is a program which allows running Microsoft Windows programs (including DOS, Windows 3.x and Win32 executables) on Unix. 
 
 This compatibility package allows to use wine-devel system-wide as the default Wine version.

Thanks for your work!