Page 1 of 1

picturefold error

Posted: 2018-06-04T12:49:45-07:00
by pim
Hello,
I am a absolute beginner with IM.
Just tried two scripts from Fred: stainedglass worked - picturefold dind't

My system:
Ubuntu 18.04 LTS
Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114

And here what I get:
CASE1: no image map.jpg is produced at all...
>> picturefold.sh -n 5 ~/Downloads/birdofparadise/cartoon-parrot.jpg ~/Downloads/birdofparadise/map.jpg
convert-im6.q16: DistributedPixelCache '127.0.0.1' @ error/distribute-cache.c/ConnectPixelCacheServer/244.
convert-im6.q16: cache resources exhausted `/tmp/picturefold_1_3913.mpc' @ error/cache.c/OpenPixelCache/3982.
convert-im6.q16: unable to persist pixel cache `/tmp/picturefold_1_3913.mpc' @ error/mpc.c/ReadMPCImage/963.
convert-im6.q16: no such image `black' @ error/mogrify.c/MogrifyImageList/8770.
convert-im6.q16: no images defined `/tmp/picturefold_1_3913.mpc' @ error/convert.c/ConvertImageCommand/3258.

CASE2: image map.jpg is produced without an error message. However, the output file is just a vertical piece of the input file - the 1/n most left tile f the input file.
>> picturefold.sh ~/Downloads/birdofparadise/birdofparadise.gif ~/Downloads/birdofparadise/map.jpg

Any idea why I observe such a strange beaviour?

Cheers, pim

Re: picturefold error

Posted: 2018-06-04T13:01:43-07:00
by fmw42
I can confirm it is not working properly in the current 6.9.9.40 Q16 Mac OSX. I will look into it. Something has changed in ImageMagick. I will get back when I have it fixed.

Re: picturefold error

Posted: 2018-06-04T13:15:24-07:00
by fmw42
OK. I think it is fixed. Download the lasted version from my web site with today's date and try it. Let me know if it now works OK.

Re: picturefold error

Posted: 2018-06-05T12:03:26-07:00
by pim
Thanx for your reply.
If I use the new script with the birdofparadise.gif as input everything works perfectly.
However, with cartoon-parrot.jpg as input an error messages appears...
Can you help decode the thrown error?

Code: Select all

>picturefold.sh birdofparadise.gif map.jpg 
>
>picturefold.sh cartoon-parrot.jpg map.jpg 
convert-im6.q16: DistributedPixelCache '127.0.0.1' @ error/distribute-cache.c/ConnectPixelCacheServer/244.
convert-im6.q16: cache resources exhausted `./picturefold_1_4035.mpc' @ error/cache.c/OpenPixelCache/3982.
convert-im6.q16: unable to persist pixel cache `./picturefold_1_4035.mpc' @ error/mpc.c/ReadMPCImage/963.
convert-im6.q16: no such image `black' @ error/mogrify.c/MogrifyImageList/8770.
convert-im6.q16: no images defined `./picturefold_1_4035.mpc' @ error/convert.c/ConvertImageCommand/3258.
>

Re: picturefold error

Posted: 2018-06-05T15:28:00-07:00
by fmw42
What is your current version of ImageMagick? The new script worked fine for me with the cartoon-parrot2.jpg from my web site on both IM 6.9.7.4 and 6.9.9.40. Do you have enough memory or any restrictions from the policy.xml file? Do other large images fail or just cartoon_parrot.jpg?

Re: picturefold error

Posted: 2018-06-05T23:08:01-07:00
by pim
As already mentioned in my first post:
Ubuntu 18.04 LTS
ImageMagick 6.9.7-4 Q16 x86_64 20170114 -> no changes made after Installation.
  • What are the critical entries in the policy.xml file?
  • I'll try another large picture in the evening today

Re: picturefold error

Posted: 2018-06-06T10:45:49-07:00
by fmw42
The last update of your script was 20170114 i.e. Jan 14, 2017. So that is about 6 months old. You might check with the Ubuntu distribution people to see if there is a more current update. But your error message seems to imply that cache resources have been exhausted. I believe that this means that you are exceeding some limitation either in your directory limits or your server limits or ImageMagick policy limits.

Re: picturefold error

Posted: 2018-06-06T12:37:36-07:00
by pim

Code: Select all

sudo apt-get upgrade
does not change the version of Imagemagick.

in the /etc/ImageMagick-6/policy.xml file it looks as follows:

Code: Select all

<policymap>
  <!-- <policy domain="resource" name="temporary-path" value="/tmp"/> -->
  <policy domain="resource" name="memory" value="1GiB"/>
  <policy domain="resource" name="map" value="1GiB"/>
  <policy domain="resource" name="width" value="16KP"/>
  <policy domain="resource" name="height" value="16KP"/>
  <policy domain="resource" name="area" value="128MB"/>
  <policy domain="resource" name="disk" value="10GiB"/>
  <!-- <policy domain="resource" name="file" value="768"/> -->
  <!-- <policy domain="resource" name="thread" value="4"/> -->
  <!-- <policy domain="resource" name="throttle" value="0"/> -->
  <!-- <policy domain="resource" name="time" value="3600"/> -->
  <!-- <policy domain="system" name="precision" value="6"/> -->
  <!-- not needed due to the need to use explicitly by mvg: -->
  <!-- <policy domain="delegate" rights="none" pattern="MVG" /> -->
  <!-- use curl -->
  <policy domain="delegate" rights="none" pattern="URL" />
  <policy domain="delegate" rights="none" pattern="HTTPS" />
  <policy domain="delegate" rights="none" pattern="HTTP" />
  <!-- in order to avoid to get image with password text -->
  <!-- <policy domain="path" rights="none" pattern="@*"/> -->
  <policy domain="cache" name="shared-secret" value="passphrase" stealth="true"/>
</policymap>
What seems odd to me is that

Code: Select all

picturefold.sh birdofparadise.gif map.gif
works perfectly fine whereas both

Code: Select all

picturefold.sh cartoon_parrot2.jpg map.gif
picturefold.sh cartoon_parrot2.gif map.gif
do throw the error mentioned in the earlier post.
The size of the files are in the order mentioned above: 123 kB, 29 kB and 109 kB.

Can this really be an problem of size?

What about the error line?

Code: Select all

convert-im6.q16: no such image `black' @ error/mogrify.c/MogrifyImageList/8770.
And here some more information on directory limits (df -i)

Code: Select all

Dateisystem      Inodes IBenutzt    IFrei IUse% EingehÃĪngt auf
udev             471774      608   471166    1% /dev
tmpfs            479121     1129   477992    1% /run
/dev/sda5       5496832   231307  5265525    5% /
tmpfs            479121       69   479052    1% /dev/shm
tmpfs            479121        5   479116    1% /run/lock
tmpfs            479121       18   479103    1% /sys/fs/cgroup
/dev/loop0          670      670        0  100% /snap/gnome-system-monitor/39
/dev/loop1         2755     2755        0  100% /snap/notepad-plus-plus/42
/dev/loop4          670      670        0  100% /snap/gnome-system-monitor/41
/dev/loop6        45405    45405        0  100% /snap/vlc/365
/dev/loop7         2964     2964        0  100% /snap/pycharm-community/60
/dev/loop11        1597     1597        0  100% /snap/gnome-characters/96
/dev/loop12        1784     1784        0  100% /snap/gnome-logs/31
/dev/loop13        2953     2953        0  100% /snap/pycharm-community/62
/dev/loop14       12841    12841        0  100% /snap/core/4650
/dev/loop15       38344    38344        0  100% /snap/vlc/190
/dev/loop2          669      669        0  100% /snap/gnome-system-monitor/36
/dev/loop20        1271     1271        0  100% /snap/gnome-calculator/167
/dev/loop3         1719     1719        0  100% /snap/gnome-logs/34
/dev/loop5         9459     9459        0  100% /snap/notepad-plus-plus/53
/dev/loop8        27660    27660        0  100% /snap/gnome-3-26-1604/62
/dev/loop9         1591     1591        0  100% /snap/gnome-characters/86
/dev/loop10        1585     1585        0  100% /snap/gnome-characters/69
/dev/loop17        1783     1783        0  100% /snap/gnome-logs/25
/dev/loop16       27660    27660        0  100% /snap/gnome-3-26-1604/59
/dev/loop19       12831    12831        0  100% /snap/core/4571
/dev/loop21       12819    12819        0  100% /snap/core/4486
/dev/loop22        1244     1244        0  100% /snap/gnome-calculator/154
/dev/loop24        1271     1271        0  100% /snap/gnome-calculator/170
/dev/loop18       27651    27651        0  100% /snap/gnome-3-26-1604/64
/dev/loop25        2755     2755        0  100% /snap/notepad-plus-plus/37
/dev/loop23        2955     2955        0  100% /snap/pycharm-community/64
tmpfs            479121       24   479097    1% /run/user/120
tmpfs            479121       41   479080    1% /run/user/1000

Re: picturefold error

Posted: 2018-06-06T12:55:29-07:00
by fmw42
Errors further down your list are likely due to the error at the beginning. When something fails and it cannot access an image, then other errors can follow subsequently. So the first thing to find out is why it is failing for those images with the issue with the cache.

I would suggest you post a message to the bugs forum and link to this topic. The IM developers would know more than I do about such cache limits and errors.

The input file sizes are not necessarily relevant due to compression or limited colors. What is relevant is how much disk and memory they need once they are read and converted to 24-bit uncompressed color and then how many temp versions my script creates to do the processing (in this case two temp mic files) plus the output.

What do you get if you do

Code: Select all

cd /tmp
ls -al
Do you have any restrictions on your Download folder?

Re: picturefold error

Posted: 2018-06-06T13:10:54-07:00
by fmw42
If you email me directly, I can create a version of the script with echo messages so we can at least track down where in the script it fails. (fmw at alink dot net)

Re: picturefold error

Posted: 2018-06-06T14:11:23-07:00
by pim
This is what I get:

Code: Select all

>> /tmp$ ls -al
insgesamt 64
drwxrwxrwt 15 root       root       4096 Jun  6 23:04 .
drwxr-xr-x 24 root       root       4096 Mai 24 21:11 ..
drwxrwxrwt  2 root       root       4096 Jun  6 23:03 .ICE-unix
drwxrwxrwt  2 root       root       4096 Jun  6 23:03 .Test-unix
-r--r--r--  1 gdm        gdm          11 Jun  6 23:03 .X1024-lock
drwxrwxrwt  2 root       root       4096 Jun  6 23:03 .X11-unix
drwxrwxrwt  2 root       root       4096 Jun  6 23:03 .XIM-unix
drwxrwxrwt  2 root       root       4096 Jun  6 23:03 .font-unix
drwx------  2 usrname usrname 4096 Jun  6 23:04 Temp-2d2645c2-6674-4974-a0ac-bb4403e96013
-rw-------  1 usrname usrname    0 Jun  6 23:03 config-err-pK5qFr
drwx------  2 usrname usrname 4096 Jun  6 23:03 ssh-Y6Xoj5IOkLoP
drwx------  3 root       root       4096 Jun  6 23:03 systemd-private-43b84fe7ed064aa293a6427deebf8cfb-bolt.service-au9NLN
drwx------  3 root       root       4096 Jun  6 23:03 systemd-private-43b84fe7ed064aa293a6427deebf8cfb-colord.service-4TZAqY
drwx------  3 root       root       4096 Jun  6 23:04 systemd-private-43b84fe7ed064aa293a6427deebf8cfb-fwupd.service-wk2s1M
drwx------  3 root       root       4096 Jun  6 23:03 systemd-private-43b84fe7ed064aa293a6427deebf8cfb-rtkit-daemon.service-BWI8bM
drwx------  3 root       root       4096 Jun  6 23:03 systemd-private-43b84fe7ed064aa293a6427deebf8cfb-systemd-resolved.service-pWcO3W
drwx------  3 root       root       4096 Jun  6 23:03 systemd-private-43b84fe7ed064aa293a6427deebf8cfb-systemd-timesyncd.service-XdmQ7K
I will write you a pm for a debugging version of the script. Thank you a lot!

Re: picturefold error

Posted: 2018-06-06T15:38:02-07:00
by fmw42
OK. I do not see any large files or left over from ImageMagick.