FatalExecutionEngineError occurring with DateTime objects

0

I have this line of code which sometimes gets a FatalExecutionEngineError exception:

Double? TimeTakenToStopProbe = Math.Round(((TimeSpan)(ProbeEndDateTime - CancelationRequestDateTime)).TotalSeconds, 3);

where ProbeEndDateTime and CancelationRequestDateTime are not null DateTime objects with valid dates and times in them.

The full exception explanation given to me by Visual Studio is the following:

Managed Debugging Assistant 'FatalExecutionEngineError' 
  Message=Managed Debugging Assistant 'FatalExecutionEngineError' : 'The runtime has encountered a fatal error. The address of the error was at 0x7664bee8, on thread 0x1eac0. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.'

Can someone explain to me what is causing this exception ?

c#
exception
asked on Stack Overflow Feb 1, 2020 by Ahmad

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0