C # program calling bluescreen?

This is only important material that demonstrates the blues screen. I am on Windows 7 x64.

"A problem has been detected and Windows has been shut down to prevent damage to your computer.

PROCESS_HAS_LOCKED_PAGES

* STOP: 0x0000007676 (0x0000000000000000, 0xfffffa8009dcd060, 0x0000000000000011, 0x0000000000000000) "

I can’t work on it now, because every time I close it, I get a blue screen! The program does nothing but launch the background worker below. It pings all addresses that may be part of the user's home network, and tries to connect to a specific port on which another program will listen.

private void NetworkScanner_DoWork(object sender, DoWorkEventArgs e) { bool ExceptionEncountered = false; int IPsProcessed = 0; NetworkSearcherOutput = "Starting network scanner..."; NetworkSearcher.ReportProgress(0); Thread.Sleep(1000); foreach (IPAddress IP in Dns.GetHostAddresses(Dns.GetHostName())) { if (IP.AddressFamily == AddressFamily.InterNetwork) { string[] Octets = IP.ToString().Split('.'); Octets[3] = "0"; IPAddress CurrentAddressIteration = StringArrayToIP(Octets); while (GetLastOctet(CurrentAddressIteration) != 255) { PingReply Reply = new Ping().Send(CurrentAddressIteration, 5); if (Reply.Status == IPStatus.Success) { NetworkSearcherOutput = CurrentAddressIteration.ToString() + " sent response."; NetworkSearcher.ReportProgress(0); Thread.Sleep(500); InClient Client = new InClient(CurrentAddressIteration); try { Client.Connect(); SnapshotBox.Image = Client.Receive(typeof(Image)); NetworkSearcherOutput = CurrentAddressIteration.ToString() + " is running program."; NetworkSearcher.ReportProgress(0); Thread.Sleep(1000); } catch (Exception E) { // A socket exception is expected when the client is not running the program. if (E is SocketException) { Client.Close(); NetworkSearcherOutput = CurrentAddressIteration.ToString() + " is not running program."; NetworkSearcher.ReportProgress(0); Thread.Sleep(1000); } //Unhandled exception. Show messagebox and close. else { MessageBox.Show("Network scanner encountered an unhandled exception.\n\n" + E.GetType().ToString() + ": " + E.Message, "Unhandled Exception", MessageBoxButtons.OK, MessageBoxIcon.Error); ExceptionEncountered = true; break; } } } else { NetworkSearcherOutput = CurrentAddressIteration.ToString() + " did not respond."; NetworkSearcher.ReportProgress(0); } IPsProcessed++; if (IPsProcessed == 5) { NetworkSearcher.ReportProgress(2); IPsProcessed = 0; } Octets = CurrentAddressIteration.ToString().Split('.'); Octets[3] = (Int32.Parse(Octets[3]) + 1).ToString(); CurrentAddressIteration = StringArrayToIP(Octets); } } } if (!ExceptionEncountered) { NetworkSearcherOutput = "Network scanning complete."; NetworkSearcher.ReportProgress(0); NetworkSearcher.ReportProgress(100); } else { NetworkSearcherOutput = "Network scanning encountered an error."; NetworkSearcher.ReportProgress(-1); } 

I thought C # programs shouldn't have called bluescreens?

+7
source share
2 answers

Just to be clear, there is no way for a user mode code to force a blue screen in windows unless it uses undocumented APIs and does not generate bad data in the driver. Your C # code will probably not be to blame here, as if you were using user-mode classes (Socket), then the socket is responsible for not crashing your computer.

As @Joe commented on Microsoft Support KB, Article 256010 clearly describes this stop message, but better yet has clear instructions for capturing the driver name for this error.

Please note that any software firewall that you have installed is also enabled at the kernel mode level, so it may also be responsible for this error. I recommend that you follow KB article tips and try to find out what is to blame. But you can also be sure to update your network drivers and firewall / VPN software to the latest stable versions.

+4
source

I discovered this problem a few weeks ago. This only happens when using .NET 4.

Reported by MS Connect .

Edit:

(Will *) Add this link to the MS Connect error report.

* login.live.com enters an endless loop again ...

+7
source

All Articles