James-Yu / LaTeX-Workshop

Boost LaTeX typesetting efficiency with preview, compile, autocomplete, colorize, and more.
MIT License
10.47k stars 519 forks source link

Backward SyncTeX failed on non-existent #4239

Closed Cold-Stars closed 3 months ago

Cold-Stars commented 3 months ago

Please fill the following fields with a star (*) and provide as much related information as possible.

Pre-checks*

Please change the following [ ] to [x] for confirmation.

  • [x] The issue has not been reported in this repository.
  • [x] The issue remains after disabling all other extensions and restarting Visual Studio Code.
  • [x] The FAQ cannot address the issue.
  • [ ] The issue is not related to compiling a document, or the document can be successfully compiled in the OS terminal but not in Visual Studio Code with this extension.

Environment*

Please write exact version numbers instead of descriptors such as latest.

  • Operating System: [Windows 11]
  • Visual Studio Code Version: [1.88.1(system step)]
  • LaTeX Workshop Version: [9.20.0]
  • TeX Distribution Version: [TeX Live 2024]

The Issue*

Logs

LaTeX Workshop Output*

[08:50:45.635][Event] STRUCTURE_UPDATED
[08:50:48.214][Commander] BUILD command invoked.
[08:50:48.215][Build] The document of the active editor: file:///d:/yan/我的/论文/小论文/latex/1.tex
[08:50:48.215][Build] The languageId of the document: latex
[08:50:48.215][Root] Current workspace folders: ["file:///d:/yan/我的/论文/小论文/latex"]
[08:50:48.215][Root] Found root file from active editor: %WS1%\1.tex
[08:50:48.216][Root] Keep using the same root file: %WS1%\1.tex
[08:50:48.216][Event] ROOT_FILE_SEARCHED
[08:50:48.216][Event] STRUCTURE_UPDATED
[08:50:48.216][Build] Building root file: %WS1%\1.tex
[08:50:48.216][Build][Recipe] Build root file %WS1%\1.tex
[08:50:48.219][Build][Recipe] Preparing to run recipe: XeLaTeX.
[08:50:48.219][Build][Recipe] Prepared 1 tools.
[08:50:49.198][Build][Recipe] outDir: d:/yan/我的/论文/小论文/latex .
[08:50:49.199][Build] Recipe step 1 The command is xelatex:["-synctex=1","-interaction=nonstopmode","-file-line-error","1"].
[08:50:49.199][Build] env: undefined
[08:50:49.199][Build] root: %WS1%\1.tex
[08:50:49.200][Build] cwd: %WS1%
[08:50:49.242][Build] LaTeX build process spawned with PID 11736.
[08:50:52.394][Parser][TexLog] Logged 0 messages.
[08:50:52.395][Build] Finished a step in recipe with PID 11736.
[08:50:52.395][Build] Successfully built %WS1%\1.tex .
[08:50:52.395][Event] BUILD_DONE
[08:50:52.395][Viewer] Call refreshExistingViewer: "d:\\yan\\我的\\论文\\小论文\\latex\\1.pdf" .
[08:50:52.396][Viewer] Refresh PDF viewer: %WS1%\1.pdf
[08:50:52.634][Cacher][Watcher] "change" emitted on %WS1%\1.pdf after polling for 264 ms.
[08:50:52.635][Event] FILE_CHANGED: "d:\\yan\\我的\\论文\\小论文\\latex\\1.pdf"
[08:50:57.230][Commander] VIEW command invoked.
[08:50:57.230][Root] Current workspace folders: ["file:///d:/yan/我的/论文/小论文/latex"]
[08:50:57.231][Root] Found root file from active editor: %WS1%\1.tex
[08:50:57.231][Root] Keep using the same root file: %WS1%\1.tex
[08:50:57.231][Event] ROOT_FILE_SEARCHED
[08:50:57.232][Event] STRUCTURE_UPDATED
[08:50:57.288][Viewer][Panel] Internal PDF viewer at http://127.0.0.1:63332/viewer.html?file=pdf..ZmlsZSUzQSUyRiUyRiUyRmQlM0ElMkZ5YW4lMkYlRTYlODglOTElRTclOUElODQlMkYlRTglQUUlQkElRTYlOTYlODclMkYlRTUlQjAlOEYlRTglQUUlQkElRTYlOTYlODclMkZsYXRleCUyRjEucGRm .
[08:50:57.289][Cacher][Watcher] Watched %WS1%\1.pdf by the .pdf watcher.
[08:50:57.289][Event] FILE_WATCHED: "d:\\yan\\我的\\论文\\小论文\\latex\\1.pdf"
[08:50:57.307][Event] STRUCTURE_UPDATED
[08:50:57.316][Viewer] Open PDF tab for file:///d:/yan/我的/论文/小论文/latex/1.pdf
[08:50:57.511][Viewer] Handle data type: open
[08:50:57.559][Server] Preview PDF file: file:///d:/yan/我的/论文/小论文/latex/1.pdf
[08:50:57.637][Viewer] Handle data type: loaded
[08:50:57.637][Event] VIEWER_PAGE_LOADED
[08:51:02.013][Viewer] Handle data type: reverse_synctex
[08:51:02.013][Locator] Backward from %WS1%\1.pdf at x=192.14165912518854, y=254.6907239819005 on page 1.
[08:51:02.288][Locator] Backward SyncTeX failed on isSameRealPath() with d:/yan/�ҵ�/����/С����/latex/./1.tex and %WS1%\1.tex . Error: ENOENT: no such file or directory, lstat 'd:\yan\�ҵ�'
[08:51:02.288]Error: ENOENT: no such file or directory, lstat 'd:\yan\�ҵ�'
    at Object.realpathSync (node:fs:2676:7)
    at Object.<anonymous> (node:electron/js2c/node_init:2:5352)
    at isSameRealPath (c:\Users\19731\.vscode\extensions\james-yu.latex-workshop-9.20.0\out\src\utils\pathnormalize.js:39:28)
    at Object.toTeX (c:\Users\19731\.vscode\extensions\james-yu.latex-workshop-9.20.0\out\src\locate\synctex.js:435:52)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[08:51:02.288][Locator] Backward SyncTeX failed on non-existent d:\yan\�ҵ�\����\С����\latex\1.tex .
[08:51:04.429][Viewer] Handle data type: reverse_synctex
[08:51:04.429][Locator] Backward from %WS1%\1.pdf at x=188.55022624434392, y=258.2821568627452 on page 1.
[08:51:04.504][Locator] Backward SyncTeX failed on isSameRealPath() with d:/yan/�ҵ�/����/С����/latex/./1.tex and %WS1%\1.tex . Error: ENOENT: no such file or directory, lstat 'd:\yan\�ҵ�'
[08:51:04.504]Error: ENOENT: no such file or directory, lstat 'd:\yan\�ҵ�'
    at Object.realpathSync (node:fs:2676:7)
    at Object.<anonymous> (node:electron/js2c/node_init:2:5352)
    at isSameRealPath (c:\Users\19731\.vscode\extensions\james-yu.latex-workshop-9.20.0\out\src\utils\pathnormalize.js:39:28)
    at Object.toTeX (c:\Users\19731\.vscode\extensions\james-yu.latex-workshop-9.20.0\out\src\locate\synctex.js:435:52)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[08:51:04.504][Locator] Backward SyncTeX failed on non-existent d:\yan\�ҵ�\����\С����\latex\1.tex .
[08:51:07.194][Event] STRUCTURE_UPDATED
[08:51:10.612][Event] STRUCTURE_UPDATED
[08:51:10.618][Commander] SYNCTEX command invoked.
[08:51:10.619][Locator] Forward from %WS1%\1.tex to %WS1%\1.pdf on line 7.
[08:51:10.697][Viewer] Try to synctex %WS1%\1.pdf
[08:51:14.823][Viewer] Handle data type: reverse_synctex
[08:51:14.823][Locator] Backward from %WS1%\1.pdf at x=312.4546606334842, y=242.71927876238013 on page 1.
[08:51:14.895][Locator] Backward SyncTeX failed on isSameRealPath() with d:/yan/�ҵ�/����/С����/latex/./1.tex and %WS1%\1.tex . Error: ENOENT: no such file or directory, lstat 'd:\yan\�ҵ�'
[08:51:14.895]Error: ENOENT: no such file or directory, lstat 'd:\yan\�ҵ�'
    at Object.realpathSync (node:fs:2676:7)
    at Object.<anonymous> (node:electron/js2c/node_init:2:5352)
    at isSameRealPath (c:\Users\19731\.vscode\extensions\james-yu.latex-workshop-9.20.0\out\src\utils\pathnormalize.js:39:28)
    at Object.toTeX (c:\Users\19731\.vscode\extensions\james-yu.latex-workshop-9.20.0\out\src\locate\synctex.js:435:52)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[08:51:14.895][Locator] Backward SyncTeX failed on non-existent d:\yan\�ҵ�\����\С����\latex\1.tex .
James-Yu commented 3 months ago

Please provide a full log.

edit: please also provide the full path to your tex file.

Cold-Stars commented 3 months ago

Please provide a full log.

edit: please also provide the full path to your tex file.

I have updated the log. My tex path is D:\yan\我的\论文\小论文\latex\1.tex

James-Yu commented 3 months ago

Did you encounter the same issue with all English paths?

Cold-Stars commented 3 months ago

Did you encounter the same issue with all English paths?

There are no issues under the English path.

James-Yu commented 3 months ago

Please provide the synctex.gz file under CJK path for debug. It is highly like to be a SyncTeX issue.

Cold-Stars commented 3 months ago

1.synctex.gz

James-Yu commented 3 months ago

It is always recommended to use ASCII paths. This commit may fix issues related to synctex binary (as we don't use it now), but the general TeX system works poorly under non-ASCII paths.