Error with "magick convert"

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Awlwot
Posts: 5
Joined: 2018-09-22T03:28:19-07:00
Authentication code: 1152

Error with "magick convert"

Post by Awlwot »

Hi guys,

I'm trying to use Pywal on archlinux. Pywal relies on imagemagick and the latter bugs when I run the "convert" command. See for instance:

Code: Select all

magick convert ~/Images/Wallpapers/sea_ocean_sand_stone_splash_93546_2560x1080.jpg -resize 25%                                                                                                                                                                                                                                                                                                               :(
convert:  `25%' @ error/convert.c/ConvertImageCommand/3285.
Any idea how I could fix this 3285 error?

Thanks a lot.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Error with "magick convert"

Post by Bonzo »

You do not need to use convert with magick. I assume as you are trying to use magick you are using a version 7 of Imagemagick?
User avatar
GeeMack
Posts: 718
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

Re: Error with "magick convert"

Post by GeeMack »

Awlwot wrote: 2018-09-22T03:36:41-07:00Any idea how I could fix this 3285 error?
Your command doesn't have an output file name.

And as Bonzo mentioned, when you're using IM7 you should be using the command "magick" not "magick convert".
Awlwot
Posts: 5
Joined: 2018-09-22T03:28:19-07:00
Authentication code: 1152

Re: Error with "magick convert"

Post by Awlwot »

Thank you Bonzo and GeeMack for your help.

I'm using IM7:

Code: Select all

magick -version
Version: ImageMagick 7.0.8-11 Q16 x86_64 2018-08-29 https://www.imagemagick.org
Copyright: © 1999-2018 ImageMagick Studio LLC
License: https://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenCL OpenMP 
Delegates (built-in): bzlib cairo fontconfig freetype gslib heic jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png ps raw rsvg tiff web
I tried to run the same command without "convert" in it and with an output file name, and got the following error:

Code: Select all

magick ~/Images/Wallpapers/sea_ocean_sand_stone_splash_93546_2560x1080.jpg -resize 25% test1.jpg                                                                                       :(
Error: 4 unsupported relocations
Error: 4 unsupported relocations
Error: 4 unsupported relocations
Error: 4 unsupported relocations
Error: 4 unsupported relocations
[1]    1721 segmentation fault (core dumped)  magick ~/Images/Wallpapers/sea_ocean_sand_stone_splash_93546_2560x1080.jpg 

Any idea?

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

Re: Error with "magick convert"

Post by fmw42 »

What is your platform?

Are you sure that the image is in the right directory, spelled correctly, the path is correct and that it is not corrupted. Try moving the image to your working directory where you are issuing you command and where you are saving the output. Does that work as:

Code: Select all

magick sea_ocean_sand_stone_splash_93546_2560x1080.jpg -resize 25% test1.jpg
If that fails try

Code: Select all

magick identify -verbose sea_ocean_sand_stone_splash_93546_2560x1080.jpg
Does that return errors?
Awlwot
Posts: 5
Joined: 2018-09-22T03:28:19-07:00
Authentication code: 1152

Re: Error with "magick convert"

Post by Awlwot »

Hi fmw42,

I'm using archlinux (4.18.9-arch1-1-ARCH). I guess the issue is not with the image itself, as I've also tried with other images.

I've moved the image to my working directory and I still get a "core dumped" error:

Code: Select all

magick sea_ocean_sand_stone_splash_93546_2560x1080.jpg -resize 25% test1.jpg
Error: 4 unsupported relocations
Error: 4 unsupported relocations
Error: 4 unsupported relocations
Error: 4 unsupported relocations
Error: 4 unsupported relocations
[1]    2543 segmentation fault (core dumped)  magick sea_ocean_sand_stone_splash_93546_2560x1080.jpg -resize 25% test1.jpg
and here is the output of the verbose command:

Code: Select all

magick identify -verbose sea_ocean_sand_stone_splash_93546_2560x1080.jpg                                      :(
Image: sea_ocean_sand_stone_splash_93546_2560x1080.jpg
  Format: JPEG (Joint Photographic Experts Group JFIF format)
  Mime type: image/jpeg
  Class: DirectClass
  Geometry: 2560x1080+0+0
  Units: Undefined
  Colorspace: sRGB
  Type: TrueColor
  Base type: Undefined
  Endianess: Undefined
  Depth: 8-bit
  Channel depth:
    Red: 8-bit
    Green: 8-bit
    Blue: 8-bit
  Channel statistics:
    Pixels: 2764800
    Red:
      min: 49  (0.192157)
      max: 255 (1)
      mean: 172.561 (0.676711)
      standard deviation: 37.2643 (0.146135)
      kurtosis: -0.0948928
      skewness: -0.652861
      entropy: 0.928515
    Green:
      min: 34  (0.133333)
      max: 255 (1)
      mean: 174.608 (0.684737)
      standard deviation: 25.6146 (0.100449)
      kurtosis: 0.289878
      skewness: -0.183469
      entropy: 0.862672
    Blue:
      min: 8  (0.0313725)
      max: 255 (1)
      mean: 170.134 (0.667193)
      standard deviation: 20.8685 (0.0818371)
      kurtosis: 1.3589
      skewness: 0.0817361
      entropy: 0.803713
  Image statistics:
    Overall:
      min: 8  (0.0313725)
      max: 255 (1)
      mean: 172.434 (0.676213)
      standard deviation: 27.9158 (0.109474)
      kurtosis: 0.786219
      skewness: -0.478405
      entropy: 0.864967
  Rendering intent: Perceptual
  Gamma: 0.454545
  Chromaticity:
    red primary: (0.64,0.33)
    green primary: (0.3,0.6)
    blue primary: (0.15,0.06)
    white point: (0.3127,0.329)
  Matte color: grey74
  Background color: white
  Border color: srgb(223,223,223)
  Transparent color: none
  Interlace: None
  Intensity: Undefined
  Compose: Over
  Page geometry: 2560x1080+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: JPEG
  Quality: 97
  Orientation: Undefined
  Properties:
    comment: CREATOR: gd-jpeg v1.0 (using IJG JPEG v80), quality = 97


    date:create: 2018-09-23T09:17:00+02:00
    date:modify: 2018-02-03T18:26:21+01:00
    jpeg:colorspace: 2
    jpeg:sampling-factor: 2x2,1x1,1x1
    signature: 182d11fbedc0f3c12ce645a5faf8583c0db08a4daf19a5765b5e52f97849f015
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 879369B
  Number pixels: 2764800
  Pixels per second: 138.24MB
  User time: 0.030u
  Elapsed time: 0:01.020
  Version: ImageMagick 7.0.8-11 Q16 x86_64 2018-08-29 https://www.imagemagick.org
Thanks a lot,
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Error with "magick convert"

Post by magick »

We need a stack trace before we can offer a solution to the problem you reported. Try these commands and post the stack trace here so we can review:

Code: Select all

gdb magick
run sea_ocean_sand_stone_splash_93546_2560x1080.jpg -resize 25% test1.jpg
bt
Awlwot
Posts: 5
Joined: 2018-09-22T03:28:19-07:00
Authentication code: 1152

Re: Error with "magick convert"

Post by Awlwot »

Hi magick,

Here is the result:

Code: Select all

gdb magick
GNU gdb (GDB) 8.2
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from magick...(no debugging symbols found)...done.
(gdb) run sea_ocean_sand_stone_splash_93546_2560x1080.jpg -resize 25% test1.jpg
Starting program: /usr/bin/magick sea_ocean_sand_stone_splash_93546_2560x1080.jpg -resize 25% test1.jpg
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffe96bf700 (LWP 8874)]
[New Thread 0x7fffe8d7d700 (LWP 8875)]
[New Thread 0x7fffe3fff700 (LWP 8876)]
[New Thread 0x7fffe37fe700 (LWP 8877)]
[New Thread 0x7fffe2ffd700 (LWP 8878)]
[New Thread 0x7fffe27fc700 (LWP 8879)]
[New Thread 0x7fffe1ffb700 (LWP 8880)]
[New Thread 0x7fffe17fa700 (LWP 8881)]
[New Thread 0x7fffe0ff9700 (LWP 8882)]
[New Thread 0x7fffbffff700 (LWP 8883)]
[New Thread 0x7fffbf7fe700 (LWP 8884)]
[New Thread 0x7fffbeffd700 (LWP 8885)]
[New Thread 0x7fffbe7fc700 (LWP 8886)]
[New Thread 0x7fffbdffb700 (LWP 8887)]
[New Thread 0x7fffbd7fa700 (LWP 8888)]
[New Thread 0x7fffbcff9700 (LWP 8889)]
[New Thread 0x7fff9ffff700 (LWP 8890)]
[New Thread 0x7fff97fff700 (LWP 8891)]
[New Thread 0x7fff9f7fe700 (LWP 8892)]
[New Thread 0x7fff9effd700 (LWP 8893)]
[Thread 0x7fff9f7fe700 (LWP 8892) exited]
[Thread 0x7fff9effd700 (LWP 8893) exited]
[Thread 0x7fff97fff700 (LWP 8891) exited]
[Thread 0x7fff9ffff700 (LWP 8890) exited]
[Thread 0x7fffbcff9700 (LWP 8889) exited]
[Thread 0x7fffbd7fa700 (LWP 8888) exited]
[Thread 0x7fffbdffb700 (LWP 8887) exited]
[Thread 0x7fffbe7fc700 (LWP 8886) exited]
[New Thread 0x7fff9effd700 (LWP 8894)]
[New Thread 0x7fff9f7fe700 (LWP 8895)]
[New Thread 0x7fff97fff700 (LWP 8896)]
[New Thread 0x7fff9ffff700 (LWP 8897)]
[New Thread 0x7fff9e7fc700 (LWP 8898)]
Error: 4 unsupported relocations
Error: 4 unsupported relocations
Error: 4 unsupported relocations
Error: 4 unsupported relocations
Error: 4 unsupported relocations

Thread 1 "magick" received signal SIGSEGV, Segmentation fault.
0x00007ffff7a17a6e in _int_malloc () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007ffff7a17a6e in _int_malloc () from /usr/lib/libc.so.6
#1  0x00007ffff7a19ada in malloc () from /usr/lib/libc.so.6
#2  0x00007ffff3d8e5fd in operator new (sz=240) at /build/gcc/src/gcc/libstdc++-v3/libsupc++/new_op.cc:50
#3  0x00007ffff11c7231 in ?? () from /usr/lib/libMesaOpenCL.so.1
#4  0x00007ffff12a9f49 in clSetEventCallback () from /usr/lib/libOpenCL.so
#5  0x00007ffff7dea84d in ?? () from /usr/lib/libMagickCore-7.Q16HDRI.so.6
#6  0x00007ffff11e175e in ?? () from /usr/lib/libMesaOpenCL.so.1
#7  0x00007ffff11e2160 in ?? () from /usr/lib/libMesaOpenCL.so.1
#8  0x00007ffff11c7252 in ?? () from /usr/lib/libMesaOpenCL.so.1
#9  0x00007ffff12a9f49 in clSetEventCallback () from /usr/lib/libOpenCL.so
#10 0x00007ffff7dea84d in ?? () from /usr/lib/libMagickCore-7.Q16HDRI.so.6
#11 0x00007ffff11e175e in ?? () from /usr/lib/libMesaOpenCL.so.1
#12 0x00007ffff11e2160 in ?? () from /usr/lib/libMesaOpenCL.so.1
#13 0x00007ffff11c7252 in ?? () from /usr/lib/libMesaOpenCL.so.1
#14 0x00007ffff12a9f49 in clSetEventCallback () from /usr/lib/libOpenCL.so
#15 0x00007ffff7dea84d in ?? () from /usr/lib/libMagickCore-7.Q16HDRI.so.6
#16 0x00007ffff11e175e in ?? () from /usr/lib/libMesaOpenCL.so.1
#17 0x00007ffff11e2160 in ?? () from /usr/lib/libMesaOpenCL.so.1
#18 0x00007ffff11c7252 in ?? () from /usr/lib/libMesaOpenCL.so.1
#19 0x00007ffff12a9f49 in clSetEventCallback () from /usr/lib/libOpenCL.so
#20 0x00007ffff7dea84d in ?? () from /usr/lib/libMagickCore-7.Q16HDRI.so.6
#21 0x00007ffff11e175e in ?? () from /usr/lib/libMesaOpenCL.so.1
#22 0x00007ffff11e2160 in ?? () from /usr/lib/libMesaOpenCL.so.1
#23 0x00007ffff11c7252 in ?? () from /usr/lib/libMesaOpenCL.so.1
#24 0x00007ffff12a9f49 in clSetEventCallback () from /usr/lib/libOpenCL.so
#25 0x00007ffff7dea84d in ?? () from /usr/lib/libMagickCore-7.Q16HDRI.so.6
#26 0x00007ffff11e175e in ?? () from /usr/lib/libMesaOpenCL.so.1
#27 0x00007ffff11e2160 in ?? () from /usr/lib/libMesaOpenCL.so.1
#28 0x00007ffff11c7252 in ?? () from /usr/lib/libMesaOpenCL.so.1
#29 0x00007ffff12a9f49 in clSetEventCallback () from /usr/lib/libOpenCL.so
#30 0x00007ffff7dea84d in ?? () from /usr/lib/libMagickCore-7.Q16HDRI.so.6
#31 0x00007ffff11e175e in ?? () from /usr/lib/libMesaOpenCL.so.1
#32 0x00007ffff11e2160 in ?? () from /usr/lib/libMesaOpenCL.so.1
#33 0x00007ffff11c7252 in ?? () from /usr/lib/libMesaOpenCL.so.1
#34 0x00007ffff12a9f49 in clSetEventCallback () from /usr/lib/libOpenCL.so
#35 0x00007ffff7dea84d in ?? () from /usr/lib/libMagickCore-7.Q16HDRI.so.6
#36 0x00007ffff11e175e in ?? () from /usr/lib/libMesaOpenCL.so.1
#37 0x00007ffff11e2160 in ?? () from /usr/lib/libMesaOpenCL.so.1
#38 0x00007ffff11c7252 in ?? () from /usr/lib/libMesaOpenCL.so.1
#39 0x00007ffff12a9f49 in clSetEventCallback () from /usr/lib/libOpenCL.so
#40 0x00007ffff7dea84d in ?? () from /usr/lib/libMagickCore-7.Q16HDRI.so.6
#41 0x00007ffff11e175e in ?? () from /usr/lib/libMesaOpenCL.so.1
#42 0x00007ffff11e2160 in ?? () from /usr/lib/libMesaOpenCL.so.1
#43 0x00007ffff11c7252 in ?? () from /usr/lib/libMesaOpenCL.so.1
#44 0x00007ffff12a9f49 in clSetEventCallback () from /usr/lib/libOpenCL.so
#45 0x00007ffff7dea84d in ?? () from /usr/lib/libMagickCore-7.Q16HDRI.so.6
#46 0x00007ffff11e175e in ?? () from /usr/lib/libMesaOpenCL.so.1
#47 0x00007ffff11e2160 in ?? () from /usr/lib/libMesaOpenCL.so.1
#48 0x00007ffff11c7252 in ?? () from /usr/lib/libMesaOpenCL.so.1
#49 0x00007ffff12a9f49 in clSetEventCallback () from /usr/lib/libOpenCL.so
#50 0x00007ffff7dea84d in ?? () from /usr/lib/libMagickCore-7.Q16HDRI.so.6
#51 0x00007ffff11e175e in ?? () from /usr/lib/libMesaOpenCL.so.1
#52 0x00007ffff11e2160 in ?? () from /usr/lib/libMesaOpenCL.so.1
#53 0x00007ffff11c7252 in ?? () from /usr/lib/libMesaOpenCL.so.1
#54 0x00007ffff12a9f49 in clSetEventCallback () from /usr/lib/libOpenCL.so
#55 0x00007ffff7dea84d in ?? () from /usr/lib/libMagickCore-7.Q16HDRI.so.6
#56 0x00007ffff11e175e in ?? () from /usr/lib/libMesaOpenCL.so.1
#57 0x00007ffff11e2160 in ?? () from /usr/lib/libMesaOpenCL.so.1
#58 0x00007ffff11c7252 in ?? () from /usr/lib/libMesaOpenCL.so.1
#59 0x00007ffff12a9f49 in clSetEventCallback () from /usr/lib/libOpenCL.so
#60 0x00007ffff7dea84d in ?? () from /usr/lib/libMagickCore-7.Q16HDRI.so.6
#61 0x00007ffff11e175e in ?? () from /usr/lib/libMesaOpenCL.so.1
#62 0x00007ffff11e2160 in ?? () from /usr/lib/libMesaOpenCL.so.1
#63 0x00007ffff11c7252 in ?? () from /usr/lib/libMesaOpenCL.so.1
#64 0x00007ffff12a9f49 in clSetEventCallback () from /usr/lib/libOpenCL.so
#65 0x00007ffff7dea84d in ?? () from /usr/lib/libMagickCore-7.Q16HDRI.so.6
#66 0x00007ffff11e175e in ?? () from /usr/lib/libMesaOpenCL.so.1
#67 0x00007ffff11e2160 in ?? () from /usr/lib/libMesaOpenCL.so.1
#68 0x00007ffff11c7252 in ?? () from /usr/lib/libMesaOpenCL.so.1
#69 0x00007ffff12a9f49 in clSetEventCallback () from /usr/lib/libOpenCL.so
#70 0x00007ffff7dea84d in ?? () from /usr/lib/libMagickCore-7.Q16HDRI.so.6
#71 0x00007ffff11e175e in ?? () from /usr/lib/libMesaOpenCL.so.1
#72 0x00007ffff11e2160 in ?? () from /usr/lib/libMesaOpenCL.so.1
#73 0x00007ffff11c7252 in ?? () from /usr/lib/libMesaOpenCL.so.1
#74 0x00007ffff12a9f49 in clSetEventCallback () from /usr/lib/libOpenCL.so
#75 0x00007ffff7dea84d in ?? () from /usr/lib/libMagickCore-7.Q16HDRI.so.6
--Type <RET> for more, q to quit, c to continue without paging--
Thanks for your help.
Awlwot
Posts: 5
Joined: 2018-09-22T03:28:19-07:00
Authentication code: 1152

Re: Error with "magick convert"

Post by Awlwot »

Hi guys,

Actually it seems to be a bug in mesa caused by this commit: https://github.com/mesa3d/mesa/commit/9 ... 3d235ad93a

See here for further explanations: https://bbs.archlinux.org/viewtopic.php?id=240471

Thanks,
stuartpb
Posts: 1
Joined: 2018-10-14T20:11:39-07:00
Authentication code: 1152

Re: Error with "magick convert"

Post by stuartpb »

https://bbs.archlinux.org/viewtopic.php ... 3#p1809903 states that the bug is in Magick - it's using bad shaders that the radeonsi driver won't accept (hence the "unsupported relocations" message).

Filed on GitHub as https://github.com/ImageMagick/ImageMagick/issues/1351

UPDATE: The problem was found and fixed in that issue.
Post Reply