Silent failure on change timestamp

Reported bugs that have been closed and/or resolved

Moderators: helmut, XnTriq, xnview, Dreamer

Post Reply
CameronD
Posts: 311
Joined: Wed Aug 01, 2007 1:28 pm
Location: Australia

Silent failure on change timestamp

Post by CameronD »

I have several images which refuse to update exif timestamps using the Tools->Change Timestamp menu.
Eventually I identified the cause, by running the same operation through exiftool from the command line.
Exiftool returns the error message:

Code: Select all

Error: Error reading StripOffsets data in IFD0 - filename
This is a known problem, where some other software creates invalid headers by retaining parameters specific to the original TIFF format.
The cause and a workaround is given in the exiftool forums.

The problem with XnViewMP is that it fails silently, instead of reporting an error message. The user has no evidence that the operation has failed.

A small example with the bad exif content is attached:
Attachments
Example of image with invalid IFD0 block
Example of image with invalid IFD0 block
example-bad-ifd0.jpg (31.92 KiB) Viewed 1895 times
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Silent failure on change timestamp

Post by xnview »

i can't reproduce, please send me the file?
Pierre.
CameronD
Posts: 311
Joined: Wed Aug 01, 2007 1:28 pm
Location: Australia

Re: Silent failure on change timestamp

Post by CameronD »

If you download the attached example, it still had the bad Exif header.
try "Change Timestamp" - you will see there is no DateDigitized assigned.
Try to assign some value, such as Date Taken, or current date.
Write.
Nothing changes.
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Silent failure on change timestamp

Post by xnview »

i've tried to change 'Date taken' or 'Date modified' and it works
Pierre.
CameronD
Posts: 311
Joined: Wed Aug 01, 2007 1:28 pm
Location: Australia

Re: Silent failure on change timestamp

Post by CameronD »

That's weird. I was trying to add a new item DateDigitized rather than modify an existing one.
I have "Create Metadata if needed enabled" ticked - I think this is critical.

First, check that your test image still has the bad IFD0 contents:
The exiftool listing inside XnViewMP should show:

EXIF: Strip Offsets 5026

Curiously, when I select the EXIF tab on the same file, it shows
Strip Offsets 4996
I think this difference is simply an artifact of the fact that the value is invalid anyway. 4996 is the actual value stored, and 5026 is that number added to the jpeg header byte count.

exiftool 10.04
When run manually, exiftool gives:

Code: Select all

$ exiftool '-Exif:DateTimeOriginal=1983:03:19 15:00:00' example-bad-ifd0.jpg 
Error: Error reading StripOffsets data in IFD1 - example-bad-ifd0-2.jpg
    0 image files updated
    1 files weren't updated due to errors
It refers to an error in IFD1, but I think that is because IFD0:StripOffsets points into the middle of the IFD1:Thumbnail area.

XnViewMP x64 0.76.1 (Oct 23 2015), Win 7
  • "Create Metadata if needed enabled" is ticked
  • assign the Exif:CreateDate (DateDigitized) results in nothing happening.
  • alter the Exif:ModifyDate results in nothing happening.
  • Untick Create metadata if needed and then alter the Exif:ModifyDate results in: date changed!
XnViewMP 32-bit 0.76.1 (Oct 23 2015), Win 7
I have a separate installation on the same machine, with separate ini files, DB etc.
The result is the same as for 64-bit.

Xnview 2.33
I have tried the operation on the test file with this version of classic.
The DateDigitized value is greyed out, but ticked. When I assign a new value the Exif:Date Taken then it changes the date, but returns with the image file highlighted in bright red.
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Silent failure on change timestamp

Post by xnview »

See Issue 758 for current status and details.
Pierre.
User avatar
helmut
Posts: 8704
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: Silent failure on change timestamp

Post by helmut »

This problem is supposed to be fixed in XnView MP 0.79 or later. Could you please try and confirm the bug fix, CameronD?
CameronD
Posts: 311
Joined: Wed Aug 01, 2007 1:28 pm
Location: Australia

Re: Silent failure on change timestamp

Post by CameronD »

helmut wrote:This problem is supposed to be fixed in XnView MP 0.79 or later. Could you please try and confirm the bug fix, CameronD?
Confirmed - the program now generates an error message and fails to modify the file.
This is appropriate action, as the user needs to try to understand the nature of the corruption in order to correct it.

For the record, I used the following exiftool command to overwrite the corrupted exif block:

Code: Select all

exiftool -exif:all= -tagsfromfile @ -exif:all -thumbnailimage -unsafe filename
User avatar
helmut
Posts: 8704
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: Silent failure on change timestamp

Post by helmut »

Thank you for your confirming the bug fix, CameronD.

:arrow: Closed
Post Reply