{"record":{"id":"ce55b78c9a198e6f","repo":"babalae/better-genshin-impact","slug":"error-ce55b7","errorCode":null,"errorMessage":"打开大地图失败，请检查按键绑定中「打开地图」按键设置是否和原神游戏中一致！","messagePattern":"打开大地图失败，请检查按键绑定中「打开地图」按键设置是否和原神游戏中一致！","errorType":"exception","errorClass":"RetryException","httpStatus":null,"severity":"error","filePath":"BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs","lineNumber":1148,"sourceCode":"    private (double clickX, double clickY) ConvertToGameRegionPosition(string mapName, Rect bigMapInAllMapRect, double x, double y)\n    {\n        var map = MapManager.GetMap(mapName, _mapMatchingMethod);\n        var (picX, picY) = map.ConvertGenshinMapCoordinatesToImageCoordinates(new Point2f((float)x, (float)y));\n        var picRect = map.ConvertGenshinMapCoordinatesToImageCoordinates(bigMapInAllMapRect);\n        var clickX = (picX - picRect.X) / picRect.Width * _captureRect.Width;\n        var clickY = (picY - picRect.Y) / picRect.Height * _captureRect.Height;\n        return (clickX, clickY);\n    }\n\n    public async Task CheckInBigMapUi(string? mapName = null)\n    {\n        // 尝试打开地图失败后，先回到主界面后再次尝试打开地图\n        if (!await TryToOpenBigMapUi(mapName))\n        {\n            await new ReturnMainUiTask().Start(ct);\n            if (!await TryToOpenBigMapUi(mapName))\n            {\n                throw new RetryException(\"打开大地图失败，请检查按键绑定中「打开地图」按键设置是否和原神游戏中一致！\");\n            }\n        }\n    }\n\n    /// <summary>\n    /// 尝试打开地图界面\n    /// </summary>\n    private async Task<bool> TryToOpenBigMapUi(string? mapName)\n    {\n        if (IsInBigMapUi())\n        {\n            return true;\n        }\n\n        Simulation.SendInput.SimulateAction(GIActions.OpenMap);\n        return await WaitForBigMapUiAppear(GetBigMapOpenTimeoutMilliseconds(mapName));\n    }\n","sourceCodeStart":1130,"sourceCodeEnd":1166,"githubUrl":"https://github.com/babalae/better-genshin-impact/blob/a7cb36712dcb409be610257d877fcea3597e9d6b/BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs#L1130-L1166","documentation":"RetryException from CheckInBigMapUi when TryToOpenBigMapUi returns false twice — once directly and once after a ReturnMainUiTask reset. TryToOpenBigMapUi presses the configured 'open map' hotkey then polls IsInBigMapUi; if the big map never appears, the key binding is assumed to mismatch Genshin's in-game setting.","triggerScenarios":"The configured '打开地图' (open map) key in BGI's key-binding settings differs from the actual Genshin binding (default 'M'); SendInput not reaching the game; map opens but IsInBigMapUi's template fails to recognize it (resolution/HDR); the game was not on the main UI so the hotkey did nothing.","commonSituations":"User remapped the map key in Genshin but not in BGI settings; non-default keyboard layout; game window without focus; HDR/capture desync breaking the big-map detection template.","solutions":["Open BGI settings → key bindings and set '打开地图' to match your in-game Genshin key (default M).","Ensure Genshin has foreground focus when the task runs.","Run at 1920x1080 so IsInBigMapUi reliably detects the open map.","Manually open the map once to confirm the binding, then retry the task.","If using a non-Latin keyboard layout, switch to one where the configured virtual key is reachable."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// before opening the map, verify the configured key matches the user's binding\nif (!TaskContext.Instance().Config.TryGetHotkey(\"打开地图\", out _))\n    return Result.Fail(\"未配置「打开地图」按键，请在设置中绑定\");","typeGuard":null,"tryCatchPattern":"try { await CheckInBigMapUi(mapName); }\ncatch (RetryException e) when (e.Message.Contains(\"打开地图\"))\n{ /* surface a settings prompt to rebind the map key, do not silent-retry */ }","preventionTips":["Mirror Genshin's map key (default M) in BGI key-binding settings.","Ensure Genshin has foreground focus before sending the hotkey.","Run at 1920x1080 so IsInBigMapUi detection is reliable."],"tags":["big-map","key-binding","input-injection","settings","ui-state"],"backgroundTag":null,"analyzedSha":"a7cb36712dcb409be610257d877fcea3597e9d6b","analyzedAt":"2026-08-13T16:44:57.548Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}