This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.

Bug 4392

Summary: fileinfo outofrange on x86
Product: [Mono] Class Libraries Reporter: Piotr Wysocki <piotrwysocki>
Component: CORLIBAssignee: Paolo Molaro <lupus>
Status: NEW ---    
Severity: normal CC: maciej.paszta, miguel, mono-bugs+mono, piotrwysocki
Priority: ---    
Version: Trunk   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Tags: Test Case URL:
External Submit: ---

Description Piotr Wysocki 2012-04-11 10:01:32 EDT
x86 (x64 unaffected)

Assuming examples.desktop is a regular file:

$ cat test.cs
var fi = new System.IO.FileInfo("examples.desktop");
Console.WriteLine(fi);
Console.WriteLine(fi.Exists);
Console.WriteLine(fi.LastWriteTime);
Console.WriteLine(fi.LastAccessTime);

$ /opt/mono-2.10.9/bin/csharp test.cs
examples.desktop
True
4/11/2012 12:29:06 PM
4/11/2012 12:29:06 PM

$ /opt/mono-2.11/bin/csharp test.cs
examples.desktop
True
1/1/1601 1:00:03 AM
System.ArgumentOutOfRangeException: < 0
Parameter name: fileTime
  at System.DateTime.FromFileTime (Int64 fileTime) [0x00000] in <filename
unknown>:0
  at System.IO.FileSystemInfo.get_LastAccessTime () [0x00000] in <filename
unknown>:0
  at (wrapper remoting-invoke-with-check)
System.IO.FileSystemInfo:get_LastAccessTime ()
  at <InteractiveExpressionClass>.Host (System.Object& $retval) [0x00000] in
<filename unknown>:0
  at Mono.CSharp.Evaluator.Evaluate (System.String input, System.Object&
result, System.Boolean& result_set) [0x00000] in <filename unknown>:0
  at Mono.CSharpShell.Evaluate (System.String input) [0x00000] in <filename
unknown>:0

mono 2.11 compiled from tarball (http://download.mono-project.com/sources/mono/
  [ ]    mono-2.11.0.tar.bz2    22-Mar-2012 22:51     31M)
Comment 1 Miguel de Icaza 2012-04-13 17:06:15 EDT
Paolo, can you investigate this?