Skip to content

thcrap_loader hangs on Wine #251

@tactikauan

Description

@tactikauan

The thcrap_loader process keeps running after closing the game on Wine. The issue is present since the 2023-08-17 release and affects all versions of Wine/Proton.

From my debugging, this thread seems to get stuck:

HANDLE hWrapperUpdateThread = CreateThread(NULL, 0, update_wrapper_patch, &state, 0, NULL);

Looking at the function, it gets blocked on this call to ReadFile:

for (;;) {
char json_data[1024] = {};
ReadFile(hMail, json_data, sizeof(json_data), nullptr, &overlapped);
DWORD signal = WaitForMultipleObjects(3, handles, FALSE, INFINITE);
json_t* json_data_ = json_loads(json_data, 0, nullptr);

Apparently Wine doesn't support async reads on mailslots.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions