Skip to content

A failed Engine.ini revert forgets its record and cannot be retried #72

Open

Description

@phantoslayer21

This was found by reading the code. It has not been reproduced.

What happens

RevertRrConfig (clean/installer/src/wg_core/rrconfig.cpp:352-398) catches SetupError, adds a warning, and then always runs m.rrconfig = RrConfigFix() (rrconfig.cpp:398). The callers save the cleared record (launcher.cpp:797, 827). On uninstall, DoRestore calls it (record.cpp:541) and then removes the state folder, including the rr-config\ backup (record.cpp:569-572).

After a failure the backup file is not deleted (the delete is inside the try), but the record no longer knows about it. A later "On" runs ApplyRrConfig with no fix present. It writes a new backup over the old one, taken from the file that still holds WrongGPU's line (rrconfig.cpp:322-327).

Smaller defect: SetReadOnly(file, false) runs before the write (rrconfig.cpp:369). If the write fails, the read-only attribute stays cleared even when the player had set it.

When it can happen

Unusual but innocent. Engine.ini must be held open without write sharing, or access must be denied, at the moment of Off or uninstall. Examples: a sync tool, an editor that locks files, an antivirus scan.

What is actually lost: the automatic retry and the read-only restore. The player's settings are not lost. The live Engine.ini still holds all of the player's content plus WrongGPU's one line. The backup is only used when removing the line would leave the file empty or the file has gone missing (rrconfig.cpp:375, 379-384). The warning tells the player to remove the line by hand (rrconfig.cpp:394-395). Low severity: one stray r.RayTracing… line, and perhaps a read-only flag to clear.

To do

  • Have RevertRrConfig return a bool. Clear m.rrconfig only on success.
  • On uninstall with a failed revert, keep the record and rr-config\ (as keepBackup does) and add the warning.
  • Restore the read-only attribute if the write fails.
  • Caution: a permanently broken Engine.ini path makes every later Off retry and warn. That is acceptable, and arguably correct.

Test

CPU-only. Point a fake game's documents folder at a temporary folder with an Engine.ini. Apply the fix. Hold the file open without sharing. Run Off. Assert m.rrconfig.present is still true and rr-config\ still exists.

Activity

  1. added this to the Later milestone on Nov 13, 2026
  2. added
    bug
    area: launcher
    area: ray-reconstruction
    on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: launcherarea: ray-reconstructionbug

    Type

    No type

    Projects

    • Status
      Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions