Skip to content

Fix Wine/Proton integrity violation crash in loader (MainFunctions.cpp)#5061

Open
DateFTP wants to merge 1 commit into
multitheftauto:masterfrom
DateFTP:fix/wine-integrity-violation
Open

Fix Wine/Proton integrity violation crash in loader (MainFunctions.cpp)#5061
DateFTP wants to merge 1 commit into
multitheftauto:masterfrom
DateFTP:fix/wine-integrity-violation

Conversation

@DateFTP

@DateFTP DateFTP commented Jul 16, 2026

Copy link
Copy Markdown

Fixes #4783

Problem:
Under Wine/Proton on Linux, MTA:SA crashes at startup with integrity violation error.

Additional issue: hardcoded MD5 file hash check compares system DLLs (D3DX9_42.dll, d3dcompiler_*.dll) which differ under Wine, causing false positives.

Changes in Client/loader/MainFunctions.cpp:

  1. Set MTA_UNDER_WINE environment variable before launching GTA under Wine, signaling child processes to enable compatibility mode.
  2. Skip file hash integrity check under Wine (unreliable due to different DLL versions).

Checklist

  • Your code should follow the coding guidelines.
  • Smaller pull requests are easier to review. If your pull request is beefy, your pull request should be reviewable commit-by-commit.

When running under Wine/Proton on Linux, the anticheat module
(netc.dll) detects Wine via wine_get_version in ntdll.dll and
triggers a fail-fast exception (0xC0000409). The loader
interprets this as an integrity violation and blocks startup.

Changes in Client/loader/MainFunctions.cpp:

- Set MTA_UNDER_WINE environment variable before launching GTA
  so child processes (loader-proxy, core.dll, netc.dll) can
  detect Wine and adjust behavior.

- Skip the hardcoded MD5 file hash integrity check under Wine.
  System DLLs like D3DX9_42.dll, d3dcompiler_*.dll provided by
  Wine may have different hashes, causing false positives.

This is the first step toward full Wine compatibility.
loader-proxy/main.cpp should also be updated to hide the
wine_get_version export before loading netc.dll.
@DateFTP

DateFTP commented Jul 17, 2026

Copy link
Copy Markdown
Author

What this fix is for: Linux players are facing errors when launching the client, and there is an error with a integrity violation. I am further investigating the client for any issues with launching it through Wine.

@DateFTP

DateFTP commented Jul 18, 2026

Copy link
Copy Markdown
Author

It requires a lot of research, and I started getting an error with the GTA SA process, which failed to start the process correctly during testing. I need to check the details.

@DateFTP

DateFTP commented Jul 19, 2026

Copy link
Copy Markdown
Author

I am not sending the project for merging, as the loader requires additional work.

@FileEX FileEX added the bugfix Solution to a bug of any kind label Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Solution to a bug of any kind

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Integrity Violation on Wine/Linux after Update (MainFunctions.cpp compatibility)

2 participants