Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash with ImageMagick and pdf-tools #17

Closed
fpopineau opened this issue Jan 9, 2019 · 8 comments
Closed

Crash with ImageMagick and pdf-tools #17

fpopineau opened this issue Jan 9, 2019 · 8 comments

Comments

@fpopineau
Copy link

Hi,

Great job.
I'd like to report a problem I have hit for quite a moment.
If you try to visualize a pdf through pdf-tools with ImageMagick,
(using (setq pdf-view-use-imagemagick t))
emacs will crash. If you do it without using IM, emacs behaves well,
but it will crash the minute you try to visualize any jpeg/png image
using ImageMagick (because it is the default when it is compiled in)
All I was able to get is a gdb backtrace like the one here:
politza/pdf-tools#458 (comment)
I have submitted a bug report to the author of pdf-tools but
I am afraid the problem is rather on the imagemagick side.

I would be interested in any way to remove this bug.

Regards,

@novoid
Copy link

novoid commented Apr 19, 2019

I can confirm the crashes. I just upgraded to 26.2, observing the behavior.

Edit 2019-04-23: I don't have pdf-view-use-imagemagick set manually. It's value is nil on my installation. However, I tend to think that on my Windows 10 system, imagemagick is the chosen method to display PNG images and therefore the setting of pdf-view-use-imagemagick is irrelevant according to the help. If you have an idea how I might check, whether or not imagemagick is the chosen method to display PNG images, please let me know.

@vovav80
Copy link

vovav80 commented Dec 25, 2019

I confirm the crashes.

@m-parashar
Copy link
Owner

See if you can reproduce the error with the latest release.

https://github.com/m-parashar/emax64/releases/latest

@siversss
Copy link

Emacs still crashes (build emax64-26.3-20191225, os Win 7 x64). I am able to reproduce it with following steps:

Scenario 1, (setq pdf-view-use-imagemagick nil)

  1. Open any pdf file
  2. Open png image - emacs crashes

Scenario 2, (setq pdf-view-use-imagemagick nil)

  1. Open png image
  2. Open any pdf file - emacs is NOT crashing

Scenario 3, (setq pdf-view-use-imagemagick t)
Crashes any time when opening any pdf file

@m-parashar
Copy link
Owner

I confirm the crashes. ImageMagick 7 is not playing nice with pdf-tools, at least with the current set of patches. This requires more time and energy than what I can spare right now, unfortunately. If anyone has looked into it, I will gladly pick it up from there and make changes.

In the meantime, I have just uploaded an unpatched 26.3, which plays nice with pdf-tools but lacks im7 support. I have also uploaded a snapshot build of emacs-master without the patches.

@Alf0nso
Copy link

Alf0nso commented Sep 28, 2020

First of all I would like to thank you for the support you gave to emacs on windows!
I really, really appreciate it!

Like I've seen, you're a busy person, and doesn't look like you will have time to look at this kind of things for now.
But I would really love to see this problem solved!
How would one try to go and solve this? How did you manage to give windows 10 emacs support for ImageMagick?

@Alf0nso
Copy link

Alf0nso commented Sep 29, 2020

Captura de Ecrã (245)

So I installed emacs 27.1 for windows, and tried to install pdf-tools, and after installing msys2 as well, emacs automatically builds pdf-tools for windows. (you just have to open a pdf and answer to yes when it asks you for msys2)
at the same time, it kind of looks like emacs from gnu already has image support?

Captura de Ecrã (247)

The only thing that is kind of bothering me right now, (and this is probably my fault, I think), is the fact that when I cd into a directory, the terminal takes ages to re-appear....

EDIT: I've found out that there is possibility that it is not my fault
-> https://www.reddit.com/r/emacs/comments/j2batm/me_again_i_know_sorry_but_cd_into_directories/

@m-parashar
Copy link
Owner

ImageMagick support was a quick and dirty patch (with credits to many developers in the community) for those who needed it. It also introduced bugs and instability as a result and was not very stable with pdf-tools rendering either. Emacs 27 has indeed introduced its own image handling, which is good enough if not as feature-rich as imagemagick. I released a 27.1 stock build on 30th last month. See if it works as it should.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants