JPG to PDF Conversion Stuck

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.
Post Reply
organicveggie
Posts: 5
Joined: 2010-06-17T16:01:25-07:00
Authentication code: 8675308

JPG to PDF Conversion Stuck

Post by organicveggie »

I'm running ImageMagick 6.6.2-6 2010-06-17 Q16 compiled from source on CentOS 5.5 64 bit. Actually, first I installed the RPM from CentOS and ran into this very problem. So I uninstalled the RPM and compiled from source.

Code: Select all

$ identify --version
Version: ImageMagick 6.6.2-6 2010-06-17 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: OpenMP 

$ uname -a 
Linux myserver 2.6.18-194.3.1.el5 #1 SMP Thu May 13 13:08:30 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
When I try to convert any jpg to pdf, convert just hangs. I'm running as a non-root user. Here's the debug output:

Code: Select all

$ convert -debug all /tmp/mycompany/downloads/154721598/mycompany-downloads-3553668676186542830.jpg my-test.pdf
17:37:09 0:01 0.000u 6.2.8 Configure convert[13625]: utility.c/ExpandFilenames/803/Configure
  Command line: convert{-debug}{all}{/tmp/mycompany/downloads/154721598/mycompany-downloads-3553668676186542830.jpg}{my-test.pdf}
17:37:09 0:01 0.000u 6.2.8 Configure convert[13625]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/lib64/ImageMagick-6.2.8/config/coder.xml"
17:37:09 0:01 0.000u 6.2.8 Configure convert[13625]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/ImageMagick-6.2.8/config/coder.xml"
17:37:09 0:01 0.000u 6.2.8 Configure convert[13625]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/doc/ImageMagick-6.2.8/coder.xml"
17:37:09 0:01 0.000u 6.2.8 Configure convert[13625]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/ImageMagick-6.2.8/coder.xml"
17:37:09 0:01 0.000u 6.2.8 Configure convert[13625]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/home/mycompany/.magick/coder.xml"
17:37:09 0:01 0.000u 6.2.8 Configure convert[13625]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "coder.xml"
17:37:09 0:01 0.000u 6.2.8 Configure convert[13625]: coder.c/LoadCoderList/612/Configure
  Loading coder file "/usr/share/ImageMagick-6.2.8/config/coder.xml" ...
17:37:09 0:01 0.000u 6.2.8 Module convert[13625]: module.c/OpenModule/1063/Module
  Searching for module "JPEG" using filename "jpeg.la"
17:37:09 0:01 0.000u 6.2.8 Module convert[13625]: module.c/GetMagickModulePath/583/Module
  Searching for coder module file "jpeg.la" ...
17:37:09 0:01 0.000u 6.2.8 Module convert[13625]: module.c/OpenModule/1083/Module
  Opening module at path "/usr/lib64/ImageMagick-6.2.8/modules-Q16/coders/jpeg.la"
17:37:09 0:01 0.000u 6.2.8 Module convert[13625]: module.c/OpenModule/1118/Module
  Method "RegisterJPEGImage" in module "JPEG" at address 0x2b924339ce60
17:37:09 0:01 0.000u 6.2.8 Module convert[13625]: module.c/OpenModule/1133/Module
  Method "UnregisterJPEGImage" in module "JPEG" at address 0x2b924339ce40
17:37:09 0:01 0.000u 6.2.8 Blob convert[13625]: blob.c/OpenBlob/2021/Blob
    read 4096 magic header bytes
17:37:09 0:01 0.000u 6.2.8 Cache convert[13625]: cache.c/DestroyCacheInfo/1763/Cache
  destroy 
17:37:09 0:01 0.000u 6.2.8 Configure convert[13625]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/lib64/ImageMagick-6.2.8/config/magic.xml"
17:37:09 0:01 0.000u 6.2.8 Configure convert[13625]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/ImageMagick-6.2.8/config/magic.xml"
17:37:09 0:01 0.000u 6.2.8 Configure convert[13625]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/doc/ImageMagick-6.2.8/magic.xml"
17:37:09 0:01 0.000u 6.2.8 Configure convert[13625]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/ImageMagick-6.2.8/magic.xml"
17:37:09 0:01 0.000u 6.2.8 Configure convert[13625]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/home/mycompany/.magick/magic.xml"
17:37:09 0:01 0.000u 6.2.8 Configure convert[13625]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "magic.xml"
17:37:09 0:01 0.000u 6.2.8 Configure convert[13625]: magic.c/LoadMagicList/671/Configure
  Loading magic file "/usr/share/ImageMagick-6.2.8/config/magic.xml" ...
17:37:09 0:01 0.000u 6.2.8 Blob convert[13625]: blob.c/OpenBlob/2021/Blob
    read 4096 magic header bytes
17:37:09 0:01 0.000u 6.2.8 Coder convert[13625]: jpeg.c/ReadJPEGImage/815/Coder
  Interlace: nonprogressive
17:37:09 0:01 0.000u 6.2.8 Coder convert[13625]: jpeg.c/ReadJPEGImage/817/Coder
  Data precision: 8
17:37:09 0:01 0.000u 6.2.8 Coder convert[13625]: jpeg.c/ReadJPEGImage/819/Coder
  Geometry: 658x658
17:37:09 0:01 0.000u 6.2.8 Coder convert[13625]: jpeg.c/ReadJPEGImage/899/Coder
  Quality: 80
17:37:09 0:01 0.000u 6.2.8 Coder convert[13625]: jpeg.c/ReadJPEGImage/992/Coder
  Colorspace: RGB
17:37:09 0:01 0.000u 6.2.8 Coder convert[13625]: jpeg.c/ReadJPEGImage/1019/Coder
  Sampling Factors: 2x2,1x1,1x1
17:37:09 0:01 0.000u 6.2.8 Resource convert[13625]: resource.c/AcquireMagickResource/216/Resource
  Area: 3.3mb/3.3mb/2.9gb
17:37:09 0:01 0.000u 6.2.8 Resource convert[13625]: resource.c/AcquireMagickResource/216/Resource
  Memory: 3.3mb/3.3mb/2.2gb
17:37:09 0:01 0.000u 6.2.8 Cache convert[13625]: cache.c/OpenCache/3035/Cache
  open /tmp/mycompany/downloads/154721598/mycompany-downloads-3553668676186542830.jpg[0] (anonymous memory, 3.3mb)
17:37:09 0:01 0.020u 6.2.8 Module convert[13625]: module.c/OpenModule/1063/Module
  Searching for module "PDF" using filename "pdf.la"
17:37:09 0:01 0.020u 6.2.8 Module convert[13625]: module.c/GetMagickModulePath/583/Module
  Searching for coder module file "pdf.la" ...
17:37:09 0:01 0.020u 6.2.8 Module convert[13625]: module.c/OpenModule/1083/Module
  Opening module at path "/usr/lib64/ImageMagick-6.2.8/modules-Q16/coders/pdf.la"
17:37:09 0:01 0.020u 6.2.8 Module convert[13625]: module.c/OpenModule/1118/Module
  Method "RegisterPDFImage" in module "PDF" at address 0x2b92438f4230
17:37:09 0:01 0.020u 6.2.8 Module convert[13625]: module.c/OpenModule/1133/Module
  Method "UnregisterPDFImage" in module "PDF" at address 0x2b92438f4210
17:37:09 0:01 0.020u 6.2.8 Configure convert[13625]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/lib64/ImageMagick-6.2.8/config/delegates.xml"
17:37:09 0:01 0.020u 6.2.8 Configure convert[13625]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/ImageMagick-6.2.8/config/delegates.xml"
17:37:09 0:01 0.020u 6.2.8 Configure convert[13625]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/doc/ImageMagick-6.2.8/delegates.xml"
17:37:09 0:01 0.020u 6.2.8 Configure convert[13625]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/ImageMagick-6.2.8/delegates.xml"
17:37:09 0:01 0.020u 6.2.8 Configure convert[13625]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/home/mycompany/.magick/delegates.xml"
17:37:09 0:01 0.020u 6.2.8 Configure convert[13625]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "delegates.xml"
17:37:09 0:01 0.020u 6.2.8 Configure convert[13625]: delegate.c/LoadDelegateList/1126/Configure
  Loading delegate file "/usr/lib64/ImageMagick-6.2.8/config/delegates.xml" ...
Any bright ideas?

-Sean
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: JPG to PDF Conversion Stuck

Post by magick »

Add --disable-openmp to your configure command line. Now rebuild and reinstall. Does it work now?
organicveggie
Posts: 5
Joined: 2010-06-17T16:01:25-07:00
Authentication code: 8675308

Re: JPG to PDF Conversion Stuck

Post by organicveggie »

Add --disable-openmp to your configure command line. Now rebuild and reinstall. Does it work now?
Sadly, no. First I just re-ran configure (with the --disable-openmp option), make and make install. That didn't solve the problem. So I blew away the source folder, re-downloaded the tarball and started the whole process over. No dice. Same problem.

-Sean
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: JPG to PDF Conversion Stuck

Post by magick »

This is curious. You mentioned you installed ImageMagick 6.6.2 but debug output shows 6.2.8:
  • /usr/lib64/ImageMagick-6.2.8/config/delegates.xml
You may have two versions of ImageMagick installed.
organicveggie
Posts: 5
Joined: 2010-06-17T16:01:25-07:00
Authentication code: 8675308

Re: JPG to PDF Conversion Stuck

Post by organicveggie »

magick wrote:This is curious. You mentioned you installed ImageMagick 6.6.2 but debug output shows 6.2.8:
  • /usr/lib64/ImageMagick-6.2.8/config/delegates.xml
You may have two versions of ImageMagick installed.
Hrmph. Maybe it's left over from the RPM?

I guess I'll spend some quality time cleaning out every reference to ImageMagick I can find on the system... and then start fresh. Hopefully that will straighten things out.

Thanks for the catch.

-S
organicveggie
Posts: 5
Joined: 2010-06-17T16:01:25-07:00
Authentication code: 8675308

Re: JPG to PDF Conversion Stuck

Post by organicveggie »

organicveggie wrote:
magick wrote:This is curious. You mentioned you installed ImageMagick 6.6.2 but debug output shows 6.2.8:
  • /usr/lib64/ImageMagick-6.2.8/config/delegates.xml
You may have two versions of ImageMagick installed.
Hrmph. Maybe it's left over from the RPM?

I guess I'll spend some quality time cleaning out every reference to ImageMagick I can find on the system... and then start fresh. Hopefully that will straighten things out.

Thanks for the catch.

-S
Okay. Cleaned everything out. Turned out I had extra copies left over from the CentOS RPM of animate, convert, identify, etc in /usr/bin. Whoops. Once I finally removed those, rebuilt and reinstall, everything worked fine. Thanks again for the help.

-Sean
NickyKln
Posts: 1
Joined: 2011-04-28T06:05:54-07:00
Authentication code: 8675308

Re: JPG to PDF Conversion Stuck

Post by NickyKln »

Hello,

I have just installed the Version ImageMagick 6.2.8 10/20/10 Q16 from RPM from CentOS (64 Bits) and I have the same problem.
The conversion JPG to PDF is stucked, the process never ends. No CPU usage but nothing happen, I have to kill the process.

>convert -verbose 66399-1303993634353.jpg toto.pdf
66399-1303993634353.jpg JPEG 1419x1001 1419x1001+0+0 DirectClass 48kb

----------------- ENV ------------------------------------
Version: ImageMagick 6.2.8 10/20/10 Q16 file:/usr/share/ImageMagick-6.2.8/doc/index.html
Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC


Linux XXXXXXXXX-01 2.6.18-194.17.4.el5 #1 SMP Mon Oct 25 15:50:53 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

Do you have any idea ? Do I need to uninstall this version and compile the version 6.2.2 ???

Thanks a lot for your answer.


N

Actually I don't have 2 version installed, because I have installed only once version
organicveggie
Posts: 5
Joined: 2010-06-17T16:01:25-07:00
Authentication code: 8675308

Re: JPG to PDF Conversion Stuck

Post by organicveggie »

NickyKln wrote: Do you have any idea ? Do I need to uninstall this version and compile the version 6.2.2 ???
I didn't have any luck with the 6.2 series. I ended up using 6.6.4-10 and that seems to work for me.

The only catch is that if you uninstall the version of ImageMagick that comes with CentOS you have to make sure you get rid of all ImageMagick files.

-Sean
Post Reply