Page 1 of 1

Linux bug with mogrify resize command [SOLVED]

Posted: 2016-10-13T03:39:26-07:00
by JohnBobSmith
Greetings,

My reason for registering here is because I would like to report a bug with the mogrify -resize command. Information is as follows:

My operating system:

Code: Select all

[jbs@dmb-gaming-laptop images]$ uname -sr
Linux 4.7.5-1-ARCH
My version of mogrify:

Code: Select all

[jbs@dmb-gaming-laptop images]$ mogrify --version
Version: ImageMagick 6.9.5-10 Q16 x86_64 2016-09-22 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenCL OpenMP 
Delegates (built-in): bzlib cairo fontconfig freetype gslib jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png ps rsvg tiff webp wmf x xml zlib
[jbs@dmb-gaming-laptop images]$ 
How to re-produce the error, truncated because of length:

Code: Select all

[jbs@dmb-gaming-laptop images]$ ls
avatar.png
[jbs@dmb-gaming-laptop images]$ mogrify -resize 100x100 avatar.png 
LLVM ERROR: Cannot select: 0x106da90: v2i32,ch = REGISTER_LOAD 0x15b20c0, 0x15ac080, TargetConstant:i32<0>, undef:i32
  0x15ac080: i32 = srl 0x15a69c0, Constant:i32<2>
    0x15a69c0: i32 = add 0xf56ab0, Constant:i32<8>
      0xf56ab0: i32 = srl 0x15b2580, Constant:i32<13>
        0x15b2580: i32 = add 0x15b2320, 0x15ac670
          0x15b2320: i32 = and 0x106f700, Constant:i32<65536>
            0x106f700: i32 = shl 0x15b2dd0, Constant:i32<1>
              0x15b2dd0: i32 = select_cc 0x13fd980, Constant:i32<0>, 0x15ac2e0, 0x15af8f0, seteq:ch
                0x13fd980: i32 = srl 0x15af8f0, Constant:i32<23>
                  0x15af8f0: i32 = bitcast 0x15a6af0

                  0x15a98b0: i32 = Constant<23>
                0xf5ee90: i32 = Constant<0>
                0x15ac2e0: i32 = bitcast 0xf53bc0
                  0xf53bc0: f32 = fadd 0x15a62a0, ConstantFP:f32<-1.000000e+00>
Full error: http://sprunge.us/OKAS

I hope this is sufficient information. What I am wondering is, if this is NOT the fault of ImageMagick and/or mogrify, what am I doing wrong? I thank you for all help in the matter. :)

Re: Linux bug with mogrify resize command

Posted: 2016-10-13T09:31:09-07:00
by fmw42
Please provide your input image. Have you tried

Code: Select all

convert avatar.png -resize 100x100 result.png
There is really no point to use mogrify for processing one image. It is much less functional than convert.

Re: Linux bug with mogrify resize command

Posted: 2016-10-13T12:15:15-07:00
by snibgo
I've never seen an error message anything like that. Where has it come from? What is a "LVVM ERROR"? Why does it say "In function: AddNoise"?

Re: Linux bug with mogrify resize command

Posted: 2016-10-13T16:15:56-07:00
by JohnBobSmith
A random input image from google: https://www.newton.ac.uk/files/covers/968361.jpg causes the same result as in the original post. Oddly enough, the convert command does the same thing:

Code: Select all

jbs@dmb-gaming-laptop images]$ convert random02.jpg -resize 100x100 result.png
LLVM ERROR: Cannot select: 0x24acb30: v2i32,ch = REGISTER_LOAD 0x25631a0, 0x247a170, TargetConstant:i32<0>, undef:i32
...
 0x255e2a0: i32 = TargetConstant<0>
  0x2317360: i32 = undef
In function: AddNoise
It may be possible I am missing a package or dependency, and that I may not have the most up to date version of the ImageMagick suite. I am working on solving these possible issues now.

@snibgo
According to Wikipedia, LLVM is:
LLVM Wikipedia Page wrote: The LLVM compiler infrastructure project (formerly Low Level Virtual Machine) is a "collection of modular and reusable compiler and toolchain technologies"[3] used to develop compiler front ends and back ends.
Why this relates back to mogrify and/or ImageMagick though, I have no idea.

Re: Linux bug with mogrify resize command

Posted: 2016-10-13T16:26:38-07:00
by fmw42
This works perfectly fine for me on IM 6.9.6.1 Q16 Mac OSX

Code: Select all

convert -version
Version: ImageMagick 6.9.6-1 Q16 x86_64 2016-10-09 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP 
Delegates (built-in): bzlib cairo fftw fontconfig freetype gslib jbig jng jp2 jpeg lcms lqr ltdl lzma openexr png ps rsvg tiff webp x xml zlib

Code: Select all

convert 968361.jpg -resize 100x100 tmp.png
Perhaps your IM version has been corrupted. Try reinstalling or better upgrading.

Are you running the command via some other software that calls IM? If so, perhaps the error is there.

Re: Linux bug with mogrify resize command

Posted: 2016-10-13T16:28:22-07:00
by JohnBobSmith
I am running IM only from the command line as shown. I will try a re-install now.

EDIT: The re-install did nothing. The error remains.

Re: Linux bug with mogrify resize command

Posted: 2016-10-13T16:57:02-07:00
by snibgo
I don't know what to suggest, other than re-building without OpenCL.

Re: Linux bug with mogrify resize command

Posted: 2016-10-13T16:59:44-07:00
by JohnBobSmith
I seem to have made a mistake with my packages, and I am now downloading 300MB or so of updates. This will most likely fix the issue. If it does, I will mark the topic as solved. Thank you for your time. :)

EDIT 10/15/2016:
It appears that I do not have the latest version of imagemagick available in my repositories at this time. I am going to mark this bug report as solved however, because this no longer appears to be a real bug or issue which the developers can of imagemagick can fix.