After my recent upgrade (per new install) to Ubuntu 18.04, I have started having quite some troubles with my tool chain (Emacs, Lualatex, Evince). I am using forward/backward search to approximate WYSIWYG LaTeX editing.

Evince has started to crash on recompiling/updating LuaLaTeX. Then I tried zathura (another PDF viewer) instead, and after a view tries, similar crashes happen with zathura as well. Zathura after a while cannot even be started anymore by the commands Emacs issues to control zathura.

I am using Ubuntu 18.04 and the corresponding emacs, evince, and zathura packages as well as some "standard" emacs extensions from the ubuntu package repository.

The relevant portion of my .emacs:


(add-to-list 'load-path "~/.emacs.d/lisp/")

(add-hook 'text-mode-hook 'electric-pair-mode) 
(add-hook 'text-mode-hook 'show-paren-mode)
(add-hook 'text-mode-hook 'turn-on-auto-fill)

(add-hook 'TeX-mode-hook 'outline-minor-mode)

(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)

(add-hook 'LaTeX-mode-hook 'flyspell-mode)
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
(setq reftex-plug-into-AUCTeX t)
(add-hook 'LaTeX-mode-hook 'company-mode)
(add-hook 'LaTeX-mode-hook 'TeX-source-correlate-mode)
(setq TeX-source-correlate-method 'synctex)
(setq TeX-source-correlate-start-server t)
(add-hook 'LaTeX-mode-hook 'TeX-PDF-mode)
(setq TeX-view-program-selection '((output-pdf "Zathura")))

Emacs generates the following call:

zathura file.pdf --synctex-forward 200:0:sometexinclude.tex -x "emacsclient
+%{line} %{input}"

Called like this, zathura (I do not use a zathura config file) exhibits the following:

zsh: segmentation fault (core dumped)  zathura file.pdf
--synctex-forward 200:0:sometexinclude.tex -x

Evince also crashes with SIGSEGV which leads me to believe that is a problem independent of the viewers.

The last thing I found out is that taking away the synctex.gz file makes it possible to start zathura and view the pdf output. But this is of course no desirable solution. However, I was not able to quickly find out how to find the core dump and make it human readable in this case. (That might exceed the scope of my problem.)

A description of that issue occurring with large documents in an OS X setting is described here: For me, it also happens more often the longer (60+ pages) the documents are, however, in my case under Linux.

Hope to get some help? (Should I transfer/share this question to/with the emacs community?)


One solution that seems to work for me at the moment is to leave out the line

(setq TeX-source-correlate-method 'synctex)

from my .emacs config. So, the minimum config to get forward/backward search to work again seems to be:

(add-hook 'LaTeX-mode-hook 'TeX-source-correlate-mode)
(setq TeX-source-correlate-start-server t)

using evince (by default) and with one more line for using zathura:

(setq TeX-view-program-selection '((output-pdf "Zathura")))

Additionally, I changed from \include and \includeonly to a scheme commenting out unused latex includes. My theory is that hyperlinks (e.g. to bibrefs, sections, etc.) to pages maintained in the latex and synctex outputs but NOT generated into the pdf might cause some trouble in both of the PDF viewers I used.

A more reliable solution is to delete the .synctex.gz file. This for both evince and zathura solves the problem which will then only return every once in a while. However, I haven't been able to find a better solution so far. I should say that this is not really a practical solution anyway.

  • Unfortunately, my hope was too soon: synctex is part of the problem, but the cause seems to lie in my (UTF8-coded) bib files. I am not sure what happens, however, when commenting out some of the biber includes, things seem to work again after clean-up and recompilation. However, even bib files without biber warnings, once re-included, will lead the PDF viewers to crash. Sorry, I am left with a peculiar problem here. – Mario May 31 '18 at 11:12
  • I switched back to using \include and \includeonly. Additionally, I am taking care that no references point "outside" the generated PDF by including bibliography, glossary, other listof's. For the time being, it seems to work. – Mario Jun 4 '18 at 12:50
  • 1
    Switch to pdf-tools, see my answer to a corresponding question here: tex.stackexchange.com/a/436115/4736 – Keks Dose Jun 12 '18 at 12:52
  • Thanks. The discussion there seems to conclude that there is actually a bug. However, I haven't found any reports. Can anybody point to something recent and potentially related? – Mario Jun 12 '18 at 17:57
  • 1
    Astonishing. So syncTeX might be the culprit. Would you go and post a bug report on the maintainers github page: github.com/jlaurens/synctex/issues -? By the way, I changed from okular to pdf-tools, because okular is more and more unstable these days. Sigh. – Keks Dose Mar 27 '19 at 11:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.