vedang / pdf-tools

Emacs support library for PDF files.
https://pdftools.wiki
GNU General Public License v3.0
612 stars 89 forks source link

epdfinfo server quit unexpectedly #100

Closed vikram-mandyam closed 1 year ago

vikram-mandyam commented 2 years ago

When I try to open the pdf in /test/test.pdf. I get this error The epdfinfo server quit. On debugging stack trace:

Debugger entered--Lisp error: (error "The epdfinfo server quit unexpectedly")
  error("The epdfinfo server quit unexpectedly")
  pdf-info-query(renderpage "/Users/vm/Downloads/test.pdf" 1 2518)
  pdf-info-renderpage(1 2518)
  pdf-cache-renderpage(1 2518 2518)
  pdf-view-create-page(1 #<window 3 on test.pdf>)
  pdf-view-display-page(1 #<window 3 on test.pdf>)
  pdf-view-redisplay(#<window 3 on test.pdf>)
  pdf-view-goto-page(1)
  pdf-view-new-window-function((#<window 3 on test.pdf> (needs-redisplay) (page . 1) (overlay . #<overlay from 1 to 102223 in test.pdf>)))
  image-mode-winprops(nil t)
  image-mode-reapply-winprops()

When I run the same command on terminal:

echo renderpage:/Users/vm/Downloads/test.pdf:1:2518 | <path-to-pdf-tools>/server/epdfinfo

I get the following:

[1]    18451 done                      echo renderpage:/Users/vmandyam/Downloads/test.pdf:1:2518 | 
       18452 floating point exception  

I am running on macOS, Emacs 28.1 and pdf-tools-20220426.235

Others:

brew info poppler       
poppler: stable 22.02.0 (bottled), HEAD
PDF rendering library (based on the xpdf-3.0 code base)

brew info pkg-config
pkg-config: stable 0.29.2 (bottled)
Manage compile and link flags for libraries

brew info pkg-config
pkg-config: stable 0.29.2 (bottled)
Manage compile and link flags for libraries

brew info cairo    
cairo: stable 1.16.0 (bottled), HEAD
Vector graphics library with cross-device output support
vikram-mandyam commented 2 years ago

Any updates on this issue? @vedang

vikram-mandyam commented 2 years ago

After searching for solutions, it seems this link does the trick...

winterNan commented 1 year ago

I have a similar problem and I can confirm that the above solution does not work. Is there any solution yet for the bug?

vedang commented 1 year ago

@winterNan @vikram-mandyam : Can one of you please re-file this bug using the new bug template? It has instructions on capturing details like OS version and Emacs version which I think are important here. If you are on M1 Macs (or other ARM variants), please also search for M1 in issues and see if the discussion there solves your problem.

(Basically, I am unable to reproduce this bug on Ubuntu or M1 Mac)

gusgustavsohn commented 1 year ago

@vedang

I am also on a M1 Mac, suffering from the same problem. Whenever I try to open a PDF file, I get weird characters (which I assume is the PDF code) and the message

The epdfinfo server quit, restart it? (y or n)

If I choose "y", nothing changes. If I choose "n", then I get another error:

Error running timer 'pdf-cache--prefetch-start': (error "The epdfinfo server quit")

FWIW, the pdf-tools-install worked ok, just showed 2 warnings but "Success".

What info should I provide for debugging this? I would be glad to help if this could be solved.

Edit 1: I've tried with the solution proposed in https://github.com/vedang/pdf-tools/issues/100#issuecomment-1236192594 but it still gives me this error. Edit 2: FWIW DocView works just fine, I don't know if this info is helpful but I thought I might as well add it.