Errors on batch processing

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
mgo
Posts: 2
Joined: 2019-03-17T02:55:46-07:00
Authentication code: 1152

Errors on batch processing

Post by mgo » 2019-03-17T03:14:31-07:00

I am getting once every few days (let's say every 30 batch runs) a lot of errors from ImageMagick.
The errors cannot be reproduced right after, so I suspect batch processing nature of the problem.
The processed files are correct, and the errors cannot be reproduced while processing a single file.

I will post the errors, perhaps you will have an idea what happens.
Batch run 1:

Code: Select all

composite: improper image header `/home/events/2019/03/15/14652/872287/dsc-1-13_baae18_940x627_border.png' @ error/png.c/ReadPNGImage/4291.
composite:  `/home/events/2019/03/15/14652/872287/dsc-1-13_baae18_940x627_border.png' @ error/composite.c/CompositeImageCommand/1627.
composite: IDAT: CRC error `/home/events/2019/03/15/14652/872288/dsc-1-14_2835e3_940x627_border.png' @ error/png.c/MagickPNGErrorHandler/1714.
composite:  `/home/events/2019/03/15/14652/872288/dsc-1-14_2835e3_940x627_border.png' @ error/composite.c/CompositeImageCommand/1627.
composite: IDAT: CRC error `/home/events/2019/03/15/14652/872292/dsc-1-18_7ca1e0_940x627_border.png' @ error/png.c/MagickPNGErrorHandler/1714.
composite:  `/home/events/2019/03/15/14652/872292/dsc-1-18_7ca1e0_940x627_border.png' @ error/composite.c/CompositeImageCommand/1627.
convert: Premature end of JPEG file `/home/events/2019/03/15/14652/872293/dsc-1-19_e22eaf.jpg' @ warning/jpeg.c/JPEGWarningHandler/396.
convert: Corrupt JPEG data: premature end of data segment `/home/events/2019/03/15/14652/872293/dsc-1-19_e22eaf.jpg' @ warning/jpeg.c/JPEGWarningHandler/396.
composite: IDAT: CRC error `/home/events/2019/03/15/14652/872293/dsc-1-19_e22eaf_940x627_border.png' @ error/png.c/MagickPNGErrorHandler/1714.
composite:  `/home/events/2019/03/15/14652/872293/dsc-1-19_e22eaf_940x627_border.png' @ error/composite.c/CompositeImageCommand/1627.
convert: Premature end of JPEG file `/home/events/2019/03/15/14652/872293/dsc-1-19_e22eaf.jpg' @ warning/jpeg.c/JPEGWarningHandler/396.
convert: Corrupt JPEG data: premature end of data segment `/home/events/2019/03/15/14652/872293/dsc-1-19_e22eaf.jpg' @ warning/jpeg.c/JPEGWarningHandler/396.
convert: Premature end of JPEG file `/home/events/2019/03/15/14652/872293/dsc-1-19_e22eaf.jpg' @ warning/jpeg.c/JPEGWarningHandler/396.
convert: Corrupt JPEG data: premature end of data segment `/home/events/2019/03/15/14652/872293/dsc-1-19_e22eaf.jpg' @ warning/jpeg.c/JPEGWarningHandler/396.
convert: Premature end of JPEG file `/home/events/2019/03/15/14652/872293/dsc-1-19_e22eaf.jpg' @ warning/jpeg.c/JPEGWarningHandler/396.
convert: Corrupt JPEG data: premature end of data segment `/home/events/2019/03/15/14652/872293/dsc-1-19_e22eaf.jpg' @ warning/jpeg.c/JPEGWarningHandler/396.
composite: IDAT: CRC error `/home/events/2019/03/15/14652/872294/dsc-1-20_4266c2_940x627_border.png' @ error/png.c/MagickPNGErrorHandler/1714.
composite:  `/home/events/2019/03/15/14652/872294/dsc-1-20_4266c2_940x627_border.png' @ error/composite.c/CompositeImageCommand/1627.
Not a JPEG file: starts with 0x00 0x00
convert: IDAT: CRC error `/home/events/2019/03/15/14652/872295/dsc-1-21_317185_940x627_border.png' @ error/png.c/MagickPNGErrorHandler/1714.
convert: no images defined `/home/events/2019/03/15/14652/872295/dsc-1-21_317185_940x627_border.jpg' @ error/convert.c/ConvertImageCommand/3300.
Aborted
Not a JPEG file: starts with 0x00 0x00
composite: IDAT: CRC error `/home/events/2019/03/15/14652/872297/dsc-1-23_1e454f_940x627_border.png' @ error/png.c/MagickPNGErrorHandler/1714.
composite:  `/home/events/2019/03/15/14652/872297/dsc-1-23_1e454f_940x627_border.png' @ error/composite.c/CompositeImageCommand/1627.
composite: IDAT: CRC error `/home/events/2019/03/15/14652/872299/dsc-1-25_f28d7c_940x627_border.png' @ error/png.c/MagickPNGErrorHandler/1714.
composite:  `/home/events/2019/03/15/14652/872299/dsc-1-25_f28d7c_940x627_border.png' @ error/composite.c/CompositeImageCommand/1627.
composite: IDAT: CRC error `/home/events/2019/03/15/14652/872300/dsc-1-26_a3fe1f_940x627_border.png' @ error/png.c/MagickPNGErrorHandler/1714.
composite:  `/home/events/2019/03/15/14652/872300/dsc-1-26_a3fe1f_940x627_border.png' @ error/composite.c/CompositeImageCommand/1627.
The commands are nothing special:
composite with -gravity SouthEast creating the _border.png file (why "improper image header" since the file is created by IM?)
and then convert, which scales/crops.

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

Re: Errors on batch processing

Post by snibgo » 2019-03-17T03:29:12-07:00

The error messages are consistent with running an IM command on an input image file before it has been fully written. Perhaps your batch process detects a file and starts processing it before a previous process has finished writing it.
snibgo's IM pages: im.snibgo.com

mgo
Posts: 2
Joined: 2019-03-17T02:55:46-07:00
Authentication code: 1152

Re: Errors on batch processing

Post by mgo » 2019-03-18T08:33:07-07:00

Dear Snibgo. I will investigate this possibility. It is likely. Thank you!

Post Reply