Skip to content

Error: magick.c:229: GetImageMagick: Assertion `magick != (const unsigned char *) NULL' failed. #1705

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

Closed
igorescobar opened this issue Jul 5, 2020 · 9 comments

Comments

@igorescobar
Copy link

Hey guys,

I recently moved away from the libvips that comes with sharp by default and I started to see these errors on my logs:

app.js: ../../magick/magick.c:229: GetImageMagick: Assertion `magick != (const unsigned char *) NULL' failed.

I stumbled on some issues regarding libmagick (which I do not have installed):

* optional dependencies
use fftw3 for FFT: 			yes
Magick package: 			none
Magick API version: 			none
load with libMagick: 			no
save with libMagick: 			no
accelerate loops with orc: 		yes

Is this error expected? The right way to fix it is by setting ./configure --without-magick flag?

@jcupitt
Copy link
Member

jcupitt commented Jul 5, 2020

../../magick/magick.c:229 is in the imagemagick source, so you must have it installed somewhere.

libvips won't be calling it if it hasn't been detected, so I think some other part of your system must be trying to use imagemagick to detect file types.

@igorescobar
Copy link
Author

igorescobar commented Jul 5, 2020

@jcupitt I noticed that I had this installed libmagickwand-dev it might have tricked the configure step on the build.

@lovell
Copy link
Member

lovell commented Jul 6, 2020

@igorescobar If you're using ImageMagick v7 then #1642 fixes this problem if you're passing zero-length Buffer or Stream instances to sharp's constructor.

@igorescobar
Copy link
Author

I tried to remove libmagick and libmagickwand completely but then .rotate() stopped working. I'm trying to find out why.

@igorescobar
Copy link
Author

igorescobar commented Jul 6, 2020

@jcupitt I just noticed that you have this on v8.9.2:
fix regression in autorot [malomalo]

Would that be the reason why .rotate() stopped working when I removed libmagic? (I'm using sharp with v8.9.1)

@jcupitt
Copy link
Member

jcupitt commented Jul 6, 2020

I doubt it, but you'd need to post code demonstrating the problem before I could check.

@lovell
Copy link
Member

lovell commented Jul 6, 2020

@igorescobar This is the libvips repo. Please open a new issue on the sharp repo if you have questions about sharp, making sure you provide complete answers to all of the questions the relevant issue template asks. https://github.com/lovell/sharp/issues/new/choose

@igorescobar
Copy link
Author

igorescobar commented Jul 6, 2020

Hey guys,

Sorry about the confusion I never know if the issue is from sharp or libvips.

I removed a few more dependencies from my build, also replaced libexif-gtk-dev by libexif-dev and the issue with the rotation seems to be gone now. I will deploy it soon and will let you know if the error in question also disappeared.

@igorescobar
Copy link
Author

igorescobar commented Jul 6, 2020

Yeah,

Removing libmagic solved the issue for now. Let's see what happens when that sweet animated gifs support gets released and I have to add it back again 😅

Thanks a bunch, guys!

👋

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

3 participants