-
Notifications
You must be signed in to change notification settings - Fork 160
[OS X] LuaTeX, synctex, and pdf-tools don't play nicely #286
Comments
I don't have I also attached a script which you could try. I runs forward/backward searches multiple times on random data. You possibly need to adapt the path in the header. |
Here are the PDF and the synctex file: verylargedocument.pdf As I said, the bug is only reproduceable with the OS X/LuaTeX combination, to my knowledge, though I actually have not tried using the combination of compiling on OS X, then attempting to sync on Linux. When I try to sync a document on OS X that was compiled on Linux, it creates a blank buffer, so my guess is that the same thing will happen in the other direction. It may be because the path is |
I worked that issue by using the deeply profound trick of replacing the text I also tested the Linux compiled version on OS X using the reverse of the above replacement, and epdfinfo fails on OS X (but not Linux). |
Ok, then I don't have to try. Sounds to me like someone needs to debug this on an OSX system. The synctex version I'm using is slightly behind upstream, so updating could potentially fix this as well. |
I would be willing to do some debugging on OS X, though I don't have that much time. For the moment, I've switched to xelatex and I am hoping against hope that switching doesn't do any hard-to-find and wacky things to my typography that I'll have to track down. I can't say I know how, however. What would I do to find the source of the problem? |
The best way to debug this is by directly running the executable in the elpa directory. If started, it reads commands from stdin, one per line. Each line starts with the commands name, followed by its arguments separated by colons. The synctex forward command looks like this:
where line and column are the line- and column-number of the position in the source file. And the backward one like this
where x and y are relative image coordinates, i.e. 0.0 <= x,y <= 1.0 . You should create a file, let's say commands.txt, containing at least one command which is triggering this bug. If you set Then in Emacs cd to the elpa directory of pdf-tools and start up gdb
This should create a buffer in which the gdb process is running. Next set your commands as input to the process via the following gdb command.
Finally start the program:
If this triggers the error, try
to see a stack trace. That should do it. |
Program received signal SIGABRT, Aborted. I use archlinux + synctex + lua(la)tex + emacs and i have a similar symptom .
And this is the text in command.txt ( i don't get a mean of x and y so i just switch it to 0.0 0.1 resp) |
Thank you for debugging this. It very much looks like a bug in the synctex library and I updated it to the most recent version (310d88e). Please see if this makes it go away. |
Although i reinstall pdf-tools from Elpa ,i still got symptoms : If you let me know what information you need (Since i am a newbie i don't know much so plz hope you let me know many details) , then i will give it to you as far as i can and i wrote add: |
Things to check:
There was no guaranty that updating the synctex files would solve this problem. I think I'll have to get my hand on luatex and see for myself. Edit:
|
There is a similar bug report for Okular and I tried to build with the synctex version they are using. But it won't build (maybe due to interface changes), so needs more work. |
There is And so you suspect luatex engine is problem? or synctex is problem? or pdf-tools is problem? |
I don't know how far you have gotten with the solution to that issue. Just wanted to refer to a very similar problem that I posted on SX some time ago. Summary: I am having a very similar issue using Luatex/Syntex with an Evince/Zathura integration with Emacs on Ubuntu 18.04.2 LTS. It particularly often happens with long documents. I haven't been able to do anything about it (also not an expert in debugging foreign packages on Linux). I am editing short documents (<20pages) where the problem really rarely happens such that I can get away with it. But for long documents, the Emacs integration with those viewers gets impractical. Thanks for looking into it again. |
I am using Arch Linux and I was also affected by this problem. I am now able to use this without any problems with LuaLaTeX :) |
I already did that here: #527 . Please try it and report if it works or not. |
I downloaded your version and it seems to be working much better. I checked the modifications and, as you said, it has everything I asked you to do; that must be it. At least, for me, it doesn't seem to crash anymore! Thanks :) |
I get this |
I'm aware that OS X is not supported, but I want to make it known that this bug exists. I have only seen the error with the combination of OS X and LuaTeX. XeTeX and LaTeX seem to be fine, and LuaTeX seems to be fine on Linux, though I don't know if that is OS related or related to package versions. It also only appears frequently with large documents. It renders the use of pdf-tools and LuaTeX with very large documents (like my thesis) impractical on OS X.
The bug is as follows: The commands
pdf-sync-forward-search
,pdf-sync-backward-search
, andpdf-backward-search-mouse
work... sometimes. At other times, they spit out the messageor less frequently,
and do nothing. Synctex is in fact enabled, and in fact sometimes works, as noted above. Repeatedly executing the command on the same point in the same document sometimes works and sometimes doesn't. There is no pattern discernable to me regarding how frequently or under what circumstances the error occurs or doesn't occur, except that it seems to be most prevalent in large documents. It almost never happens in very small documents.
The error log of epdfinfo was set in Customize, but the log is empty. Looking at the source code, it seems that there must have been a previous synctex error that causes
epdfinfo: Unable to create synctex scanner, did you run latex with --synctex=1?
, but I can't tell what error it is because it doesn't seem to be reported anywhere I know how to access.I installed emacs and pdf-tools using
from the terminal and
from emacs.
The first time I run emacs after installing
pdf-tools
, it tells me it needs to build the server and spits out the attached compiler log, and the second time I run it, it works.The issue can be reproduced by installing emacs and pdf-tools on OS X as described, renaming the attached file
verylargedocument.txt
asverylargedocument.tex
, and compiling it usingYou will find the issue quickly if you then open verylargedocument.pdf and try jumping around between the PDF and the tex file using
pdf-sync-forward-search
,pdf-sync-backward-search
, andpdf-backward-search-mouse
.pdftoolscompilelog.txt
verylargedocument.txt
The text was updated successfully, but these errors were encountered: