{"record":{"id":"3142189ec6b258cf","repo":"babalae/better-genshin-impact","slug":"error-314218","errorCode":null,"errorMessage":"路径文件解析失败","messagePattern":"路径文件解析失败","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropTask.cs","lineNumber":735,"sourceCode":"    }\n\n    private bool PathingFileExists(string routePath)\n    {\n        var workDir = Global.Absolute(@\"GameTask\\AutoLeyLineOutcrop\");\n        var localPath = routePath.Replace(\"/\", Path.DirectorySeparatorChar.ToString());\n        var fullPath = Path.Combine(workDir, localPath);\n        return File.Exists(fullPath);\n    }\n\n    private async Task RunPathingFile(string routePath)\n    {\n        await _returnMainUiTask.Start(_ct);\n\n        var workDir = Global.Absolute(@\"GameTask\\AutoLeyLineOutcrop\");\n        var localPath = routePath.Replace(\"/\", Path.DirectorySeparatorChar.ToString());\n        var fullPath = Path.Combine(workDir, localPath);\n\n        var task = PathingTask.BuildFromFilePath(fullPath) ?? throw new Exception(\"路径文件解析失败\");\n        var executor = new PathExecutor(_ct);\n        executor.PartyConfig = BuildLeyLinePathingPartyConfig();\n        await executor.Pathing(task);\n    }\n\n    private static PathingPartyConfig BuildLeyLinePathingPartyConfig()\n    {\n        var partyConfig = PathingPartyConfig.BuildDefault();\n        partyConfig.SkipPartySwitch = true;\n        return partyConfig;\n    }\n\n    private async Task<NodeData> LoadNodeData()\n    {\n        if (_nodeData != null)\n        {\n            return _nodeData;\n        }","sourceCodeStart":717,"sourceCodeEnd":753,"githubUrl":"https://github.com/babalae/better-genshin-impact/blob/a7cb36712dcb409be610257d877fcea3597e9d6b/BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropTask.cs#L717-L753","documentation":"Thrown by RunPathingFile when PathingTask.BuildFromFilePath returns null for the given route file path. BuildFromFilePath reads a pathing JSON file and constructs a PathingTask object; it returns null if the file does not exist, cannot be read, or fails JSON deserialization. RunPathingFile is called for each route segment in a PathInfo, so this error means a specific route file referenced by the node graph could not be loaded.","triggerScenarios":"RunPathingFile resolves fullPath under GameTask/AutoLeyLineOutcrop and calls PathingTask.BuildFromFilePath. Fires when the route JSON (e.g. assets/pathing/target/some_route.json or a rerun variant) is missing, empty, or malformed. The route path is derived from BuildTargetRoute/BuildRerunRoute which transform the base route path string.","commonSituations":"A route JSON file was not included in the build/install; the route file name in LeyLineOutcropData.json does not match the actual file on disk (case sensitivity on some file systems); the route JSON is corrupted or has an incompatible schema after a version update; the -rerun or target/ path transformation produced a path that does not exist.","solutions":["Check the fullPath in the exception context to identify which route file failed.","Verify the route JSON file exists at the expected path under GameTask/AutoLeyLineOutcrop/assets/pathing/.","Ensure route file names in LeyLineOutcropData.json match the actual files (including case).","Reinstall or rebuild to restore missing route JSON files.","If the path was generated by BuildTargetRoute/BuildRerunRoute, verify the base route path string has the expected format (assets/pathing/ prefix)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before calling PathingTask.BuildFromFilePath, verify the file exists\nvar fullPath = Path.Combine(workDir, localPath);\nif (!File.Exists(fullPath))\n{\n    Logger.LogError(\"路径文件不存在: {Path}\", fullPath);\n    return; // skip this route\n}","typeGuard":null,"tryCatchPattern":"catch (Exception ex) when (ex.Message.Contains(\"路径文件解析失败\"))\n{\n    logger.LogError(ex, \"路径文件解析失败: {Path}\", routePath);\n    await EnsureExitRewardPage();\n    continue; // skip to next route/ley line\n}","preventionTips":["Ensure all route JSON files referenced in LeyLineOutcropData.json exist on disk.","Verify route file names match exactly (case-sensitive on some file systems).","If building from source, ensure route JSON files are copied to the output directory.","Validate that BuildTargetRoute/BuildRerunRoute produce paths that exist."],"tags":["ley-line","pathing","json","file-not-found","navigation"],"backgroundTag":null,"analyzedSha":"a7cb36712dcb409be610257d877fcea3597e9d6b","analyzedAt":"2026-08-13T16:44:57.548Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}