{"record":{"id":"777ebeabb7edd98e","repo":"babalae/better-genshin-impact","slug":"error-777ebe","errorCode":null,"errorMessage":"目标距离过远，可能是当前点位无法识别，放弃此路径！","messagePattern":"目标距离过远，可能是当前点位无法识别，放弃此路径！","errorType":"exception","errorClass":"HandledException","httpStatus":null,"severity":"error","filePath":"BetterGenshinImpact/GameTask/AutoPathing/PathExecutor.cs","lineNumber":839,"sourceCode":"            if (distance > 500)\n            {\n                if (pathExecutorSuspend.CheckAndResetSuspendPoint())\n                {\n                    throw new RetryNoCountException(\"可能暂停导致路径过远，重试一次此路线！\");\n                }\n                else\n                {\n                    distanceTooFarRetryCount++;\n                    if (distanceTooFarRetryCount > 50)\n                    {\n                        if (position == new Point2f())\n                        {\n                            throw new HandledException(\"重试多次后，当前点位无法被识别，放弃此路径！\");\n                        }\n                        else\n                        {\n                            Logger.LogWarning($\"距离过远（{position.X},{position.Y}）->（{waypoint.X},{waypoint.Y}）={distance}，重试多次后仍然失败，放弃此路径点！\");\n                            throw new HandledException(\"目标距离过远，可能是当前点位无法识别，放弃此路径！\");\n                        }\n                    }\n                    else\n                    {\n                        // 取余减少日志输出频率\n                        if (distanceTooFarRetryCount % 5 == 0)\n                        {\n                            Logger.LogWarning($\"距离过远（{position.X},{position.Y}）->（{waypoint.X},{waypoint.Y}）={distance}，重试\");\n                        }\n                        // 取余减少判断频率\n                        if (distanceTooFarRetryCount % 10 == 0)\n                        {\n                            await ResolveAnomalies(screen);\n                            Logger.LogInformation($\"重置到上次正确识别的坐标 ({prevNotTooFarPosition.X},{prevNotTooFarPosition.Y})\");\n                            Navigation.SetPrevPosition(prevNotTooFarPosition.X, prevNotTooFarPosition.Y);\n                            // 淡入淡出特效\n                            await Delay(500, ct);\n                        }","sourceCodeStart":821,"sourceCodeEnd":857,"githubUrl":"https://github.com/babalae/better-genshin-impact/blob/a7cb36712dcb409be610257d877fcea3597e9d6b/BetterGenshinImpact/GameTask/AutoPathing/PathExecutor.cs#L821-L857","documentation":"Sibling of [281], thrown from the same retry block when distanceTooFarRetryCount > 50 but the position WAS recognized (non-origin). It logs the exact from→to coordinates and distance, then aborts the path because, despite knowing where the avatar is, it never closed the >500-unit gap after 50 iterations. Typically indicates the pathing logic or movement simulation is fighting an obstacle.","triggerScenarios":"Avatar stuck against terrain/wall/cliff the straight-line tracker cannot route around; underwater/in-combat forced slow walk; waypoint placed inside an inaccessible cell; anti-cheat or animation lock preventing movement; mouse-move rotation drift from miscalibrated angleOffset.","commonSituations":"Custom JSON path authored with a waypoint inside terrain; character encumbered (glider deployed, swimming, climbing); FPS drops causing SendInput movement to underdeliver; game running at low frame rate so Sleep-based delays misfire.","solutions":["Inspect the logged from→to coordinates and relocate the offending waypoint in the path JSON to an accessible tile.","Verify the avatar is not in combat/swimming/climbing state at the failure point (close combat, stand on flat ground first).","Recalibrate movement by restarting the route from a closer teleport point.","Increase game FPS / disable vsync stalls so Sleep(50) movement steps deliver full input.","If the route is known-good, retry once — transient physics stalls do occur."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { await pathExecutor.Execute(ct); }\ncatch (HandledException e) when (e.Message.Contains(\"目标距离过远\"))\n{ Logger.LogWarning(\"路径受阻跳过：{Msg}\", e.Message); /* record waypoint, continue */ }","preventionTips":["Author paths on accessible tiles; validate waypoints against tp.json terrain.","Abort pathing if the avatar is detected in combat/swimming/climbing states.","Log from→to coordinates on every 'too far' warning to find problematic waypoints."],"tags":["path-tracking","obstacle","movement","retry-exhaustion"],"backgroundTag":null,"analyzedSha":"a7cb36712dcb409be610257d877fcea3597e9d6b","analyzedAt":"2026-08-13T16:44:57.548Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}