Repository navigation
开着带反作弊的游戏导致开不了机时,报错说明原因和怎么办 - #225
Merged
Merged
Conversation
模拟器日志里有 WHPX: Failed to setup partition(或 create partition), hr=80070005 (拒绝访问)时,这次开机的失败不再是一句看不懂的「启动失败」: - emulator.exe 退出时仍是 launch_failed(退出码 7),消息写明 Windows 拒绝了创建 虚拟机,多半是开着带内核级反作弊的游戏或安全软件在阻止;advice 让用户先退出 带反作弊的游戏(连同它的后台服务)再开机,不用重启电脑。 - 开机等待超时、日志里也有这一行时仍是 timeout,消息和 advice 同上。 - 两种都在 error.details 里带 reason=hypervisor_access_denied,--json、管理器 HTTP 和失败任务、MCP 都能看到,AUTO-MAS 这类调用方可以显示出来、晚点再试。 错误码、退出码、protocol 不变。 - 问题包「模拟器日志」一节列出有这一行的模拟器日志。 只认 80070005:同一调用的别的 hr 值、别的 WHPX 报错、内存不足照旧。不检测、 不结束用户的游戏进程,不改系统设置。README 中英文的 reason 列表补了一条。 Refs ModAVD/ModAVD#301
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
开着带内核级反作弊的游戏(比如用 EA AntiCheat 的)时,模拟器建虚拟机那一步被 Windows 拒绝(模拟器日志里是
WHPX: Failed to setup partition, hr=80070005),以前用户只看到一句「启动失败」加日志尾巴,或者等到超时。现在报错说清是怎么回事、该怎么办,调用方也能按单独的原因判断。改了什么
WHPX: Failed to setup partition, hr=80070005(create partition也算,不分大小写,hr=0x80070005也认)。80070005是 E_ACCESSDENIED。只认这个值:同一调用的别的 hr(比如80070057)、别的 WHPX 报错(No accelerator found、set partition processor count等)都照旧,不说成反作弊。launch_failed(退出码 7),消息改成「Windows 拒绝了创建虚拟机(WHPX 返回拒绝访问,hr=80070005),多半是电脑上开着带内核级反作弊的游戏,或者安全软件在阻止」,后面照旧带退出码和日志尾巴;advice:先退出带反作弊的游戏(它的反作弊后台服务还在的话也关掉)再开机,不用重启电脑;没开这类游戏的话看看安全软件有没有拦着虚拟化。这条检查在内存不足之前。timeout(退出码 6),消息和 advice 同上。error.details里带reason: "hypervisor_access_denied"(常量errs.HypervisorAccessDenied)。--json、管理器 HTTP 响应和失败任务、MCP 的error.details行本来就带 details,所以三处都能看到;管理器卡片上显示的是新的消息和 advice。错误码、退出码、protocol 都不变,不认识这个 reason 的调用方照旧按开机失败 / 超时处理。error.details的reason说明补了一条;internal/cli/cli.go的契约注释同步。internal/i18n/locales/en/emu.json;问题包那一行照惯例是null(问题包内容不翻)。changelog.d/301-anticheat-boot.fix.md。不检测、不结束用户的游戏进程,不改系统设置;issue 里提的「认出正在运行的反作弊进程或服务、把名字带上」「文档常见问题加一条」不在这个 PR 里。
怎么验证的
gofmt -l .:无输出。go vet ./...:本机(windows)、GOOS=darwin、GOOS=linux各一次,都通过。go test ./internal/emu ./internal/report ./internal/errs ./internal/i18n ./internal/cli ./internal/mcp ./internal/ui ./internal/root -count=1 -skip TestProductionRootReadOnly:全部 ok。TestHypervisorDenied(emu):用假的模拟器日志喂进去,三种写法(setup / create、大小写、带0x)都得到launch_failed、退出码 7、reason、新消息和 advice;超时路径得到timeout、退出码 6、同样的 reason 和 advice。7 种别的日志(别的 hr 值、多一位数字、别的 WHPX 报错、内存不足、普通的 VP 退出)都不被认成这一类,超时消息保持原样;内存不足仍是insufficient_memory。TestWaitBootTimeoutHypervisorDenied(emu):真的走一遍开机等待(假的 qemu 进程扫描、假 adb),到点时带上 reason。TestCollectHypervisorDenied(report):问题包只列出有这一行的模拟器日志(logcat、别的 hr 不算),没有时不写。TestCatalog(i18n)通过。python -B -I -X utf8 scripts/repo_checks.py(REPO_CHECK_BASE设成分支起点):0 failures。没验证的
modavd start <i> --json:error.code是launch_failed(或timeout),error.details.reason是hypervisor_access_denied,message/advice是新文字;不带--json时最后几行是新消息和建议。launch_failed)还是一直等到超时(走timeout),两条路都接上了,实机是哪条没确认。80070005不知道;返回别的值的照旧是普通的开机失败。Refs ModAVD/ModAVD#301