{"record":{"id":"2cc0e7c0b20b5e42","repo":"babalae/better-genshin-impact","slug":"error-2cc0e7","errorCode":null,"errorMessage":"大地图打开失败","messagePattern":"大地图打开失败","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropTask.cs","lineNumber":2242,"sourceCode":"    private async Task FindLeyLineOutcropByBook(string country, string type)\n    {\n        await OpenLeyLineOutcropCountryInHandbook(country, type);\n\n        for (var retry = 0; retry < 3; retry++)\n        {\n            if (await TryOpenBigMapFromHandbook())\n            {\n                break;\n            }\n\n            if (retry < 2)\n            {\n                _logger.LogDebug(\"通过冒险之证打开大地图失败，重新打开冒险之证，第{Retry}次\", retry + 1);\n                await OpenLeyLineOutcropCountryInHandbook(country, type);\n            }\n            else\n            {\n                throw new Exception(\"大地图打开失败\");\n            }\n        }\n\n        var center = _tpTask.GetBigMapCenterPoint(MapTypes.Teyvat.ToString());\n        _leyLineX = center.X;\n        _leyLineY = center.Y;\n\n        await CancelTrackingInMap();\n    }\n\n    private async Task OpenLeyLineOutcropCountryInHandbook(string country, string type)\n    {\n        await _returnMainUiTask.Start(_ct);\n        await Delay(1000, _ct);\n\n        Simulation.SendInput.SimulateAction(GIActions.OpenAdventurerHandbook);\n        await Delay(2500, _ct);\n","sourceCodeStart":2224,"sourceCodeEnd":2260,"githubUrl":"https://github.com/babalae/better-genshin-impact/blob/a7cb36712dcb409be610257d877fcea3597e9d6b/BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropTask.cs#L2224-L2260","documentation":"Thrown when opening the big map via the adventurer handbook fails on all attempts. The loop opens the handbook, selects the country/type, clicks track, and calls TryOpenBigMapFromHandbook; when retry reaches the final attempt (retry >= 2) without success, it throws.","triggerScenarios":"TryOpenBigMapFromHandbook returns false across retries; on the last iteration (retry == 2) the else branch throws '大地图打开失败'.","commonSituations":"The handbook UI changed in a game update; the track-action button icon isn't found (FindHandbookTrackActionButtonByIcon returns null); clicks land on the wrong element; handbook tab not on the ley-line page.","solutions":["Update the handbook button icon templates to match the current game version.","Verify the handbook is opened on the correct tab (ley-line / challenges) before track is clicked.","Check FindHandbookTrackActionButtonByIcon recognition thresholds.","Fall back to opening the big map directly if the handbook path is unreliable."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { /* open map via handbook */ }\ncatch (Exception ex) when (ex.Message == \"大地图打开失败\")\n{\n    _logger.LogWarning(\"通过冒险之证打开大地图失败，尝试直接打开大地图\");\n    await _tpTask.OpenBigMapUi();\n}","preventionTips":["Keep handbook button icon templates current with the game version.","Provide a direct big-map-open fallback when the handbook path fails.","Verify the handbook is on the ley-line tab before clicking track."],"tags":["ui","handbook","retry","ley-line","vision-recognition"],"backgroundTag":null,"analyzedSha":"a7cb36712dcb409be610257d877fcea3597e9d6b","analyzedAt":"2026-08-13T16:44:57.548Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}