babalae/better-genshin-impact · error · RetryException
打开大地图失败,请检查按键绑定中「打开地图」按键设置是否和原神游戏中一致!
Error message
打开大地图失败,请检查按键绑定中「打开地图」按键设置是否和原神游戏中一致!
What it means
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.
Source
Thrown at BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs:1148
private (double clickX, double clickY) ConvertToGameRegionPosition(string mapName, Rect bigMapInAllMapRect, double x, double y)
{
var map = MapManager.GetMap(mapName, _mapMatchingMethod);
var (picX, picY) = map.ConvertGenshinMapCoordinatesToImageCoordinates(new Point2f((float)x, (float)y));
var picRect = map.ConvertGenshinMapCoordinatesToImageCoordinates(bigMapInAllMapRect);
var clickX = (picX - picRect.X) / picRect.Width * _captureRect.Width;
var clickY = (picY - picRect.Y) / picRect.Height * _captureRect.Height;
return (clickX, clickY);
}
public async Task CheckInBigMapUi(string? mapName = null)
{
// 尝试打开地图失败后,先回到主界面后再次尝试打开地图
if (!await TryToOpenBigMapUi(mapName))
{
await new ReturnMainUiTask().Start(ct);
if (!await TryToOpenBigMapUi(mapName))
{
throw new RetryException("打开大地图失败,请检查按键绑定中「打开地图」按键设置是否和原神游戏中一致!");
}
}
}
/// <summary>
/// 尝试打开地图界面
/// </summary>
private async Task<bool> TryToOpenBigMapUi(string? mapName)
{
if (IsInBigMapUi())
{
return true;
}
Simulation.SendInput.SimulateAction(GIActions.OpenMap);
return await WaitForBigMapUiAppear(GetBigMapOpenTimeoutMilliseconds(mapName));
}
View on GitHub (pinned to a7cb36712d)
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.
Defensive patterns
Strategy: validation
Validate before calling
// before opening the map, verify the configured key matches the user's binding
if (!TaskContext.Instance().Config.TryGetHotkey("打开地图", out _))
return Result.Fail("未配置「打开地图」按键,请在设置中绑定"); Try / catch
try { await CheckInBigMapUi(mapName); }
catch (RetryException e) when (e.Message.Contains("打开地图"))
{ /* surface a settings prompt to rebind the map key, do not silent-retry */ } Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
AI-assisted analysis of babalae/better-genshin-impact@a7cb36712d (2026-08-13).
Data as JSON: /api/errors/ce55b78c9a198e6f.
Report an issue: GitHub.