thpatch / thpatch/thcrap

thcrap_loader hangs on Wine

Open
#251 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Wine
Dominant language
C++
Stars
766
Forks
51
Avg merge
16d 14h
Merged PRs (30d)
1

Description

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:

https://github.com/thpatch/thcrap/blob/bc6d09f301ed7da20336b7974911a7b03fee4ae5/thcrap_update/src/loader_update.cpp#L712

Looking at the function, it gets blocked on this call to ReadFile:
https://github.com/thpatch/thcrap/blob/bc6d09f301ed7da20336b7974911a7b03fee4ae5/thcrap_update/src/loader_update.cpp#L600-L604

Apparently Wine doesn't support async reads on mailslots.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in thcrap_update/src/loader_update.cpp at the referenced thread and ReadFile locations, then reproduce the shutdown behavior under Wine or Proton. Investigate the mailslot read path and verify that thcrap_loader exits after the game closes without hanging.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.