moritz-h · GitHub

Environment

  • TeXstudio: 4.9.5 (installed via texstudio PPA)
  • Qt: 6.4.2
  • OS: Ubuntu 24.04
  • TeX distribution: texlive 2026

Expected behavior

no crash

Actual behavior

SIGSEGV

How to reproduce

It can be reproduced with the following code:
main.tex

% !TeX encoding = utf8
% !TeX program = pdflatex
% !BIB program = biber
\documentclass[12pt,a4paper,twoside]{memoir}
\usepackage{lipsum}
\usepackage{subfiles}
\addbibresource{\subfix{main.bib}}
\AtBeginDocument{%
  \ifSubfilesClassLoaded{%
    \frontmatter
    \input{\subfix{frontmatter}}
    \mainmatter
  }%
}
\begin{document}
\mainmatter
\subfile{chapter}
\end{document}

chapter.tex:

% !TeX encoding = utf8
% !TeX program = pdflatex
% !BIB program = biber
% !TeX root = chapter.tex
\documentclass[main.tex]{subfiles}
\begin{document}
\chapter{Chapter}
\label{chap:chap1}
\lipsum{1-4}
\end{document}
  • Store main.tex and chapter.tex in empty directory
  • Open empty TeXstudio
  • File > Open > main.tex
  • In the Structure view click on chapter to open the chapter file
  • Close the chapter.tex tab
  • Press F5
  • See SIGSEGV

Notes:

  • The crash happens not always, on my machine with around 80-90% probability.
  • The crash also happens when closing the main.tex tab as last step instead of pressing F5
  • If there are LaTeX compile artifacts in the directory next to the two files the crash occurs more rarely or only on the second compile run
  • If I minimize the reproduction example even more (remove the bib file reference and the AtBeginDocument section, the crash also occurs way more rarely

Read the original on github.com ↗