FileSystemWatcher崩溃了 [英] FileSystemWatcher crashes

查看:112
本文介绍了FileSystemWatcher崩溃了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我遇到的问题与此完全相同:


https:// connect .microsoft.com / VisualStudio / feedback / details / 780775 / filesystemwatcher-overlaped-listener-raising-an-exception-on-malformed-notifications



由于某种原因我不能在那里评论所以决定开始一个新的讨论话题。微软提到无法重现这个问题。



如果File Watcher Path非常长且300多个文件同时到达,我总能重现它。我手动从另一个文件夹复制它们。 Windows还警告我,某些文件名太长而且会被截断。



我在.NET服务中使用FileSystemWatcher,这个错误无法从中恢复。服务崩溃,我在Windows事件日志中看到以下错误:



框架版本:v4.0.30319

描述:流程已终止到期到未处理的例外。

异常信息:System.ArgumentException

    at System.IO.Path.CheckInvalidPathChars(System.String,Boolean)

    at System.IO.Path.GetFileName(System.String)

    at System.IO.FileSystemWatcher.MatchPattern(System.String)

    at System.IO.FileSystemWatcher.NotifyFileSystemEventArgs(Int32,System.String)

    at System.IO.FileSystemWatcher.CompletionStatusChanged(UInt32,UInt32,System.Threading.NativeOverlapped *)

    at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32,UInt32,System.Threading.NativeOverlapped *)



b
请告知







解决方案

嗨朋友,


感谢您的发帖。


同一问题已经提交了反馈,您已发布了该链接。我建议您对该反馈发表评论,微软工程师将对其进行评估认真。


由于本论坛正在讨论Visual Studio IDE,您的问题似乎与.net框架更相关,您可以在相应的论坛中获得更专业的答案来解决这类问题:


https: //social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=netfxbcl



感觉如果您有任何其他Visual Studio IDE相关问题,请随时告诉我。



祝你有个美好的一天。



祝你好运,


Fletch



Hi,

I am experiencing exactly the same issue as here:

https://connect.microsoft.com/VisualStudio/feedback/details/780775/filesystemwatcher-overlapped-listener-raising-an-exception-on-malformed-notifications

For some reason I can't comment there so decided to start a new discussion topic. Microsoft mentioned that can't reproduce the issue.

I can always reproduce it if File Watcher Path is very long and 300+ files arrive at the same time. I copy them from another folder manually. Windows also warned me that some file names are too long and will be truncated.

I use FileSystemWatcher in the .NET service and this error is impossible to recover from. Service crashes and I see the following error in Windows Event log:

Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentException
   at System.IO.Path.CheckInvalidPathChars(System.String, Boolean)
   at System.IO.Path.GetFileName(System.String)
   at System.IO.FileSystemWatcher.MatchPattern(System.String)
   at System.IO.FileSystemWatcher.NotifyFileSystemEventArgs(Int32, System.String)
   at System.IO.FileSystemWatcher.CompletionStatusChanged(UInt32, UInt32, System.Threading.NativeOverlapped*)
   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)


Please advise



解决方案

Hi friend,

Thanks for your posting.

The same issue has been submitted a feedback, which you've posted the link of it. I just suggest you comment on that feedback, and the Microsoft engineers will evaluate it seriously.

Since this forum is talking about Visual Studio IDE, your issue seems more related to .net framework, you could get more professional answer to this kind of issues in the corresponding forum:

https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=netfxbcl

Feel free to let me know if you have any other Visual Studio IDE related issues.

Have a good day.

Best regards,

Fletch


这篇关于FileSystemWatcher崩溃了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆