一千萬個為什麽

搜索

保存然後切換文件時,Visual Studio凍結

環境:Visual Studio 2010 v10.0.31118.1 SP1,Addins:jetBrain,DXCore,VisualSVN Windows 7(最新)

由於很長一段時間Visual Studio很慢,所以我試著看看如何重現問題,這很簡單:我給文件添加一個字母,保存然後嘗試打開另一個文件。

然後Visual Studio凍結10秒或更長時間。如果我只是保存或打開文件,則根本沒有掛起。

我用ProcEx.exe查看了進程,我發現devenv.exe有很多I/O.

所以使用ProcMon,我試著看看發生了什麽,我看到visual studio打開了我網站的每個文件,以及鏈接到我網站的臨時asp.net文件夾的每個文件。

所以我查看了每個“ReadFile”操作的堆棧跟蹤,我得到了

0 fltmgr.sys fltmgr.sys + 0x2027 0xfffff880010ab027 C:\Windows\system32\drivers\fltmgr.sys

1 fltmgr.sys fltmgr.sys + 0x48ca 0xfffff880010ad8ca C:\Windows\system32\drivers\fltmgr.sys

2 fltmgr.sys fltmgr.sys + 0x222a3 0xfffff880010cb2a3 C:\Windows\system32\drivers\fltmgr.sys

3 ntoskrnl.exe ntoskrnl.exe + 0x373807 0xfffff80002dda807 C:\Windows\system32\ntoskrnl.exe

4 ntoskrnl.exe ntoskrnl.exe + 0x369e84 0xfffff80002dd0e84 C:\Windows\system32\ntoskrnl.exe

5 ntoskrnl.exe ntoskrnl.exe + 0x36ee4d 0xfffff80002dd5e4d C:\Windows\system32\ntoskrnl.exe

6 ntoskrnl.exe ntoskrnl.exe + 0x375917 0xfffff80002ddc917 C:\Windows\system32\ntoskrnl.exe

7 ntoskrnl.exe ntoskrnl.exe + 0x37f520 0xfffff80002de6520 C:\Windows\system32\ntoskrnl.exe

8 ntoskrnl.exe ntoskrnl.exe + 0x6f993 0xfffff80002ad6993 C:\Windows\system32\ntoskrnl.exe

9 ntdll.dll ntdll.dll + 0x502aa 0x76f602aa C:\Windows\SYSTEM32\ntdll.dll

10 wow64.dll wow64.dll + 0x1bfe3 0x74c0bfe3 C:\Windows\SYSTEM32\wow64.dll

11 wow64.dll wow64.dll + 0xcf87 0x74bfcf87 C:\Windows\SYSTEM32\wow64.dll

12 wow64cpu.dll wow64cpu.dll + 0x276d 0x74b8276d C:\Windows\SYSTEM32\wow64cpu.dll

13 wow64.dll wow64.dll + 0xd07e 0x74bfd07e C:\Windows\SYSTEM32\wow64.dll

14 wow64.dll wow64.dll + 0xc549 0x74bfc549 C:\Windows\SYSTEM32\wow64.dll

15 ntdll.dll ntdll.dll + 0x7c367 0x76f8c367 C:\Windows\SYSTEM32\ntdll.dll

16 ntdll.dll ntdll.dll + 0x32e2e 0x76f42e2e C:\Windows\SYSTEM32\ntdll.dll

17 ntdll.dll ntdll.dll + 0x20056 0x77110056 C:\Windows\SysWOW64\ntdll.dll

18 KERNELBASE.dll KERNELBASE.dll + 0x1b616 0x750bb616 C:\Windows\syswow64\KERNELBASE.dll

19 kernel32.dll kernel32.dll + 0x12345 0x74d82345 C:\Windows\syswow64\kernel32.dll

20 cslangsvc.dll TypeReference_Release + 0x36e86 0x535fbe8b C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC#\VCSPackages\cslangsvc.dll

21 cslangsvc.dll TypeReference_Release + 0x36ed9 0x535fbede C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC#\VCSPackages\cslangsvc.dll

22 cslangsvc.dll LangService_IsPrimaryThread + 0x2167 0x5357633b C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC#\VCSPackages\cslangsvc.dll

23 cslangsvc.dll BaseNode_GetBaseOffset + 0x3f1c 0x536a8311 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC#\VCSPackages\cslangsvc.dll

24 cslangsvc.dll BaseNode_GetBaseOffset + 0x39c6 0x536a7dbb C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC#\VCSPackages\cslangsvc.dll

25 cslangsvc.dll cslangsvc.dll + 0xedd0 0x534fedd0 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC#\VCSPackages\cslangsvc.dll

26 cslangsvc.dll LexData_FindFirstPrecedingNonWhiteChar + 0x1a5a 0x5369b229 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC#\VCSPackages\cslangsvc.dll

27 cslangsvc.dll cslangsvc.dll + 0x71efc 0x53561efc C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC#\VCSPackages\cslangsvc.dll

28 cslangsvc.dll cslangsvc.dll + 0x71df3 0x53561df3 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC#\VCSPackages\cslangsvc.dll

29 cslangsvc.dll cslangsvc.dll + 0x72077 0x53562077 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC#\VCSPackages\cslangsvc.dll

30 cslangsvc.dll UsingDirectiveNode_GetName + 0x603c2 0x5366428d C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC#\VCSPackages\cslangsvc.dll

31 kernel32.dll kernel32.dll + 0x13677 0x74d83677 C:\Windows\syswow64\kernel32.dll

32 ntdll.dll ntdll.dll + 0x39d42 0x77129d42 C:\Windows\SysWOW64\ntdll.dll

33 ntdll.dll ntdll.dll + 0x39d15 0x77129d15 C:\Windows\SysWOW64\ntdll.dll

你有什麽猜測嗎?

謝謝

最佳答案

我找到了解決方案:運行CCleaner!似乎Visual Studio使用了很多臨時文件夾,avast防病毒軟件每次打開/保存文件時都會掃描它。

所以我沒有在臨時文件夾的avast中使用過濾器,所以我更喜歡清空它。

轉載註明原文: 保存然後切換文件時,Visual Studio凍結