Converting a .doc file fails, rewrites original

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
laurent_csw
Posts: 12
Joined: 2014-01-15T03:35:30-07:00
Authentication code: 6789

Converting a .doc file fails, rewrites original

Post by laurent_csw »

Hello all,

I'm having a problem with a specific use case of ImageMagick: the conversion of an MS Word document to a bitmap fails with a strange error, and furthermore, the original file is rewritten (with the same data) so its timestamp changes.

Here is the error:

Code: Select all

$ convert file.doc file.jpg
convert: unable to open file `file.doc': No such file or directory @ error/fpx.c/ReadFPXImage/268.
convert: no images defined `file.jpg' @ error/convert.c/ConvertImageCommand/3187.
Here is an extract of the execution where it shows the file being opened first read-only, then read-write, and rewritten:

Code: Select all

17269:  open("file.doc", O_RDONLY)                      = 3
17269:  lseek(3, 0, SEEK_SET)                           = 0
17269:  fstat(3, 0xFFFFFD7FFFDF5F00)                    = 0
17269:  fstat(3, 0xFFFFFD7FFFDF5E50)                    = 0
17269:  ioctl(3, TCGETA, 0xFFFFFD7FFFDF5EC0)            Err#25 ENOTTY
17269:  read(3, "D0CF11E0A1B11AE1\0\0\0\0".., 4096)     = 4096
17269:  lseek(3, 0xFFFFFFFFFFFFF018, SEEK_CUR)          = 24
17269:  close(3)                                        = 0
17269:  open("file.doc", O_RDWR)                        = 3
17269:  lseek(3, 0, SEEK_CUR)                           = 0
17269:  lseek(3, 0, SEEK_SET)                           = 0
17269:  fstat(3, 0xFFFFFD7FFFDF5E00)                    = 0
17269:  fstat(3, 0xFFFFFD7FFFDF5D50)                    = 0
17269:  ioctl(3, TCGETA, 0xFFFFFD7FFFDF5DC0)            Err#25 ENOTTY
17269:  read(3, "D0CF11E0A1B11AE1\0\0\0\0".., 4096)     = 4096
17269:  lseek(3, 0, SEEK_SET)                           = 0
17269:  read(3, "D0CF11E0A1B11AE1\0\0\0\0".., 4096)     = 4096
17269:  lseek(3, 0, SEEK_END)                           = 46080
17269:  lseek(3, 0, SEEK_CUR)                           = 46080
If the same ImageMagick is rebuilt without FPX support:

Code: Select all

$ convert file.doc file.jpg
convert: no decode delegate for this image format `FPX' @ error/constitute.c/ReadImage/501.
convert: no images defined `Intercultural_Sensitivity_Questionnaire.jpg' @ error/convert.c/ConvertImageCommand/3187.
The operation seems so basic, I don't see what I could be doing wrong?

It is ImageMagic 6.8.9-1, with libfpx 1.3.1-4, on Solaris 10 x86, built with GCC 4.9.
The issue appears with multiple unrelated .doc files.

If there's any more information I can provide, just ask.

Thanks in advance for any suggestion,

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

Re: Converting a .doc file fails, rewrites original

Post by magick »

We can reproduce the problem you posted and have a patch in ImageMagick 6.8.9-2 Beta available by sometime tomorrow. Thanks.
laurent_csw
Posts: 12
Joined: 2014-01-15T03:35:30-07:00
Authentication code: 6789

Re: Converting a .doc file fails, rewrites original

Post by laurent_csw »

Thank you, much appreciated!

Laurent
laurent_csw
Posts: 12
Joined: 2014-01-15T03:35:30-07:00
Authentication code: 6789

Re: Converting a .doc file fails, rewrites original

Post by laurent_csw »

Confirmed fixed with a build of the -2-20140517 beta. Thanks again!

Laurent
Post Reply