[CLOSED] IM hangs on special clients

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?".
Locked
lagraf
Posts: 5
Joined: 2019-11-18T05:03:28-07:00
Authentication code: 1152

[CLOSED] IM hangs on special clients

Post by lagraf »

Hi guys,
I'm developer and I integrated IM commandline in one of my apps to resize and resample pics. On my own Pcs (W7 SP1, 32bit and 64bit) it runs without problems. I installed IM and app at some clients Pcs (W7 SP1, 32bit), but there IM hangs, I only can interrupt with Ctrl+C. If I give same IM calls from DOS prompt, same problem happens:

- Same pics run on my own PCs
- magick input.jpg -quality 0 output.jpg --> with no resize or resample it runs
- magick input.jpg -resample 72x72 -quality 0 output.jpg --> with resample it hangs
- magick input.jpg -resize 283 -quality 0 output.jpg hangs --> with resize it hangs

On clients Pcs there are some other image processing apps like photoshop and many other diff programs. Maybe there's an app which is in conflict with IM? Does anyone have an idea? Is there a possibility to trace and log IM commandline call?

Regards

snibgo
Posts: 13034
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: IM hangs on special clients

Post by snibgo »

I assume W7 is Windows 7. What version of IM?

Please provide sample inputs where the command hangs, and show those commands. Images can be uploaded to anywhere on the internet, and paste the URLs here.
snibgo's IM pages: im.snibgo.com

User avatar
dlemstra
Posts: 1625
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: IM hangs on special clients

Post by dlemstra »

I suspect that this is happening due to OpenCL benchmarks that run the first time when you execute an operation that can use the GPU.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate

lagraf
Posts: 5
Joined: 2019-11-18T05:03:28-07:00
Authentication code: 1152

Re: IM hangs on special clients

Post by lagraf »

Windows 7 yes.
I tried ImageMagick-7.0.9-2-Q16-x86-dll and ImageMagick-7.0.9-5-portable-Q16-x86.
A test image you find at http://www.rachbauer.org/input.jpg but you can use any bigger image.
Sample input hangs, every time when resample or resize is used:
magick input.jpg -resample 72x72 -quality 0 output.jpg
magick input.jpg -resize 283 -quality 0 output.jpg

snibgo
Posts: 13034
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: IM hangs on special clients

Post by snibgo »

Your commands on your image work fine for me, IM v7.0.8-64 on Windows 8.1. Another user might test with a more recent version.

You have "-quality 0" but the documentation https://www.imagemagick.org/script/comm ... hp#quality says:
For the JPEG and MPEG image formats, quality is 1 (lowest image quality and highest compression) to 100 (best quality but least effective compression).
snibgo's IM pages: im.snibgo.com

lagraf
Posts: 5
Joined: 2019-11-18T05:03:28-07:00
Authentication code: 1152

Re: IM hangs on special clients

Post by lagraf »

The commands work fine at my own 2 PCs (Win7 32 and 64bit), they also work at client network on 2 PCs (Server and Boss). But they don't work at 4 PCs (Win7 32bit), which are used for imaging photos of models. What could be the diff between these PCs, so some work and others not?

I think -quality 0 couldn't be the origin of the problem, cause "magick input.jpg -quality 0 output.jpg" works on all PCs.

snibgo
Posts: 13034
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: IM hangs on special clients

Post by snibgo »

So, IM works on some Win7 32bit machines but not others? I suggest you try a re-installation.
snibgo's IM pages: im.snibgo.com

lagraf
Posts: 5
Joined: 2019-11-18T05:03:28-07:00
Authentication code: 1152

Re: IM hangs on special clients

Post by lagraf »

I already tried IM installation and IM portable on diff machines, I tested IM with "magick logo: logo.gif" and all calls without resize and resample run on all machines! Only when using resize or resample it hangs on some PCs. These PCs are those where other imaging software is installed.

User avatar
dlemstra
Posts: 1625
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: IM hangs on special clients

Post by dlemstra »

Have you tried to wait and see what happens if you keep it running for a bit longer? I am pretty sure that the "hang" that you are seeing is an OpenCl benchmark that needs to run the first time that you execute an action that can use the GPU.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate

lagraf
Posts: 5
Joined: 2019-11-18T05:03:28-07:00
Authentication code: 1152

Re: IM hangs on special clients

Post by lagraf »

I think you are right!
My App makes a timeout after 10sec with no reply from IM, so this benchmark never comes to an end. Now I made a bat command and let it run on all machines, sometimes 30-60 secs, and now it does well! Another thing I saw while running this bat was that screen went dark and was restored with a message from the GPU.

Thank you for your help!
Do I have to close this thread?

Locked