A failed Engine.ini revert forgets its record and cannot be retried
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start in clean/installer/src/wg_core/rrconfig.cpp at RevertRrConfig (about lines 352-398), where the catch block always resets m.rrconfig, then check the callers in launcher.cpp (around lines 797 and 827) and DoRestore in record.cpp (around lines 541 and 569-572). Make the revert return a bool and clear the record only on success, keeping rr-config\ on uninstall when the revert fails. Done means that, with Engine.ini held open without sharing, Off leaves m.rrconfig.present true and the backup folder in place. The issue notes it has not been reproduced, so confirm the locking behaviour first.
由索引模型根据 Issue 内容生成。
描述
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
RevertRrConfigreturn a bool. Clearm.rrconfigonly on success. - On uninstall with a failed revert, keep the record and
rr-config\(askeepBackupdoes) 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.
- 主要语言
- C++
- 星标
- 12
- 派生
- 2
- 平均合并
- 3 小时 10 分钟
- 30 天内合并 PR
- 171
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
phantoslayer21/wronggpu 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 88/100
phantoslayer21/wronggpu#275 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
phantoslayer21/wronggpu#274 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 88/100
phantoslayer21/wronggpu#241 ·
维护者通常 1 天内回复
-
bug build
难度 2/5 1-3 小时 新手友好度 74/100
phantoslayer21/wronggpu#234 ·
维护者通常 1 天内回复
-
bug build
难度 2/5 1-3 小时 新手友好度 80/100
phantoslayer21/wronggpu#233 ·
维护者通常 1 天内回复
查看 phantoslayer21/wronggpu 的全部 Issue
相似的 Issue
-
ai_p2
难度 2/5 1-3 小时 新手友好度 80/100
ClickHouse/ClickHouse#132519 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
juce-framework/JUCE#1810 ·
-
难度 1/5 1 小时以内 新手友好度 82/100
petercorke/robotics-toolbox-python#952 ·
维护者通常 1 天内回复
-
NatronRenderer: a Python error in the script (-t / project script) doesn't change the exit status未关闭func:engine type:bug
难度 2/5 1-3 小时 新手友好度 72/100
NatronGitHub/Natron#1276 ·
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复