[Mono-dev] Unhandled Exception with System.DateTime

Rodrigo Kumpera kumpera at gmail.com
Fri Apr 27 22:27:22 UTC 2012


This is a JIT bug regarding int->long conversion. Please check with trunk
as this where most of the recent MIPS work happened.



On Fri, Apr 27, 2012 at 2:59 PM, the mad mole <madmole at gmail.com> wrote:

> I have cross-compiled Mono 10.2.8 for an embedded MIPS platform, including
> a few patches suggested by Autif Khan on this forum.  Basic functionality
> seems to be there, however I'm getting an exception when I try to
> instantiate DateTime.Now (or UtcTime, doesn't matter).  Any suggestion on
> how to debug this?  The constant "4004668917" (0xEEB265F5) is always
> printed, i.e. it's not increasing like a time value.
>
> Thanks in advance: TMM
>
>
>
>  Unhandled Exception: System.TypeInitializationException: An exception was
> thrown
>  by the type initializer for System.DateTime --->
> System.ArgumentOutOfRangeExcep
> tion: Value 4004668917 is outside the valid range [0,4004668917].
> Parameter name: ticks
>   at System.DateTime.InvalidTickValue (Int64 ticks) [0x00000] in <filename
> unkno
> wn>:0
>   at System.DateTime..ctor (Int64 ticks) [0x00000] in <filename unknown>:0
>   at System.DateTime..cctor () [0x00000] in <filename unknown>:0
>   --- End of inner exception stack trace ---
>   at SumPair.Timer.get_Counter () [0x00000] in <filename unknown>:0
>   at SumPair.Program.Main (System.String[] args) [0x00000] in <filename
> unknown>
> :0
> [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An
> except
> ion was thrown by the type initializer for System.DateTime --->
> System.ArgumentO
> utOfRangeException: Value 4004668917 is outside the valid range
> [0,4004668917].
> Parameter name: ticks
>   at System.DateTime.InvalidTickValue (Int64 ticks) [0x00000] in <filename
> unknown>:0
>   at System.DateTime..ctor (Int64 ticks) [0x00000] in <filename unknown>:0
>   at System.DateTime..cctor () [0x00000] in <filename unknown>:0
>   --- End of inner exception stack trace ---
>   at SumPair.Timer.get_Counter () [0x00000] in <filename unknown>:0
>   at SumPair.Program.Main (System.String[] args) [0x00000] in <filename
> unknown>:0
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20120427/9d67ab46/attachment.html>


More information about the Mono-devel-list mailing list