2017-02-14 17 views
0

在結束我的程序調試我出現以下錯誤BSOD:Visual Studio的藍屏結束調試器在平超時

"PROCESS_HAS_LOCKED_PAGES"

然而,這僅僅出現在平超時的情況發生。例如,它可以正常ping,並且我可以結束調試。但是,當我嘗試IP地址超時,然後在For循環期間或之後結束調試器時,它會將窗口撞到藍屏。我在筆記本電腦上試過這個,並且有完全相同的問題。兩者都運行Windows 10 x64。

任何想法究竟是什麼造成了這一點?我已經完全卸載了我的桌面上的Visual Studio並重新安裝,但藍屏仍在發生。我沒有任何其他程序的問題,實際的調試程序本身工作正常,當我在Visual Studio之外運行它。難道我做錯了什麼?

Imports System.Net.NetworkInformation 
Public Class Form1 
    Private Sub btnStartPing_Click(sender As Object, e As EventArgs) Handles btnStartPing.Click 
     For I As Integer = 0 To 5 
      If I >= 5 Then 
       Exit For 
      End If 

      Dim myPing As New System.Net.NetworkInformation.Ping 
      Dim PR As System.Net.NetworkInformation.PingReply 
      PR = myPing.Send("192.168.0.78") 

      If PR.Status = IPStatus.Success Then 
       ListBox1.Items.Add("Reply from " & PR.Address.ToString & ": BYTES=" & PR.Buffer.Length & " TIME<" & PR.RoundtripTime & "ms TTL=" & PR.Options.Ttl) 
      Else 
       ListBox1.Items.Add(PR.Status.ToString) 
      End If 

      My.Application.DoEvents() 
      System.Threading.Thread.Sleep(500) 
     Next 
    End Sub 
End Class 

回答