C#mono MVC webapplication中System.IO.DefaultWatcher.DoFiles中的空引用异常

时间:2012-02-15 16:33:02

标签: web-applications mono nullreferenceexception

我有一个c#Mono MVC应用程序。自从我升级到Ubuntu 11.10(从11.4开始)后,运行web应用程序时有时出现以下错误:

Object reference not set to an instance of an object
at System.IO.DefaultWatcher.DoFiles (System.IO.DefaultWatcherData data, System.String directory, Boolean dispatch) [0x00000] in <filename unknown>:0 
at System.IO.DefaultWatcher.DoFiles (System.IO.DefaultWatcherData data, System.String directory, Boolean dispatch) [0x00000] in <filename unknown>:0 
at System.IO.DefaultWatcher.DoFiles (System.IO.DefaultWatcherData data, System.String directory, Boolean dispatch) [0x00000] in <filename unknown>:0 
at System.IO.DefaultWatcher.DoFiles (System.IO.DefaultWatcherData data, System.String directory, Boolean dispatch) [0x00000] in <filename unknown>:0 
at System.IO.DefaultWatcher.DoFiles (System.IO.DefaultWatcherData data, System.String directory, Boolean dispatch) [0x00000] in <filename unknown>:0 
at System.IO.DefaultWatcher.UpdateDataAndDispatch (System.IO.DefaultWatcherData data, Boolean dispatch) [0x00000] in <filename unknown>:0 
at System.IO.DefaultWatcher.Monitor () [0x00000] in <filename unknown>:0 
at System.Threading.Thread.StartUnsafe () [0x00000] in <filename unknown>:0 

发生此错误时非常随机。当它发生时我重新启动调试环境(shift-f5和f5再次)。运行应用程序时,错误大约发生在5次中。 有谁知道该怎么办?

我用: Ubuntu 11.10,Monodevelop 2.6,c#4.0,xsp4,MVC 1.0,MySql,Nhibernate,Spring

有谁知道导致此错误的原因和/或我如何阻止它? 谢谢! 保罗

1 个答案:

答案 0 :(得分:0)

这就是我修复它的方法:

  • 以root身份启动monodevelop并运行应用程序。
  • 再次开始monodevelop normal。

我不知道为什么错误会消失,但我还没有看到它。