Segmentation Fault / Bus Error after 6.6.2-0 install (OSX)

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
horseshoe7

Segmentation Fault / Bus Error after 6.6.2-0 install (OSX)

Post by horseshoe7 »

Hi,

I think the subject title sums it up. I've tried every which way to install ImageMagick 6.6.2-0, and it always ends the same. Install reports success, but when I go to check whether everything went ok (i.e. convert logo: logo.gif, etc.), it will convert to gif, tiff, and jpg, not to png, and at the end of each conversion it says

Segmentation fault

and quits. I'm trying to use ImageMagick so to be able to use the Paperclip plugin for Ruby on Rails.

Is there any special hardware requirement for running ImageMagick? I'm running OSX 10.6.0 on a netbook. I've never run into any issues with any other software on this <cough> Macbook mini...
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Segmentation Fault / Bus Error after 6.6.2-0 install (OS

Post by fmw42 »

How did you install --- from binary or from source? If the latter did you use MacPorts, FINK or manually?

To check if your IM recognizes png, type

convert -list configure

Look at the line starting with DELEGATES and see if it includes png.
horseshoe7

Re: Segmentation Fault / Bus Error after 6.6.2-0 install (OS

Post by horseshoe7 »

I initially tried from MacPorts, got this issue. Then tried from binary, same thing. Then tried some script off of github that installs from source, but without Macports. same thing.

I ran the command as you suggested, convert -list configure, and at the end of that spew it also reported a Segmentation fault.

png was listed. I'm not concerned about the conversion libs, i think there's just something generally wrong with IM.

Perhaps this is a silly question, but why is ImageMagick so unusually difficult to install ? Doing a little googling it's rather obvious that lots of people have trouble getting this up and running.

On the other hand, there don't seem to be any alternatives out there...

any help would be greatly appreciated.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Segmentation Fault / Bus Error after 6.6.2-0 install (OS

Post by snibgo »

If you are getting a segmentation fault on all IM commands, something is badly wrong. How about just "convert", which should show help and exit?

I know nothing about Macs, but what is a "Macbook mini", "netbook"? How much memory?
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Segmentation Fault / Bus Error after 6.6.2-0 install (OS

Post by fmw42 »

I suspect you have not properly remove the various installs. You need to clean up first.

Then for newbies, I would suggest just installing the binary. I went through that in the beginning with my Mac OSX Tiger. Here are some notes: viewtopic.php?f=1&t=10442 You will get most of the delegates preinstalled this way.

After doing it that way for while, I then started to install manually. Once you learn it is not really hard. I just followed the unix install notes at:http://www.imagemagick.org/download/www ... .html#unix The real issue is that if you install from source, you have to install all the delegate libraries first for things like png, gif, tif, etc, manually. Each of the various delegates may need other dependencies installed first. I managed with the simpler ones.

Now I have switched using MacPorts to install all my delegate, but then install IM manually. However, you can install IM from MacPorts if you prefer. The only issue is that MacPorts is always behind a few releases of IM and I wanted to stay up to the minute on ever release.
horseshoe7

Re: Segmentation Fault / Bus Error after 6.6.2-0 install (OS

Post by horseshoe7 »

This happened since the very first installation. If you have advice on how to clean up everything, as if IM were never there, please help!

Installing the binary did not work. Same problem.

I'm really rather frustrated because my entire approach to images and attachments was dependent on paperclip which now would require me to do all image re-sizing by hand.

If anybody knows anything about how to get this running, or if I can be of any assistance with logfiles, etc. please let me know.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Segmentation Fault / Bus Error after 6.6.2-0 install (OS

Post by snibgo »

To repeat:
If you are getting a segmentation fault on all IM commands, something is badly wrong. How about just "convert", which should show help and exit?

I know nothing about Macs, but what is a "Macbook mini", "netbook"? How much memory?
snibgo's IM pages: im.snibgo.com
horseshoe7

Re: Segmentation Fault / Bus Error after 6.6.2-0 install (OS

Post by horseshoe7 »

typing convert works as intended and returns no segmentation fault.

when typing convert -list configure, it spews some text, then gets to a line that says

NAME ImageMagick

does some stuff in the background, then eventually spits out Segmentation Fault and quits to the command prompt.

A "macbook mini" was an attempt at humour. I'm running OSX (no crazy hacked version, installed from the Snow Leopard install disc copied to a USB stick) on a Samsung NC10. I've never had any 'peculiarities' with any other packages, either installed from binaries or macports.

Thanks for any help anyone is able to offer. Really appreciate it!
horseshoe7

Re: Segmentation Fault / Bus Error after 6.6.2-0 install (OS

Post by horseshoe7 »

Bump. So has nobody else ever experienced this?

I am still frustrated, as I've tried to install ImageMagick every which way there is, and now my machine is cluttered with files and I don't know which I can keep and which I can remove, and the installation process of OSX on this netbook is *not straightforward*

Meaning, I can't re-install my OS to clean these failed attempts, and I don't know how to get rid of all of the associated files.

Thanks ImageMagick. Why is this program the first and only one that has ever been such a nightmare to install? (I'm not the only one amongst my peers with this gripe.) Surely there must be a way to simply make a stable product that doesn't have so many dependencies. That should really be the focus of development, not having the possibility of having the latest of all libraries.

Sorry, rant over.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Segmentation Fault / Bus Error after 6.6.2-0 install (OS

Post by fmw42 »

horseshoe7 wrote:Bump. So has nobody else ever experienced this?

I am still frustrated, as I've tried to install ImageMagick every which way there is, and now my machine is cluttered with files and I don't know which I can keep and which I can remove, and the installation process of OSX on this netbook is *not straightforward*

Meaning, I can't re-install my OS to clean these failed attempts, and I don't know how to get rid of all of the associated files.

Thanks ImageMagick. Why is this program the first and only one that has ever been such a nightmare to install? (I'm not the only one amongst my peers with this gripe.) Surely there must be a way to simply make a stable product that doesn't have so many dependencies. That should really be the focus of development, not having the possibility of having the latest of all libraries.

Sorry, rant over.
Most people have no problem installing IM. Especially if one uses MacPorts it is easy. MacPorts should be able to remove all your files. At worst, you can just find the macports install directory, usually /opt and delete the whole thing and start over (including installing MacPorts). If you installed manually, then the install should be in /usr/local/bin or /usr/bin. You can find out where by looking for convert, compare, mogrify, etc in those directories. One way is by typing


which convert
returns
/usr/local/bin/convert

Once you find where IM is installed (all the places) you can delete all the directories containing the name ImageMagick

for example you can type (if installed in /usr...)

find /usr | grep "ImageMagick"

and then delete all these directories.

Once you have cleaned up, then you can

1) reinstall a binary per instructions at http://www.imagemagick.org/script/binar ... php#macosx which will have many delegate libraries for jpg, png, gif, tiff etc

2) reinstall form source using MacPorts, but you need to install any of the delegate libraries that you want first with macports. then after doing all that, reinstall IM from MacPorts. see instructions at http://www.imagemagick.org/script/advan ... php#macosx
horseshoe7

Re: Segmentation Fault / Bus Error after 6.6.2-0 install (OS

Post by horseshoe7 »

First of all, THANK YOU for this guide on how remove ImageMagick from the system completely. I would also request this post gets repurposed as a sticky.

The rest of the process I haven't tried yet as I have to re-install MacPorts and have to find my XCode disc. Only one specific copy runs on 10.6.0 that also allows iPhone Dev (with iOS 3.2.1).

I'll keep you all posted. It could have been in the first place that I didn't install MacPorts entirely correctly. not sure. Doubtful but you never know.
horseshoe7

Re: Segmentation Fault / Bus Error after 6.6.2-0 install (OS

Post by horseshoe7 »

So, followed your instructions and removed everything, removed Macports.

then re-installed macports, ran the selfupdate, then installed ImageMagick. Your last post wasn't clear. If I install ImageMagick via macports then it will install the dependent libraries automatically, i assume. So I just typed

sudo port install ImageMagick

let it do its thing and it seemed to install ok. Now to test: convert logo: logo.gif

and got (surprise) an error!

Abort trap

was what it said.

Seriously, the assertion that many people don't have problems installing this is highly in doubt. Every Ruby on Rails developer I know said "ImageMagick is the biggest pain in the a** to set up".

I don't want to complain, I just hope that the dev people find a way for this to simply work. i don't understand how re-sizing and re-encoding can be made so difficult. It's been identified that 80% of users of ImageMagick only need it for simple re-sizing, cropping, creation of thumbnails, etc.

And yet there is no alternative if one wants to use Paperclip and Rails it seems. :-(

EDIT: This was with IM 6.6.3-0, and running display logo.png or display logo.gif would display the file. So the question is, is my install in a usable state?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Segmentation Fault / Bus Error after 6.6.2-0 install (OS

Post by fmw42 »

Your last post wasn't clear. If I install ImageMagick via macports then it will install the dependent libraries automatically, i assume. So I just typed
No you have to install all the image type delegates you want first as far as I know. That is what I did. Things like libtiff, libjpeg, ghostscript, etc.

Here are my delegates:

convert -list configure


DELEGATES bzlib fftw fontconfig freetype gs jpeg jng jp2 lcms lqr mpeg openexr png rsvg tiff x11 xml zlib


Though you may not need them all, you should install (jpeg, png, tiff, x11)
horseshoe7

Re: Segmentation Fault / Bus Error after 6.6.2-0 install (OS

Post by horseshoe7 »

Hi,

like I said, it appears to convert files, but doesn't finish gracefully. It always spits out a "Abort trap" before ending.

Does anyone know if my install is still useable or will this cause problems with for example RMagick?

Thanks for the help up until now!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Segmentation Fault / Bus Error after 6.6.2-0 install (OS

Post by fmw42 »

like I said, it appears to convert files, but doesn't finish gracefully. It always spits out a "Abort trap" before ending.
try something simple with debugging and report back so that the IM developers can see what might be wrong.

convert rose: -debug XXX rose.gif

where XXX could be exception, or configure or trace or all. see http://www.imagemagick.org/Usage/basics/
Post Reply