After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 327015 - 0000:00:00 00:00:00 timestamp generates error on console
0000:00:00 00:00:00 timestamp generates error on console
Status: RESOLVED NOTABUG
Product: f-spot
Classification: Other
Component: Tags
CVS
Other Linux
: Normal minor
: ---
Assigned To: F-spot maintainers
F-spot maintainers
Depends on:
Blocks:
 
 
Reported: 2006-01-15 00:19 UTC by Diego González
Modified: 2006-08-16 03:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
photo with the problem (317.68 KB, image/jpeg)
2006-01-16 23:05 UTC, Diego González
Details

Description Diego González 2006-01-15 00:19:34 UTC
i get this on the console with a set of pictures taken with a crappy camera:

new Tiff.Header timer stopped: 00:00:00.0040770
error parsing 0000:00:00 00:00:00
System.ArgumentOutOfRangeException: Argument is out of range.
Parameter name: Parameters describe an unrepresentable DateTime.
in <0x00113> System.DateTime:.ctor (Int32 year, Int32 month, Int32 day, Int32 ho ur, Int32 minute, Int32 second, Int32 millisecond)
in <0x0001e> System.DateTime:.ctor (Int32 year, Int32 month, Int32 day, Int32 ho ur, Int32 minute, Int32 second)
in <0x000f4> FSpot.Tiff.DirectoryEntry:DateTimeFromString (System.String dt)
in <0x0001b> FSpot.Tiff.DirectoryEntry:get_ValueAsDate ()
in <0x008dc> FSpot.Tiff.Header:SelectDirectory (FSpot.Tiff.ImageDirectory dir, S tatementSink sink)
error parsing 0000:00:00 00:00:00
System.ArgumentOutOfRangeException: Argument is out of range.
Parameter name: Parameters describe an unrepresentable DateTime.
in <0x00113> System.DateTime:.ctor (Int32 year, Int32 month, Int32 day, Int32 ho ur, Int32 minute, Int32 second, Int32 millisecond)
in <0x0001e> System.DateTime:.ctor (Int32 year, Int32 month, Int32 day, Int32 ho ur, Int32 minute, Int32 second)
in <0x000f4> FSpot.Tiff.DirectoryEntry:DateTimeFromString (System.String dt)
in <0x0001b> FSpot.Tiff.DirectoryEntry:get_ValueAsDate ()
in <0x008dc> FSpot.Tiff.Header:SelectDirectory (FSpot.Tiff.ImageDirectory dir, S tatementSink sink)
Tiff.Header.Select timer stopped: 00:00:00.0189120
building info timer stopped: 00:00:00.2568560
08/18/2004 23:21:00 - 08/19/2004 00:21:56 = -01:00:56
time changed 00:00:00
08/18/2004 23:21:00 - 08/19/2004 00:21:56 = -01:00:56
time changed 00:00:00

this is what the exif command line utility shows for this photos:

Image Description   |Creative Digital Camera
Manufacturer        |Creative Technology Ltd.
Model               |CR780
Orientation         |top - left
x-Resolution        |72.00
Resolution Unit     |Inch
Software            |CR780 Firmware Version 1.0
Date and Time       |0000:00:00 00:00:00
YCbCr Positioning   |co-sited
Compression         |JPEG compression
FNumber             |f/8.0
x-Resolution        |72.00
Resolution Unit     |Inch
Exposure Time       |1/229 sec.
FNumber             |f/8.0
Exif Version        |Exif Version 2.1
Date and Time (origi|0000:00:00 00:00:00
Date and Time (digit|0000:00:00 00:00:00
ComponentsConfigurat|Y Cb Cr -
Compressed Bits per |1.60
Exposure Bias       |-0.0
MaxApertureValue    |3.00
Metering Mode       |Average
Light Source        |0
Flash               |Flash did not fire.
Focal Length        |6.5 mm
Maker Note          |101 bytes unknown data
FlashPixVersion     |FlashPix Version 1.0
Color Space         |sRGB
PixelXDimension     |1024
PixelYDimension     |768
File Source         |DSC

maybe in such cases f-spot should adjust the dates internally to those of the file date creation without spitting all this output on the console.
Comment 1 Bengt Thuree 2006-01-16 05:17:31 UTC
Did a quick check of Tiff.cs of F-Spot 0.1.5

try {
 MetadataStore.AddLiteral (sink, "xmp:ModifyDate", 
  e.ValueAsDate.ToString ("yyyy-MM-ddThh:mm:ss"));
} catch (System.Exception ex) {
 System.Console.WriteLine (String.Format ("error parsing {0}\n{1}", 
  e.ValueAsString[0], ex));
}

And it is this catch section that is raised here.
The timestamp is a invalid timestamp, and the error statement is a way for F-Spot to present the problem in a debuggable way without crashing.

When this exception has occured F-Spot falls back to the File's Creation/Last Modification timestamp. 

===> Question
Do F-Spot have the correct timestamp for this photo?
Which version of F-Spot do you use?
=====

I agree, if the timestamp is "0000:00:00 00:00:00" then F-Spot could write on console something like the following.
Picture "IMG_01234.jpg" has no timestamp, using the picture filesystem timestamp.







Comment 2 Diego González 2006-01-16 08:09:51 UTC
version of f-spot: CVS HEAD

In the report of the bug you can see that the exif tags report "0000:00:00 00:00:00", i don't know what you mean by: 
   do f-spot have the correct timestamp for this photo
Comment 3 Bengt Thuree 2006-01-16 09:34:57 UTC
When you select the picture in F-Spot, you see a small summary to the left under the tags. One of the fields are the timestamp. Also, you could view the MetaData (select the picture and press CTRL+I) and check the various timestamps there.

Hopefully one of them is the filesystem timestamp of the photo.
Comment 4 Bengt Thuree 2006-01-16 12:11:34 UTC
Could you attach a photo with these tags? Hopefully not to big photo...
Comment 5 Diego González 2006-01-16 23:05:00 UTC
Created attachment 57501 [details]
photo with the problem
Comment 6 Bengt Thuree 2006-01-17 12:33:25 UTC
Just confirmed that F-Spot presents the Unix filestamp time on this picture.

I agree that F-Spot should probably handle this case when the timestamp is
"0000:00:00 00:00:00" with a more graceful message.
Comment 7 Bengt Thuree 2006-02-21 12:49:19 UTC
Suggest to change heading to: 0000:00:00 00:00:00 timestamp generates error output on console

Change severity to very low, since it is only cosmetical...
Comment 8 Bengt Thuree 2006-02-21 13:17:20 UTC
suggest to close this one, since bug #330785 is covering this and a bit more.
Comment 9 Bengt Thuree 2006-05-18 04:33:35 UTC
Changing severity and heading to better reflect this bug
Comment 10 Gabriel Burt 2006-08-16 03:04:08 UTC
I don't think F-Spot automatically setting the EXIF/other metadata's date/time to the file's timestamp is a good idea.  Perhaps when the plugin system gets in place you can write a plugin to do this, though.

The console output is not a bug.  If you don't want console output, run F-Spot from the menu or use "f-spot > /dev/null"