Page 1 of 1

'convert' hangs up at 1%

Posted: 2009-03-15T05:45:24-07:00
by jstar
Hi,
I appreciate ImageMagic.

But recently, my convert.exe of ImageMagick 6.3.8 02/21/08 Q16
frequently occurs hang-up on Windows XP SP3, cygwin, Perl 5.0, Windows command prompt environment. The PC is Z61p, Core 2 Duo.

By making and excuting 4 times a test program envoking convert infinitely from Perl system() command, I got the result of hang-up after 39, 124, 145, 29 times conversion respectively.

The core command is this:

Code: Select all

$conv_command = "C:/usr/bin/convert -quiet X:/ew_ext_disk/db/drawing2/3072/30728034.pdf X:/ew_ext_disk/db/drawing2/3072/30728034.jpg";
Here, X: is the device letter for aux HDD .

If it is normal state, the command returns control to Perl application program in 1 to 2 seconds, and sometimes 3 to 10 seconds when CPU or I/O is busy. But at last the caller program stops and would not go even I wait for hours.
If I kill the 'convert' subprocess by Windows Task Manager, it returns error code 1 (for Perl 256 * 1) to the caller and the caller's re-try suceeds.

In past, after several hours after hang-up of convert occurred, Windows XP turned to be in a whole hang-up state, so even window manipulation operations could not work before Windows re-booting. I've seen such severe trouble because of convert, twice.

The hang-ups occur not only at X: but also at S:, so no hardware trouble is related, I guess.

Referring this old post:
viewtopic.php?f=2&t=6481
I added the debug option to the convert command like this:

Code: Select all

$conv_command = "C:/usr/bin/convert -debug all X:/ew_ext_disk/db/drawing2/3072/30728034.pdf X:/ew_ext_disk/db/drawing2/3072/30728034.jpg";
The debug output as follows.
The list stopped at the ****** point of the loop.
(The part after ***** is what should be written if normal process went, and really missing.)

Code: Select all

:
:
/ProcSet [/PDF /Text]
>>
endobj
7 0 obj
<< /Length 507034 /Filter /FlateDecode>>
stream

xレ・y8被゚?~1イd゚・B・・ニ・JdッT
Cイ・ツ拇DQノ ["蕓・遭e3カc諚M<<゚銷}~マq・゚マ8ホs\輹樒{ス゚・念ェhJ(モ戓ン・疹E"憚・役`W;ュq沆UUeuQ・ヌネ・ノ^笏ェ・サ鳥・iu5v%#kc	Mv%絳Jヘ鈷畢%釆ロイ[恆~ヲホ\gM-L::
2009-03-15T20:21:24+09:00 0:01 0.125u 6.3.8 Resource convert[5028]: resource.c/AcquireUniqueFileResource/428/Resource
  C:/DOCUME~1/sono/LOCALS~1/Temp/magick-pqKbJWD8
2009-03-15T20:21:24+09:00 0:01 0.125u 6.3.8 Resource convert[5028]: resource.c/AcquireUniqueFileResource/400/Resource
  X:/ew_ext_disk/db/drawing2/3072/30728034.pdf
2009-03-15T20:21:24+09:00 0:01 0.125u 6.3.8 Resource convert[5028]: resource.c/AcquireUniqueFileResource/428/Resource
  C:/DOCUME~1/sono/LOCALS~1/Temp/magick-J0nWOGbe
2009-03-15T20:21:24+09:00 0:01 0.469u 6.3.8 Coder convert[5028]: pdf.c/InvokePostscriptDelegate/177/Coder
  Ghostscript returns status -101, exit code 0
*****
2009-03-15T20:21:24+09:00 0:02 0.484u 6.3.8 Blob convert[2488]: blob.c/OpenBlob/2325/Blob
    read 3 magic header bytes
2009-03-15T20:21:24+09:00 0:02 0.484u 6.3.8 Cache convert[2488]: cache.c/DestroyCacheInfo/2162/Cache
  destroy 
2009-03-15T20:21:24+09:00 0:02 0.484u 6.3.8 Module convert[2488]: module.c/OpenModule/1074/Module
  Searching for module "PNM" using filename "IM_MOD_RL_PNM_.dll"
2009-03-15T20:21:24+09:00 0:02 0.484u 6.3.8 Module convert[2488]: module.c/GetMagickModulePath/479/Module
  Searching for coder module file "IM_MOD_RL_PNM_.dll" ...
2009-03-15T20:21:24+09:00 0:02 0.484u 6.3.8 Configure convert[2488]: nt-base.c/NTRegistryKeyLookup/1610/Configure
  SOFTWARE\ImageMagick\6.3.8\Q:16
2009-03-15T20:21:24+09:00 0:02 0.484u 6.3.8 Configure convert[2488]: nt-base.c/NTRegistryKeyLookup/1628/Configure
:
:
* You can't read some lines in the above stream part, but it might be OK.

Regards,

Re: 'convert' occurs hang-on 0.01%

Posted: 2009-03-15T08:11:20-07:00
by magick
Can you download the latest ImageMagick release, 6.5.0, and see if you can reproduce the problem? If the problem persists with this release we will investigate further.

Re: 'convert' hangs up at 1%

Posted: 2009-03-15T19:15:16-07:00
by jstar

As for the continued tests of the old version 6.3.8,
10,000 times convert repetition had ended when I awoke in this morning, but the state of Windows XP was terrible, in which the size and position of each window varies constantly, and all that I could was to kill the floating windows one by one. At the same time, a resident program had displayed error comfirmation dialogues 'Can't draw on the canvas OK?', four times.
I am sure some resource lack was brought on by the conversion repetition.
The first convert repetition of the old version 6.3.8 after the Windows re-boot ended at only 6-th conversion.

Can you download the latest ImageMagick release, 6.5.0, and see if you can reproduce the problem?
All right. After your request, I downloaded your latest version, ImageMagick-6.5.0-0-Q16-windows-dll.exe, and installed it in another directory.

At the present time of updating this article, 116,500 'convert' executions have succeeded, and the state of Windows XP is still normal.
I am sure the problem has already solved between versions 6.3.8 and 6.5.0.

Thank you.