System.NullReferenceException
空引用异常
可以尝试注册一个异常处理事件,记录一下异常信息:
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
LocalLogService.Write("Domain:" + AppDomain.CurrentDomain.FriendlyName);
LocalLogService.Write(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff") + ": CurrentDomain_UnhandledException。" + (e.ExceptionObject as Exception).ToString());
}
ericzhou