Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"vpatch error" appears after booting up Touhou 6 #259

Open
metalglass1234 opened this issue Jun 8, 2024 · 7 comments
Open

"vpatch error" appears after booting up Touhou 6 #259

metalglass1234 opened this issue Jun 8, 2024 · 7 comments

Comments

@metalglass1234
Copy link

metalglass1234 commented Jun 8, 2024

obraz_2024-06-08_202435602
After i updated thcrap and booted up Touhou 6, this error appears which says about a "vpatch error" along with "DLL Injection". Touhou 6 also freezes after this message appears.

@brliron
Copy link
Member

brliron commented Jun 8, 2024

That's weird, because the 4 latest version have been:

  1. do something,
  2. it creates an issue with vpatch, rollback,
  3. try to fix this issue,
  4. it crashes for many people, rollback.
    So the latest version should be the same as the one from May 25th, which didn't have that vpatch issue as far as we know.

Can you open the thcrap log file (in [thcrap's directory]/logs/thcrap_log.txt), check the version number at the top, and make sure it says 2024-06-08? Btw, if it says 2024-05-29, that's the version from 1 week ago where vpatch was broken.

@metalglass1234
Copy link
Author

thcrap_log.txt
It says 2024-06-08. I've attached the thcrap_log.txt file just in case.

@brliron
Copy link
Member

brliron commented Jun 9, 2024

The version is indeed correct.

Can you send a screenshot of your Touhou 06 folder, as well as thcrap_log.1.txt?

@Eastern-Dream
Copy link

It looks like vpatch and game executable is not in the same directory based on log and screenshot path diff.

@DTM9025
Copy link

DTM9025 commented Aug 4, 2024

I think I'm getting the same issue. I'm getting this error trying to run TH06 with vpatch through thcrap. Every other game with vpatch works fine and running th06 with vpatch through locale emulator also works fine (using the vpatch package for thcrap). Doing some investigating, the issue is fixed if I remove thcrap_update.dll, which is really strange. Pressing "Run the game" from the window doesn't fix it, so something about that update window I think is causing the issue.

EDIT: Okay looking at it more indepth, it seems to be very inconsistent. Messing around with building thcrap_update.dll at previous commits somehow made everything work, even when returning to the original thcrap_update.dll so that I can't reproduce the error again, until some time has passed. I think there is something really weird and subtle going on.

Removing d3d8.dll doesn't change anything from what I can see.

Screenshot 2024-08-04 151112

Screenshot 2024-08-04 152404

thcrap_log - with update.dll and error
thcrap_log.1 - no updatedll and no error

@brliron
Copy link
Member

brliron commented Aug 5, 2024

Quick analysis of the log with an error: exception C0000005 deep inside LoadLibraryExW. There is no code from either th06 or thcrap on the stack trace. I guess the call with the exception is the one from vpatch trying to inject its dll, and that the exception is then converted to an error code when returning from LoadLibraryA.

@TechnicallyDifficult
Copy link

Also getting the same error. In my case it consistently happens in Touhou 6, 7, and 8.
thcrap_log.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants