{"record":{"id":"cd883ac8a5fcc5f0","repo":"babalae/better-genshin-impact","slug":"bvflow-i-1-step-description","errorCode":null,"errorMessage":"BvFlow 第 {i + 1} 步执行失败：{step.Description}","messagePattern":"BvFlow 第 (.+?) 步执行失败：(.+?)","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"critical","filePath":"BetterGenshinImpact/Core/BgiVision/BvFlow.cs","lineNumber":249,"sourceCode":"            for (var i = 0; i < steps.Length; i++)\n            {\n                var step = steps[i];\n                try\n                {\n                    _services.ThrowIfCancellationRequested();\n                    await step.Action(context);\n                }\n                catch (OperationCanceledException)\n                {\n                    throw;\n                }\n                catch (NormalEndException)\n                {\n                    throw;\n                }\n                catch (Exception ex)\n                {\n                    throw new InvalidOperationException($\"BvFlow 第 {i + 1} 步执行失败：{step.Description}\", ex);\n                }\n            }\n\n            return _page;\n        }\n        finally\n        {\n            Volatile.Write(ref _isRunning, 0);\n        }\n    }\n\n    internal BvFlow AddActionStep(BvFlowActionSnapshot snapshot)\n    {\n        return AddStep(snapshot.Description, context => ExecuteActionStep(snapshot, context));\n    }\n\n    internal BvFlow AddOnceActionStep(string description, Func<BvFlowExecutionContext, Task> action)\n    {","sourceCodeStart":231,"sourceCodeEnd":267,"githubUrl":"https://github.com/babalae/better-genshin-impact/blob/a7cb36712dcb409be610257d877fcea3597e9d6b/BetterGenshinImpact/Core/BgiVision/BvFlow.cs#L231-L267","documentation":"Thrown when the MsRdpClient10 ActiveX control's AdvancedSettings7 property returns null. AdvancedSettings7 is the IMsRdpClientAdvancedSettings8 interface that exposes RDPPort, CredSSP support, Windows-key passthrough, and SmartSizing. A null return means the control instantiated but the advanced-settings interface at version 7 is not available — indicating either an incompatible/older RDP client version or the COM object being in an invalid state.","triggerScenarios":"Called in ConnectToChildSession after configuring SecuredSettings2, when GetComProperty(client, \"AdvancedSettings7\") returns null. Happens when the registered mstscax.dll is too old to expose the AdvancedSettings7 dispatch ID, or when the ActiveX object entered an error state during earlier property sets.","commonSituations":"Down-level Windows (7/8/Server 2008 R2) with only AdvancedSettings through AdvancedSettings5, partially failed earlier SetComProperty calls leaving the control in a bad state, or a sandboxed/locked-down environment where COM registration is incomplete.","solutions":["Check the Windows / RDP client version; AdvancedSettings7 requires RDP client 8.0+ on Windows 10.","Register the latest mstscax.dll or install the latest RDP client update (KB).","Gracefully degrade: try AdvancedSettings6, then AdvancedSettings5, setting only the properties each version supports.","Inspect earlier RunComStep calls for silent failures that may have corrupted control state."],"exampleFix":"// before\nvar advancedSettings = GetComProperty(client, \"AdvancedSettings7\")\n    ?? throw new COMException(\"RDP ActiveX 未返回 AdvancedSettings7。\");\n\n// after — cascade through available versions\nvar advancedSettings = GetComProperty(client, \"AdvancedSettings7\")\n    ?? GetComProperty(client, \"AdvancedSettings6\")\n    ?? GetComProperty(client, \"AdvancedSettings5\");\nif (advancedSettings is null)\n    throw new COMException(\"RDP ActiveX 未返回任何 AdvancedSettings 接口。\");","handlingStrategy":"type-guard","validationCode":"// Probe the highest available AdvancedSettings version before use\nvar advancedSettings = GetComProperty(client, \"AdvancedSettings7\")\n    ?? GetComProperty(client, \"AdvancedSettings6\")\n    ?? GetComProperty(client, \"AdvancedSettings5\");\nif (advancedSettings is null) { /* disable advanced features */ }","typeGuard":"static bool SupportsAdvancedSettings7(object client) =>\n    GetComProperty(client, \"AdvancedSettings7\") is not null;","tryCatchPattern":"try { /* connect with AdvancedSettings7 */ }\ncatch (COMException ex) when (ex.Message.Contains(\"AdvancedSettings7\"))\n{\n    // fall back to AdvancedSettings5, skip unsupported properties\n}","preventionTips":["Check RDP client version (mstsc /version) during setup; require 8.0+.","Gracefully degrade through AdvancedSettings7→6→5 for older installations.","Log the installed mstscax.dll version for remote diagnosis."],"tags":["rdp","com","activex","child-session","windows"],"backgroundTag":null,"analyzedSha":"a7cb36712dcb409be610257d877fcea3597e9d6b","analyzedAt":"2026-08-13T16:44:57.548Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}