Skip to content

Gvim freezes after failed compilation #2691

@Svalorzen

Description

@Svalorzen

Description

This is happening on a fairly large project, which was compiling fine. I have just added a new chapter, copy pasted from a previous latex file; my plan was to go through the errors until it was integrated.

Unfortunately, it seems that one way or another, if I try to now compile the project, gvim ends up hanging (EDIT: I didn't think of it at first, but the same happens in vim in a terminal, it's not only related to gvim):

  • If I try to use continuous compilation and waiting a bit, the compilation ends with the error "VimTex: Compilation failed!" and the cursor remains blinking at the end of the error message. However, gvim does not respond anymore after that, and must be killed with SIGTERM.
  • If I compile using a single shot, it is even worse. There is no error at the end, and gvim freezes completely. SIGTERM does not kill it, and I had to use SIGKILL to get rid of it.

I am trying to pinpoint what is causing the error and generate a MWE, but I'm not having much success. Sometimes I remove something and I get the freeze, but after restarting gvim I do not get it anymore (only getting a bunch of compilation errors).

I do have a hunch that it might be related to too many errors; as I'm trying to create an MWE a "successful" compilation hanged for a couple of seconds, before producing ~1300 lines of errors. I'm not sure how to verify that this is indeed the cause, and if so, what I could do to avoid the crash.

Steps to reproduce

No response

Expected behavior

No response

Actual behavior

No response

Do you use a latexmkrc file?

No

VimtexInfo

info:
  OS: Ubuntu 22.04.1 LTS
  Vim version: VIM 9.0 (1-749)
  Has clientserver: true
  Servername: GVIM2

VimTeX project: crash
  base: crash.tex
  root: /home/svalorzen/Tests/latex
  tex: /home/svalorzen/Tests/latex/crash.tex
  main parser: current file verified
  document class: book
  packages: amsmath amssymb etoolbox fancyhdr geometry graphicx subcaption titlesec xcolor xstring
  source files:
    crash.tex
    config/headers.tex
    mats.tex
  compiler: latexmk
    engine: -pdf
    options:
      -verbose
      -file-line-error
      -synctex=1
      -interaction=nonstopmode
    build_dir: build
    callback: 1
    continuous: 1
    executable: latexmk
    job: 
      jobid: process 13031 run
      output: /tmp/vYXjcyw/0
      cmd: max_print_line=2000 latexmk -verbose -file-line-error -synctex=1 -interaction=nonstopmode -pdf -outdir=build -pvc -view=none -e '$compiling_cmd = ($compiling_cmd ? $compiling_cmd . " ; " : "") . "echo vimtex_compiler_callback_compiling"' -e '$success_cmd = ($success_cmd ? $success_cmd . " ; " : "") . "echo vimtex_compiler_callback_success"' -e '$failure_cmd = ($failure_cmd ? $failure_cmd . " ; " : "") . "echo vimtex_compiler_callback_failure"' 'crash.tex'
      pid: 13031
  viewer: General
  qf method: LaTeX logfile

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions