{"record":{"id":"7e9ff8fa84c7ae4b","repo":"babalae/better-genshin-impact","slug":"error-7e9ff8","errorCode":null,"errorMessage":"未找到追踪点","messagePattern":"未找到追踪点","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"BetterGenshinImpact/GameTask/Common/Job/LowerHeadThenWalkToTask.cs","lineNumber":54,"sourceCode":"        _timeoutMilliseconds = timeoutMilliseconds;\n        _trackPoint = new RecognitionObject\n        {\n            Name = \"TrackPoint\",\n            RecognitionType = RecognitionTypes.TemplateMatch,\n            TemplateImageMat = GameTaskManager.LoadAssetImage(@\"Common\\Element\", targetMatName),\n            RegionOfInterest = new Rect((int)(300 * AssetScale), 0, CaptureRect.Width - (int)(600 * AssetScale), CaptureRect.Height),\n            Threshold = 0.6,\n            DrawOnWindow = true\n        }.InitTemplate();\n    }\n\n    public async Task<bool> Start(CancellationToken ct)\n    {\n        using var initialCapture = CaptureToRectArea();\n        if (initialCapture.Find(_trackPoint).IsEmpty())\n        {\n            Logger.LogInformation(\"未找到追踪点，停止任务\");\n            throw new Exception(\"未找到追踪点\");\n        }\n\n        return await MakeTrackPointDirectlyAbove(ct);\n    }\n\n    private async Task<bool> MakeTrackPointDirectlyAbove(CancellationToken ct)\n    {\n        try\n        {\n            double dpi = TaskContext.Instance().DpiScale;\n            var startTime = DateTime.Now;\n            int prevMoveX = 0;\n            while (!ct.IsCancellationRequested)\n            {\n                using var ra = CaptureToRectArea();\n                var trackPointRa = ra.Find(_trackPoint);\n                if (trackPointRa.IsExist())\n                {","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/babalae/better-genshin-impact/blob/a7cb36712dcb409be610257d877fcea3597e9d6b/BetterGenshinImpact/GameTask/Common/Job/LowerHeadThenWalkToTask.cs#L36-L72","documentation":"Thrown by LowerHeadThenWalkToTask.Start when the very first capture does not contain the track-point template above threshold 0.6. The task template-matches _trackPoint inside a centered ROI (excluding 300*scale on each side) and refuses to start walking if no match is found.","triggerScenarios":"initialCapture.Find(_trackPoint).IsEmpty() is true on the first frame. The track-point icon (loaded from Common\\Element\\{targetMatName}) is not visible in the starting view — the player is looking the wrong way, is too far, or the template no longer matches.","commonSituations":"Camera not pointed at the objective when the task starts; targetMatName asset missing or outdated after a game update; ROI too narrow so the point is in the excluded side bands; threshold 0.6 too strict for the current art/render scale.","solutions":["Pre-orient the camera (look down/around) before invoking Start so the track point is in view.","Verify the template asset Common\\Element\\{targetMatName} exists and matches the current game art.","Lower the threshold or widen the ROI if the point is near screen edges.","Retry the initial capture a few times before failing, since the first frame may be mid-transition."],"exampleFix":"// before\nusing var initialCapture = CaptureToRectArea();\nif (initialCapture.Find(_trackPoint).IsEmpty())\n{\n    Logger.LogInformation(\"未找到追踪点，停止任务\");\n    throw new Exception(\"未找到追踪点\");\n}\n\n// after: retry the initial detection a few times\nfor (int i = 0; i < 5; i++)\n{\n    using var c = CaptureToRectArea();\n    if (!c.Find(_trackPoint).IsEmpty())\n        return await MakeTrackPointDirectlyAbove(ct);\n    await Delay(300, ct);\n}\nthrow new Exception(\"未找到追踪点\");","handlingStrategy":"validation","validationCode":"// Pre-orient and retry initial detection before starting\nfor (int i = 0; i < 5; i++)\n{\n    using var c = CaptureToRectArea();\n    if (!c.Find(_trackPoint).IsEmpty()) break;\n    await Delay(300, ct);\n}","typeGuard":"bool TrackPointVisible(ImageRegion ra) => !ra.Find(_trackPoint).IsEmpty();","tryCatchPattern":"try { await task.Start(ct); }\ncatch (Exception e) when (e.Message == \"未找到追踪点\")\n{ /* rotate camera / lower view, then retry Start */ }","preventionTips":["Pre-orient the camera toward the objective before starting.","Verify the targetMatName template exists and matches the current game art.","Lower the 0.6 threshold or widen the ROI if the point sits near screen edges."],"tags":["navigation","template-match","genshin-ui"],"backgroundTag":null,"analyzedSha":"a7cb36712dcb409be610257d877fcea3597e9d6b","analyzedAt":"2026-08-13T16:44:57.548Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}