Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix potential crash when parsing build logs #973

Merged
merged 2 commits into from
Dec 3, 2023
Merged

Conversation

pfoerster
Copy link
Member

When encountering an error in the build log file, the server tries to convert the line number into a (zero)-based offset. If the line number is (for some reason) completely wrong, a panic in the server can occur.

When encountering an error in the log file,
the server tries to associate a suitable range in the document using the line number.
When the line number is completely wrong,
a panic might occur if the line number does not exist.
@pfoerster
Copy link
Member Author

@clason Maybe this changeset will fix the crash you are seeing here: #967 (comment)

@clason
Copy link
Contributor

clason commented Dec 3, 2023

Yes, looks like it! Thank you!

@pfoerster pfoerster merged commit 6c785a6 into master Dec 3, 2023
5 checks passed
@pfoerster pfoerster deleted the bugfix/line-index branch December 3, 2023 13:11
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Dec 18, 2023
## [5.12.0] - 2023-12-03

### Added

- Infer `texlab.build.auxDirectory`, `texlab.build.logDirectory` and `texlab.build.pdfDirectory` from `latexmkrc` if available ([#907](latex-lsp/texlab#907))

### Fixed

- Do not report `undefined reference` errors when using `\nocite{*}` ([#964](latex-lsp/texlab#964))
- Fix potential crash when parsing build log files ([#973](latex-lsp/texlab#973))
- Set the final tab stop of the `\begin` snippet inside the environment ([#963](latex-lsp/texlab#963))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants